[gmx-users] no error on missing cpt file

Kutzner, Carsten ckutzne at gwdg.de
Wed Apr 29 13:20:33 CEST 2015

Hi JIom,

> On 29 Apr 2015, at 11:50, gromacs query <gromacsquery at gmail.com> wrote:
> Dear All,
> mdrun is not giving any error about missing cpt file. It runs using tpr
> from initial time zero. Sometimes my job get killed and I need to use cpt
> file in some script but if cpt is not found my job starts running from zero
> time in tpr file which is harmful as it consumes my processors to run job
> again from time zero. I would expect it should get killed with error if
> some cpt file is not found. My command line in script goes like this:
This is not a bug but a feature :)

From mdrun -h:
"A simulation can be continued by
reading the full state from file with option -cpi. This option is intelligent
in the way that if no checkpoint file is found, Gromacs just assumes a normal
run and starts from the first step of the .tpr file.”

> mdrun_mpi -s dyn.tpr -x dyn.xtc -e dyn.edr -c dyn.gro -g dyn.log -cpi
> previous.cpt -cpo dyn.cpt
> In this case if provious.cpt is not found mdrun still runs my job but
> starting from zero time. Why it should not get killed complaining about
> missing previous.cpt file?
> Do I need to force something?
If you specifically only want to run an MD if a .cpt file is found, 
you could do that, e.g. in bash with:

if [ -f previous.cpt ] ; then
    mdrun …
    printf “No checkpoint file found.”


> Thanks,
> JIom
> -- 
> Gromacs Users mailing list
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.

Dr. Carsten Kutzner
Max Planck Institute for Biophysical Chemistry
Theoretical and Computational Biophysics
Am Fassberg 11, 37077 Goettingen, Germany
Tel. +49-551-2012313, Fax: +49-551-2012302

More information about the gromacs.org_gmx-users mailing list