Gromacs  2021.1
 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>


Coordinate multi-simulation resources for mdrun.

Change this to class

Public Member Functions

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

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 mastersComm_ = MPI_COMM_NULL
 The MPI communicator between master ranks of simulations, valid only on master ranks.
MPI_Comm simulationComm_ = MPI_COMM_NULL
 The MPI communicator between ranks of this simulation.
std::vector< int > intBuffer_
 Communication buffers needed if MPI_IN_PLACE isn't supported. More...
std::vector< int64_t > int64Buffer_

Constructor & Destructor Documentation

gmx_multisim_t::gmx_multisim_t ( int  numSimulations,
int  simulationIndex,
MPI_Comm  mastersComm,
MPI_Comm  simulationComm 


[in]numSimulationsThe number of simulations in the MPI world.
[in]simulationIndexThe index of this simulation in the set of simulations.
[in]mastersCommOn master ranks, the communicator among master 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.

Member Data Documentation

std::vector<int> gmx_multisim_t::intBuffer_

Communication buffers needed if MPI_IN_PLACE isn't supported.

Other types could be added as needed.

These vectors are unused when MPI_IN_PLACE is available and could be removed with preprocessing (or perhaps templating) or simply requiring MPI 2.0 (the standard introduced in 1997). However, the additional cache pressure introduced by the extra size of this type is not of great concern, since we have at most one per MPI rank. See issue #3591.

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