Gromacs
2018.5
|
This file declares functions for mdrun to call to manage the details of doing a restart (ie. reading checkpoints, appending output files).
Functions | |
void | handleRestart (t_commrec *cr, gmx_bool bTryToAppendFiles, const int NFILE, t_filenm fnm[], bool *bDoAppendFiles, bool *bStartFromCpt) |
Handle startup of mdrun, particularly regarding -cpi and -append. More... | |
void handleRestart | ( | t_commrec * | cr, |
gmx_bool | bTryToAppendFiles, | ||
const int | NFILE, | ||
t_filenm | fnm[], | ||
bool * | bDoAppendFiles, | ||
bool * | bStartFromCpt | ||
) |
Handle startup of mdrun, particularly regarding -cpi and -append.
If there is a checkpoint file, then prepare to start from that state. If restarting from a checkpoint file and appending is requested with tryToAppendFiles, we will set doAppendFiles to true on return if all files were found correctly. If some files are not found when appending should be done, we will instead issue a fatal error to avoid unintentional problems.
If there is no checkpoint file, we assume it is the first part of a new run, and in this case we silently set doAppendFiles to false on return.
On return, fnm
is updated with suffix strings for part numbers if we are doing a restart from checkpoint and are not appending. The routine also does communication to coordinate behaviour between all ranks of a simulation, and/or simulations.
[in] | cr | Communication structure |
[in] | bTryToAppendFiles | Whether appending is requested (from mdrun) |
[in] | NFILE | Size of fnm struct |
[in,out] | fnm | Filename parameters to mdrun |
[out] | bDoAppendFiles | True on return if we will do appending. Note that the routine will generate a fatal error for some scenarios where appending is requested but the necessary files not found. |
[out] | bStartFromCpt | True on return if we found the checkpoint and will use it to restart. |