<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>I can fix, but I am currently very busy, so it might take some time.<br><br>Berk<br><br>&gt; Date: Fri, 24 Apr 2009 17:56:56 +1000<br>&gt; From: Mark.Abraham@anu.edu.au<br>&gt; To: gmx-users@gromacs.org<br>&gt; Subject: Re: [gmx-users] Identical energies generated in a rerun calculation        ...        but ...<br>&gt; <br>&gt; Mark Abraham wrote:<br>&gt; &gt; <br>&gt; &gt; OK I have some confirmation of a possible bug here. Using 4.0.4 to do <br>&gt; &gt; reruns on the same positions-only NPT peptide+water trajectory with the <br>&gt; &gt; same run input file:<br>&gt; &gt; <br>&gt; &gt; a) compiled without MPI, a single-processor rerun worked correctly, <br>&gt; &gt; including "zero" KE and temperature at each frame<br>&gt; &gt; <br>&gt; &gt; b) compiled with MPI, a single-processor run worked correctly, including <br>&gt; &gt; zero KE and temperature, and agreed with a) within machine precision<br>&gt; &gt; <br>&gt; &gt; c) compiled with MPI, a 4-processor run worked incorrectly : an <br>&gt; &gt; approximately-correct temperature and plausible positive KE were <br>&gt; &gt; reported, all PE terms were identical to about machine precision with <br>&gt; &gt; the first step of a) and b), and the reported pressure was different.<br>&gt; &gt; <br>&gt; &gt; Thus it seems that a multi-processor mdrun is not updating the structure <br>&gt; &gt; for subsequent steps in the loop over structures, and/or is getting some <br>&gt; &gt;  KE from somewhere that a single-processor calculation is not.<br>&gt; &gt; <br>&gt; &gt; I'll step through c) with a debugger tomorrow.<br>&gt; <br>&gt; d) compiled with MPI, a 4-processor run using particle decomposition <br>&gt; worked correctly, agreeing with a).<br>&gt; <br>&gt; Further, c) has the *same* plausible positive KE at each step.<br>&gt; <br>&gt;  From stepping through a run, I think the rerun DD problem arises in <br>&gt; that a rerun loads the data from the rerun trajectory into rerun_fr, and <br>&gt; later copies those into state, and not into state_global. state_global <br>&gt; is initialized to that of the .tpr file (which *has* velocities), which <br>&gt; is used for the DD initialization, and state_global is never <br>&gt; subsequently updated. So, for each rerun step, the same .tpr state gets <br>&gt; propagated, which leads to all the symptoms I describe above. The KE <br>&gt; comes from the velocities in the .tpr file, and is thus constant.<br>&gt; <br>&gt; So, a preliminary work-around is to use mdrun -rerun -pd to get particle <br>&gt; decomposition.<br>&gt; <br>&gt; I tried to hack a fix for the DD code. It seemed that using<br>&gt; <br>&gt; for (i=0; i&lt;state_global-&gt;natoms; i++)<br>&gt;    copy_rvec(rerun_fr.x[i],state_global.x[i])<br>&gt; <br>&gt; before about line 1060 of do_md() in src/kernel/md.c should do the <br>&gt; trick, since with bMasterState set for a rerun, dd_partition_system() <br>&gt; should propagate state_global to the right places. However I got a <br>&gt; segfault in that copy_rvec with i==0, despite state_global.x being <br>&gt; allocated and of the right dimensions according to Totalview's memory <br>&gt; debugger.<br>&gt; <br>&gt; I'll file a bugzilla in any case.<br>&gt; <br>&gt; Mark<br>&gt; _______________________________________________<br>&gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the <br>&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>