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

Mark Abraham Mark.Abraham at anu.edu.au
Sat Apr 25 08:55:51 CEST 2009

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!

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dd_rerun.patch
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20090425/3dd019c3/attachment.ksh>

More information about the gromacs.org_gmx-users mailing list