mdrun appends when checkpoint specified by -cpi is not found - Redmine #2829
If I invoke mdrun with all paths correctly specified:
gmx mdrun -s md.part0001.tpr -cpi md.part0001.cpt -noappend
I get the expected behavior of creating a bunch of files named md.part0002*. However, if I have a typo I will get unexpected behavior:
gmx mdrun -s md.part0001.tpr -cpi md.part001.cpt -noappend
In this case, md.part0001* files will be backed up and the simulation will just start from the tpr as if the simulation has not started yet.
There is a note which seems to be about this in the mdrun help text
There are three scenarios with
-cpi:* no files with matching names are present: new output files are written
but this seems like unexpected behavior if I have explicitly specified -noappend. If I have no cpt file and I give the -append flag to mdrun it will throw an error, so it seems like the reverse case of saying -noappend while not giving an actual file to -cpi should also throw an error.
(from redmine: issue id 2829, created on 2019-01-12 by ejjordan, closed on 2019-04-09)
- Relations:
- relates #1889 (closed)
- Changesets:
- Revision c7be7d6f by Mark Abraham on 2019-05-03T16:32:11Z:
More tests for how mdrun -cpi restarts handle files
These tests clarify the behaviour of mdrun -cpi -noappend. It should
append ".partNNNN" to output files, but it is currently possible to
produce output files named like md.part0001.part0002.log
Added some unit tests around the string-handling behaviour that needs
fixing and left TODO comments to show what issues need fixing.
Reduced use of the deprecated mdrun -nsteps option
Refs #2804, #2829
Change-Id: I7e370b835d6fd3512fcaac575d0ff627b33c6e47