[gmx-users] Identical energies generated in a rerun calculation ... but ...

David van der Spoel spoel at xray.bmc.uu.se
Mon Apr 27 16:19:45 CEST 2009


Justin A. Lemkul wrote:
> 
> Hi Mark,
> 
> I tried applying your patch and found some odd installation behavior.  
> We have two systems that I am trying to patch.  The first uses gcc-3.3 
> and worked fine.  The other uses gcc-4.2.2, and the compilation failed 
> with:
> 
> "md.c", line 933.18: 1506-046 (S) Syntax error.
> "md.c", line 934.11: 1506-277 (S) Syntax error: possible missing ';' or 
> ','?
> make[3]: *** [md.o] Error 1
> make[3]: Leaving directory `/home/rdiv1001/gmx/gromacs-4.0.4/src/kernel'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/rdiv1001/gmx/gromacs-4.0.4/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/rdiv1001/gmx/gromacs-4.0.4/src'
> make: *** [all-recursive] Error 1
> 
> The error seems to point to this line:
> 
>  } else { // DDMASTER(cr->dd) == TRUE
> 
> Is the statement at the end supposed to be a comment?  I'm only a novice 
> at C, so I'm used to seeing something more like:
> 
>  } else { /* DDMASTER(cr->dd) == TRUE */
> 
> If I make that change, then the system using gcc-4.2.2 doesn't complain 
> and the installation finishes successfully.  I don't want to go 
> haphazardly commenting out lines of code, so I'd appreciate any feedback 
> on what might be going on.

// style comments are C++ only. They are not allowed in GROMACS for this 
reason.

> 
> Thanks!
> 
> -Justin
> 
> Mark Abraham wrote:
>> Mark Abraham wrote:
>>> Berk Hess wrote:
>>>> Hi,
>>>>
>>>> I think you can replace all state-> by state_global-> within { } 
>>>> after the if statement
>>>> on line 929 of md.c.
>>>> Then I think it should work for serial, PD and DD.
>>>>
>>>> Mark, could you test if this works and report back?
>>>
>>> Thanks for the prompt response.
>>>
>>> I had tried something equivalent to this earlier, and kept getting 
>>> the same segfault. I now see why... state_global is only allocated on 
>>> DDMASTER(cr) (or some such), so we need a slightly more cunning 
>>> solution. I'll figure it out tomorrow.
>>
>> OK I have a complete fix. Under DD, non-DDMASTER processes should skip 
>> this step copying data structures from rerun_fr to state_global. The 
>> sizes of the various loop copies should be state_global->natoms, not 
>> mdatoms->nr (which is smaller than state_global->natoms under DD, but 
>> equal under other conditions). So attached is a patchfile to be 
>> applied from src/kernel with
>>
>> patch md.c < dd_mdrun.patch
>>
>> I tested single-processor with and without mpi, four processors with 
>> DD and no separate PME nodes, four processors with PD, and 16 
>> processors with DD and 5 PME nodes and got agreement between the 
>> leading significant figures reported in the .log file for all cases 
>> compared with single-processor plain 4.0.4.
>>
>> I had a quick look at CVS releases-4.0-patches and since this bit of 
>> do_md() looks the same, this patch can probably be applied there 
>> and/or to the head 4.1 branch painlessly.
>>
>> I will attach this patchfile to the bugzilla.
>>
>> Before a release of 4.0.5 or 4.1, normal users should do "mdrun -rerun 
>> -pd", unless they're confident with applying this patch!
>>
>> Mark
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> gmx-users mailing list    gmx-users at gromacs.org
>> http://www.gromacs.org/mailman/listinfo/gmx-users
>> Please search the archive at http://www.gromacs.org/search before 
>> posting!
>> Please don't post (un)subscribe requests to the list. Use the www 
>> interface or send it to gmx-users-request at gromacs.org.
>> Can't post? Read http://www.gromacs.org/mailing_lists/users.php
> 


-- 
David van der Spoel, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se



More information about the gromacs.org_gmx-users mailing list