<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="progress.txt";<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,"\r");<br>src/mdlib/sim_util.c-104- fprintf(out,"step %d",step);<br>src/mdlib/sim_util.c-105- if ((step >= ir->nstlist)) {<br>
src/mdlib/sim_util.c-106- if ((ir->nstlist == 0) || ((step % ir->nstlist) == 0)) {<br>src/mdlib/sim_util.c-107- /* We have done a full cycle let'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->init_step + 1);<br>src/mdlib/sim_util.c-111- }<br>src/mdlib/sim_util.c-112- dt=(ir->nsteps + ir->init_step - step)*time_per_step;<br>
src/mdlib/sim_util.c-113-<br>src/mdlib/sim_util.c-114- if (dt >= 300) { <br>src/mdlib/sim_util.c-115- finish = end+(time_t)dt;<br>src/mdlib/sim_util.c-116- sprintf(buf,"%s",ctime(&finish));<br>
src/mdlib/sim_util.c-117- buf[strlen(buf)-1]='\0';<br>src/mdlib/sim_util.c-118- fprintf(out,", will finish %s",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,", remaining runtime: %5d s ",(int)dt);<br>
src/mdlib/sim_util.c-122- fc = (int)dt / ir->nstlist;<br>src/mdlib/sim_util.c-123- fprintf(stderr, "Fraction complete: %d \n", 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,"\n");<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 'Protein in water'<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"><<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>></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'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't recall what/when. Piping that to some useful script has to be a good start. You certainly don't need this data every time step, and don'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'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'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'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>