Implement modular checkpointing
commitac34f147f63fe2d377b104872d898861f926bfd2
authorPascal Merz <pascal.merz@me.com>
Wed, 16 Sep 2020 07:34:44 +0000 (16 07:34 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 16 Sep 2020 07:34:44 +0000 (16 07:34 +0000)
tree7f8d50f616640bbd96442293f0dd7124c9fdaf33
parentc5378b37b77d491d93470fe5e23cb0d6e3c4f2e4
Implement modular checkpointing

Using the CheckpointData format introduced in a parent commit, this
rewrites checkpointing for the modular simulator to completely use
the new format.

The CheckpointHelper is now passing a CheckpointData object to its
clients (instead of a legacy t_state object). Clients are now stored
in a map, as they are identified by their unique key to be able to
assign the correct CheckpointData sub-objects at reading and writing.

If checkpoint reading occured, the newly introduced
CheckpointHelperBuilder receives the CheckpointData object read at the
runner level from the ModularSimulator. It then initializes its clients
with their respective, read-only CheckpointData subobjects.

The ICheckpointHelperClient interface is adapted to reflect above
changes.

The ModularSimulatorAlgorithmBuilder is slightly simplified thanks to
to the introduction of a proper builder for the CheckpointHelper.

The ComputeGlobalsElement is simplified, as it is not required to know
about the needs of communication of the EnergyData object which
depends on checkpoint reading.

Finally, all elements which are checkpoint clients are updated to
implement the new design. Note that they all introduce their own
checkpoint versioning, as the data being checkpointed is opaque to the
checkpointing infrastructure.

Closes #3517
Closes #3422
In partial fulfillment of #3419
23 files changed:
src/gromacs/fileio/checkpoint.cpp
src/gromacs/mdrun/simulatorbuilder.h
src/gromacs/mdtypes/checkpointdata.h
src/gromacs/mdtypes/energyhistory.cpp
src/gromacs/mdtypes/state.cpp
src/gromacs/modularsimulator/checkpointhelper.cpp
src/gromacs/modularsimulator/checkpointhelper.h
src/gromacs/modularsimulator/computeglobalselement.cpp
src/gromacs/modularsimulator/computeglobalselement.h
src/gromacs/modularsimulator/energydata.cpp
src/gromacs/modularsimulator/energydata.h
src/gromacs/modularsimulator/freeenergyperturbationdata.cpp
src/gromacs/modularsimulator/freeenergyperturbationdata.h
src/gromacs/modularsimulator/modularsimulator.cpp
src/gromacs/modularsimulator/modularsimulatorinterfaces.h
src/gromacs/modularsimulator/parrinellorahmanbarostat.cpp
src/gromacs/modularsimulator/parrinellorahmanbarostat.h
src/gromacs/modularsimulator/simulatoralgorithm.cpp
src/gromacs/modularsimulator/simulatoralgorithm.h
src/gromacs/modularsimulator/statepropagatordata.cpp
src/gromacs/modularsimulator/statepropagatordata.h
src/gromacs/modularsimulator/vrescalethermostat.cpp
src/gromacs/modularsimulator/vrescalethermostat.h