Gromacs  2016.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
gmx::test::TerminationHelper Class Reference

#include <programs/mdrun/tests/terminationhelper.h>

+ Collaboration diagram for gmx::test::TerminationHelper:

Description

Help test mdrun termination behaviour.

This helper class provides re-usable code to ensure that some termination behaviour of mdrun works. It runs a simulation that stops after a very short -maxh time, writes a checkpoint, checks that the checkpoint exists, and then restarts with it (probably doing no MD steps in the restart).

Todo:
This approach is not very elegant, but "stuff doesn't segfault or give a fatal error" is a useful result. We can improve it when we can mock out more do_md() functionality. Before that, we'd probably prefer not to run this test case in per-patchset verification, but this is the best we can do for now.

Public Member Functions

 TerminationHelper (TestFileManager *fileManager, CommandLine *mdrunCaller, SimulationRunner *runner)
 Constructor.
 
void runFirstMdrun (const std::string &expectedCptFileName)
 Do a short simulation, likely terminated by -maxh. More...
 
void runSecondMdrun ()
 Check that the restart works, but don't do any more MD steps.
 

Protected Attributes

CommandLinemdrunCaller_
 Object to help call mdrun.
 
SimulationRunnerrunner_
 Object to coordinate running a simulation.
 

Member Function Documentation

void gmx::test::TerminationHelper::runFirstMdrun ( const std::string &  expectedCptFileName)

Do a short simulation, likely terminated by -maxh.

Parameters
[in]expectedCptFileNameThe name of the checkpoint file that mdrun will write (which has to be customizable, if we are testing a multi-simulation).

The documentation for this class was generated from the following files: