Gromacs
2025.0-dev-20241011-013a99c
|
#include <gromacs/mdrunutility/multisim.h>
Coordinate multi-simulation resources for mdrun.
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. | |
gmx_multisim_t::gmx_multisim_t | ( | int | numSimulations, |
int | simulationIndex, | ||
MPI_Comm | mainsComm, | ||
MPI_Comm | simulationComm | ||
) |
Constructor.
[in] | numSimulations | The number of simulations in the MPI world. |
[in] | simulationIndex | The index of this simulation in the set of simulations. |
[in] | mainsComm | On main ranks, the communicator among main ranks; otherwise MPI_COMM_NULL. |
[in] | simulationComm | The 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.