Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::Mdrunner Class Reference

#include <programs/mdrun/runner.h>

Description

Runner object for supporting setup and execution of mdrun.

This class has responsibility for the lifetime of data structures that exist for the life of the simulation, e.g. for logging and communication.

Todo:
Most of the attributes should be declared by specific modules as command-line options. Accordingly, they do not conform to the naming scheme, because that would make for a lot of noise in the diff, only to have it change again when the options move to their modules.
Todo:
Preparing logging and MPI contexts could probably be a higher-level responsibility, so that an Mdrunner would get made without needing to re-initialize these components (as currently happens always for the master rank, and differently for the spawned ranks with thread-MPI).

Public Member Functions

 Mdrunner ()=default
 Defaulted constructor. More...
 
int mainFunction (int argc, char *argv[])
 Start running mdrun by calling its C-style main function.
 
int mdrunner ()
 Driver routine, that calls the different simulation methods.
 
t_commrec * spawnThreads (int numThreadsToLaunch)
 Called when thread-MPI spawns threads. More...
 
void reinitializeOnSpawnedThread ()
 Re-initializes the object after threads spawn. More...
 

Constructor & Destructor Documentation

gmx::Mdrunner::Mdrunner ( )
default

Defaulted constructor.

Note that when member variables are not present in the constructor member initialization list (which is true for the default constructor), then they are initialized with any default member initializer specified when they were declared, or default initialized.

Member Function Documentation

void gmx::Mdrunner::reinitializeOnSpawnedThread ( )

Re-initializes the object after threads spawn.

Todo:
Can this be refactored so that the Mdrunner on a spawned thread is constructed ready to use?
t_commrec * gmx::Mdrunner::spawnThreads ( int  numThreadsToLaunch)

Called when thread-MPI spawns threads.

Start thread-MPI threads.

Called by mdrunner() to start a specific number of threads (including the main thread) for thread-parallel runs. This in turn calls mdrunner() for each thread. All options are the same as for mdrunner().


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