<div>I am hoping for an update every 10 minutes just to satisfy the anxieties of volunteers crunching on my project, but every hour may be satisfactory. And if I can do this without requiring any shell scripts it would be better in my environment. So I started making some code modifications which apparently did not work</div>

<div> </div>
<div>src/mdlib/sim_util.c:93:void print_time(FILE *out,time_t start,int step,t_inputrec *ir)<br>src/mdlib/sim_util.c-94-{<br>src/mdlib/sim_util.c-95-  static real time_per_step;<br>src/mdlib/sim_util.c-96-  static time_t end;<br>
src/mdlib/sim_util.c-97-  time_t finish;<br>src/mdlib/sim_util.c-98-  double dt, fc;<br>src/mdlib/sim_util.c-99-  char buf[48];<br>src/mdlib/sim_util.c-100-  FILE *progress=&quot;progress.txt&quot;;<br>src/mdlib/sim_util.c-101-<br>
src/mdlib/sim_util.c-102-  if (!gmx_parallel_env)<br>src/mdlib/sim_util.c-103-    fprintf(out,&quot;\r&quot;);<br>src/mdlib/sim_util.c-104-  fprintf(out,&quot;step %d&quot;,step);<br>src/mdlib/sim_util.c-105-  if ((step &gt;= ir-&gt;nstlist)) {<br>
src/mdlib/sim_util.c-106-    if ((ir-&gt;nstlist == 0) || ((step % ir-&gt;nstlist) == 0)) {<br>src/mdlib/sim_util.c-107-      /* We have done a full cycle let&#39;s update time_per_step */<br>src/mdlib/sim_util.c-108-      end=time(NULL);<br>
src/mdlib/sim_util.c-109-      dt=difftime(end,start);<br>src/mdlib/sim_util.c-110-      time_per_step=dt/(step - ir-&gt;init_step + 1);<br>src/mdlib/sim_util.c-111-    }<br>src/mdlib/sim_util.c-112-    dt=(ir-&gt;nsteps + ir-&gt;init_step - step)*time_per_step;<br>
src/mdlib/sim_util.c-113-<br>src/mdlib/sim_util.c-114-    if (dt &gt;= 300) {    <br>src/mdlib/sim_util.c-115-      finish = end+(time_t)dt;<br>src/mdlib/sim_util.c-116-      sprintf(buf,&quot;%s&quot;,ctime(&amp;finish));<br>
src/mdlib/sim_util.c-117-      buf[strlen(buf)-1]=&#39;\0&#39;;<br>src/mdlib/sim_util.c-118-      fprintf(out,&quot;, will finish %s&quot;,buf);<br>src/mdlib/sim_util.c-119-    }<br>src/mdlib/sim_util.c-120-    else<br>src/mdlib/sim_util.c-121-      fprintf(out,&quot;, remaining runtime: %5d s          &quot;,(int)dt);<br>
src/mdlib/sim_util.c-122-      fc = (int)dt / ir-&gt;nstlist;<br>src/mdlib/sim_util.c-123-      fprintf(stderr, &quot;Fraction complete: %d \n&quot;, fc);<br>src/mdlib/sim_util.c-124-  }<br>src/mdlib/sim_util.c-125-  if (gmx_parallel_env)<br>
src/mdlib/sim_util.c-126-    fprintf(out,&quot;\n&quot;);<br>src/mdlib/sim_util.c-127-<br>src/mdlib/sim_util.c-128-  fflush(out);<br>src/mdlib/sim_util.c-129-}<br></div>
<div> </div>
<div>Back Off! I just backed up md.edr to ./#md.edr.4#<br>starting mdrun &#39;Protein in water&#39;<br>500 steps,      1.0 ps.<br>step 100, remaining runtime:   122 s          Fraction complete: 0 <br>step 200, remaining runtime:    92 s          Fraction complete: 0 <br>
<br><br></div>
<div class="gmail_quote">On Thu, Sep 24, 2009 at 6:34 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">Jack Shultz wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">I figured out another way to update the progress of my simulation, but I need to report the fraction of completion at the certain intervals of mdrun. Possibly at every time step or if that does not make sense every 100 timesteps. I don&#39;t think this is a feature currently supported, so I will have to make some source code chages. I am looking for the variables related to total number of time steps and where it controls the the current time step so I can calculate the fraction of complete where current-timestep / total-timestep<br>
</blockquote><br></div>Under at least some circumstances GROMACS writes the expected runtime remaining to stderr, but I don&#39;t recall what/when. Piping that to some useful script has to be a good start. You certainly don&#39;t need this data every time step, and don&#39;t want to be perturbing mdrun to get it.<br>
<br>Even if the above was unsuitable, surely progress would only need to be moderately accurate and for simulations that last many hours. If so, you&#39;ll get good enough data by grepping a gmxdump of the .tpr to get the expected frequencies of output and length of run, and then watching the growth of whichever of .log/.trr/.edr is written most frequently. I/O buffering will affect the numbers somewhat.<br>
<br>Mark<br><br>_______________________________________________<br>gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br><a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Jack<br><br><a href="http://drugdiscoveryathome.com">http://drugdiscoveryathome.com</a><br><a href="http://hydrogenathome.org">http://hydrogenathome.org</a><br>