Introduce checkpoint handler
commit71ec6f9d201312a6552657501d15d9c474d46448
authorPascal Merz <pascal.merz@colorado.edu>
Tue, 28 Aug 2018 21:06:55 +0000 (28 15:06 -0600)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 18 Sep 2018 11:20:19 +0000 (18 13:20 +0200)
treec147327bd6a521f4a71169ab276ea0b2e598b629
parent0e16db6d7d8b099221ab9c7f08cc2225cf1edc99
Introduce checkpoint handler

This change introduces a checkpoint handler which encapsulates the
setting and handling of checkpoint signals, and owns the bCPT boolean.
This cleans up the do_md loop, exchanging several lines of code by
a single command. It also makes a step towards a task-based design by
only calling the internal functions when necessary (if checkpointing
is enabled, signal setting only on master), and by owning as much
data as possible.

Refs #1793

Change-Id: I05ca7abc9e81c9a8deacb6b81086e1077524d005
src/gromacs/mdlib/checkpointhandler.cpp [new file with mode: 0644]
src/gromacs/mdlib/checkpointhandler.h [new file with mode: 0644]
src/gromacs/mdlib/mdrun.h
src/gromacs/mdlib/trajectory_writing.cpp
src/gromacs/mdlib/trajectory_writing.h
src/gromacs/mdrun/md.cpp