Can I change the 0.99 to e.g. 0.95 for -maxh?

GROMACS version:2020.4
GROMACS modification: No
Here post your question

With option -maxh a simulation is terminated and a checkpoint file is written at the first neighbor search step where the run time exceeds -maxh *0.99 hours.

Can I change the 0.99 to e.g. 0.95 so as to allow sufficient time for writing the cpi files?

I am doing REMD, which needs to write dozens of cpi files. In one of my log files, there is only

Writing checkpoint, step 92601 at Sun Feb 28 08:32:18 2021

at the end, without the performance report like

   Core t (s)   Wall t (s)        (%)
   Time:    14296.224     3574.057      400.0
             59:34
     (ns/day)    (hour/ns)
Performance:        4.480        5.358
Finished mdrun on rank 0 Sun Feb 28 00:47:33 2021

So I think, the program does not have suffcient time to output the performance report. Is that correct that, with flag -maxh 1, the performance report should ideally be written at the end of the log file?

If I give more time, e.g. 5% instead of 1%, the program should elegantly terminate the run, write all the cpi file, and output the performance report?

Yes, you should get the performance report. So you run does not seem to reach the next ns step. We the value 0.99 with a typical time of 24 hours in mind, which seems to be unproblematic. Here you use 1 hour, which might leave too little time. The solution is simply to supply hours*0.95 to the -maxh option.

Thank you. Do you mean the exact command should be -maxh 0.95 or -maxh 1*0.95 ?

-maxh 0.95 would set it to 57 minutes, you should set it to 0.95 times the allocated job time (in hours). Eg. -maxh 3.8 for a 4 hour job. (Edit: to be precise, this will end the simulation at 0.99 * 0.95 * hours, adjust appropriately if you need to)

1 Like

But I am still confused. The manual says:

-maxh (-1)
Terminate after 0.99 times this time (hours)

This means, if -maxh 0.95 is used, it will terminates 0.99*0.95 = 0.9405 hour. I feel 0.99 has been fixed.

Sure 0.99 has been fixed in the code. So if you want exaclty 0.95 hours (plus the times it takes mdrun to get to the next ns step), supply -maxh 0.959595959596

Thank you, now I fully got the usage.