Gromacs  2019
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations
resethandler.h File Reference
#include "gromacs/compat/pointers.h"
#include "gromacs/mdlib/simulationsignal.h"
#include "gromacs/utility/logger.h"
+ Include dependency graph for resethandler.h:

Description

Declares the reset handler class.

This class resets the various counters based on either the time (master rank sends checkpointing signal after 49.5% or run time), or based on the number of elapsed steps (handled locally by all ranks independently). Resets can happen in different ways:

* at a predetermined step (gmx mdrun -resetstep XXX)
* at half of the number of steps (gmx mdrun -resethway and nsteps set)
* at half of the max wall time (gmx mdrun -resethway -maxh XX), which is
  implemented triggered when walltime >= 49.5% of max

If two or more of these reset conditions are set, the first condition which is met resets the counters, there is no second reset happening. Note also that -resethway with nsteps set overwrites -resetstep (gmx mdrun -resethway -nsteps 100000 -resetstep 1000 will result in a reset at step 50000, not 1000).

The setting and handling is implemented in private functions. They are only called if a respective boolean is true. For the trivial case of no reset needed (or no reset signal setting on any other rank than master), the translation unit of the calling function is therefore never left. The current implementation also allows the handler and setters to be ignored once a reset has been done, as a reset is only allowed to happen once. In the future, many of these cases this will be achieved by adding (or not adding) handlers / setters to the task graph.

Author
Pascal Merz pasca.nosp@m.l.me.nosp@m.rz@co.nosp@m.lora.nosp@m.do.ed.nosp@m.u

Classes

class  gmx::ResetHandler
 Class handling the reset of counters. More...
 

Enumerations

enum  gmx::ResetSignal { noSignal = 0, doResetCounters = 1 }
 Reset signals. More...