[gmx-developers] Test fail due to newline?

Teemu Murtola teemu.murtola at gmail.com
Fri Apr 14 06:11:17 CEST 2017


The problem in that change seems to be that the xpm file is not identical
in single- and double-precision builds. The color map has differences in
the last decimal on one of the lines, IIRC. The newlines are unlikely to
cause this.

Teemu

On Fri, Apr 14, 2017, 01:45 Mark Abraham <mark.j.abraham at gmail.com> wrote:

> Hi,
>
> On Fri, Apr 14, 2017 at 12:22 AM David van der Spoel <spoel at xray.bmc.uu.se>
> wrote:
>
>> Hi,
>>
>> I'm trying to test the writing of an xpm file using ExactTextMatch but
>> it fails. Could that be due to newline characters in the data file?
>
>
> Conceivable. For example, the new tests of grompp -po have whole mdp file
> contents as strings in refdata, but they don't get written as CDATA. As
> 2f00ac17824b13dbb128c67cf338ec9890f0d05f notes, the xml library we use
> doesn't let us use '\r' in a text node (IIRC that's what a CDATA element
> is), and a Mac might produce '\r' for a newline? The test failure seems
> consistent with the symptoms of a '\r' getting converted to '\n' on the
> round trip. So maybe generating the refdata on a linux machine is enough to
> produce robust test reference data.
>
> But perhaps serializing the matrix using the refdata sequence
> functionality is better still? Depends whether you're intending to assert
> on the contents of the matrix or the contents of the file.
>
> Mark
>
>
>> The
>> patch is here:
>>
>> https://gerrit.gromacs.org/#/c/6546/
>>
>> The problem seems to be in the CDATA section.
>> % od -a ClustsizeTest_MolCSize.xml
>> <snip>
>> 0000320   S   t   r   i   n   g  sp   N   a   m   e   =   "   C   o   n
>> 0000340   t   e   n   t   s   "   >   <   !   [   C   D   A   T   A   [
>> 0000360  nl   /   *  sp   X   P   M  sp   *   /  nl   /   *  sp   T   h
>>                                                   ^^
>> Is the nl character portable?
>>
>> Felmeddelande:
>>
>>
>> /home/jenkins/workspace/Gromacs_Gerrit_master_nrwpo/c046391a/gromacs/src/testutils/refdata.cpp:887
>>    In item: /Files/-ow/Contents
>>     Actual: '/* XPM */
>> /* This file can be converted to EPS by the GROMACS program xpm2ps */
>>
>> Reference: '/* XPM */
>> /* This file can be converted to EPS by the GROMACS program xpm2ps */
>>
>> --
>> David van der Spoel, Ph.D., Professor of Biology
>> Head of Department, Cell & Molecular Biology, Uppsala University.
>> Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205
>> <018-471%2042%2005>.
>> http://www.icm.uu.se
>> --
>> Gromacs Developers mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>> or send a mail to gmx-developers-request at gromacs.org.
>>
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20170414/67fe1c93/attachment.html>


More information about the gromacs.org_gmx-developers mailing list