Gromacs
2024.3
|
#include <gromacs/mdlib/simulationsignal.h>
POD-style object used by mdrun ranks to set and receive signals within and between simulations.
Keep in mind that the values of signals are transmitted to other ranks through an MPI_Reduce after casting them to a real (so the signals can be sent together with other data). This means that the only meaningful values are positive, negative or zero.
isLocal permits (for example) replica-exchange to require that any checkpointing is synchronized across all simulations, by setting isLocal to false, so that the trigger for action is set only when inter-simulation signalling happens. Replica-exchange can coordinate this at run time when a SimulationSignaller is made.
Public Member Functions | |
SimulationSignal (bool isSignalLocal=true) | |
Constructor. | |
Public Attributes | |
signed char | sig |
The signal set by this rank in do_md(). | |
signed char | set |
The communicated signal that triggers action, which will be equal for all ranks, once communication has occurred. | |
bool | isLocal |
Is the signal in one simulation independent of other simulations? | |