Gromacs
2022.2
|
#include <gromacs/mdlib/checkpointhandler.h>
Class handling the checkpoint signal.
Master rank sets the checkpointing signal periodically All ranks receive checkpointing signal and set the respective flag
Public Member Functions | |
CheckpointHandler (compat::not_null< SimulationSignal * > signal, bool simulationsShareState, bool neverUpdateNeighborList, bool isMaster, bool writeFinalCheckpoint, real checkpointingPeriod) | |
CheckpointHandler constructor. More... | |
void | setSignal (gmx_walltime_accounting *walltime_accounting) const |
Decides whether a checkpointing signal needs to be set. More... | |
void | decideIfCheckpointingThisStep (bool bNS, bool bFirstStep, bool bLastStep) |
Decides whether a checkpoint shall be written at this step. More... | |
bool | isCheckpointingStep () const |
Query decision in decideIfCheckpointingThisStep() | |
gmx::CheckpointHandler::CheckpointHandler | ( | compat::not_null< SimulationSignal * > | signal, |
bool | simulationsShareState, | ||
bool | neverUpdateNeighborList, | ||
bool | isMaster, | ||
bool | writeFinalCheckpoint, | ||
real | checkpointingPeriod | ||
) |
CheckpointHandler constructor.
Needs a non-null pointer to the signal which is reduced by compute_globals, and (const) references to data it needs to determine whether a signal needs to be set or handled.
|
inline |
Decides whether a checkpoint shall be written at this step.
Checkpointing is done if this is not the initial step, and
|
inline |
Decides whether a checkpointing signal needs to be set.
Checkpointing signal is set based on the elapsed run time and the checkpointing interval.