Gromacs  2025-dev-20241003-bd59e46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx::anonymous_namespace{handlerestart.cpp}::StartingBehaviorHandler Class Reference

Description

Describes how mdrun will (re)start and provides supporting functionality based on that data.

Public Member Functions

void ensureMultiSimBehaviorsMatch (const gmx_multisim_t *ms)
 Throw unless all simulations in a multi-sim restart the same way. More...
 
std::optional< int > makeIndexOfNextPart (AppendingBehavior appendingBehavior) const
 Return an optional value that describes the index of the next simulation part when not appending. More...
 

Public Attributes

StartingBehavior startingBehavior = StartingBehavior::NewSimulation
 Describes how mdrun will (re)start.
 
std::optional
< CheckpointHeaderContents
headerContents
 When restarting from a checkpoint, contains the contents of its header.
 
std::optional< std::vector
< gmx_file_position_t > > 
outputFiles
 When restarting from a checkpoint, contains the names of expected output files.
 

Member Function Documentation

void gmx::anonymous_namespace{handlerestart.cpp}::StartingBehaviorHandler::ensureMultiSimBehaviorsMatch ( const gmx_multisim_t ms)

Throw unless all simulations in a multi-sim restart the same way.

The restart could differ if checkpoint or other output files are not found in a consistent way across the set of multi-simulations, or are from different simulation parts.

Parameters
[in]msMulti-sim handler.

May only be called from the main rank of each simulation.

Exceptions
InconsistentInputErrorif either simulations restart differently, or from checkpoints from different simulation parts.
std::optional< int > gmx::anonymous_namespace{handlerestart.cpp}::StartingBehaviorHandler::makeIndexOfNextPart ( AppendingBehavior  appendingBehavior) const

Return an optional value that describes the index of the next simulation part when not appending.

Parameters
[in]appendingBehaviorWhether this simulation is appending (relevant only when restarting)

Does not throw


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