Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx_multisim_t Struct Reference

#include <gromacs/mdrunutility/multisim.h>

Description

Coordinate multi-simulation resources for mdrun.

Todo:
Change this to class

Public Member Functions

 gmx_multisim_t (int numSimulations, int simulationIndex, MPI_Comm mainsComm, MPI_Comm simulationComm)
 Constructor. More...
 
 ~gmx_multisim_t ()
 Destructor.
 

Public Attributes

int numSimulations_ = 1
 The number of simulations in the set of multi-simulations.
 
int simulationIndex_ = 0
 The index of the simulation that owns this object within the set.
 
MPI_Comm mainRanksComm_ = MPI_COMM_NULL
 The MPI communicator between main ranks of simulations, valid only on main ranks.
 
MPI_Comm simulationComm_ = MPI_COMM_NULL
 The MPI communicator between ranks of this simulation.
 

Constructor & Destructor Documentation

gmx_multisim_t::gmx_multisim_t ( int  numSimulations,
int  simulationIndex,
MPI_Comm  mainsComm,
MPI_Comm  simulationComm 
)

Constructor.

Parameters
[in]numSimulationsThe number of simulations in the MPI world.
[in]simulationIndexThe index of this simulation in the set of simulations.
[in]mainsCommOn main ranks, the communicator among main ranks; otherwise MPI_COMM_NULL.
[in]simulationCommThe communicator among ranks of this simulation.

Assumes ownership of the communicators if they are neither MPI_COMM_WORLD nor MPI_COMM_NULL. If so, upon destruction will call MPI_Comm_free on them.


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