Fix out of sync checkpoint files in simulations sharing state
authorMagnus Lundborg <lundborg.magnus@gmail.com>
Wed, 19 Feb 2020 12:17:14 +0000 (13:17 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 25 Feb 2020 17:43:30 +0000 (18:43 +0100)
commitade8e131253c001acf53dd5d22796828569a757f
tree5aee11c6cb5bfef39f3c2d92d1077056b36cdb9b
parent1a7301b810f1257e0f9a3bb33fdc5a538c2ce2bb
Fix out of sync checkpoint files in simulations sharing state

When multidir simulations share the state, the checkpoint files
of the different simulations should all be from the same step.
To ensure this, MPI barriers have been added before renaming
the checkpoint files from their temporary to their final names.
So now the contents can never be out of sync. In the worst, and
rather unlikely, case that something going wrong during renaming,
some checkpoint files could have temporary and some final names.

Refs #2440.

Change-Id: I88088abb726a36dbf9a9db2fa2eb4a46c3bf2cd7
12 files changed:
docs/release-notes/2020/2020.1.rst
src/gromacs/fileio/checkpoint.cpp
src/gromacs/fileio/checkpoint.h
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/mdoutf.h
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/modularsimulator/modularsimulator.cpp
src/gromacs/modularsimulator/trajectoryelement.cpp
src/gromacs/modularsimulator/trajectoryelement.h