ryujin 2.1.1 revision 955e869188d49b3c97ca7b1cf4fd9ceb0e6f46ef
|
#include <source/mpi_ensemble.h>
Public Member Functions | |
MPIEnsemble (const MPI_Comm &mpi_communicator, const int n_ensembles=1, const bool global_synchronization=true) | |
~MPIEnsemble () | |
const auto & | world_communicator () const |
const auto & | global_synchronization () const |
const auto & | world_rank () const |
const auto & | n_world_ranks () const |
const auto & | ensemble () const |
const auto & | n_ensembles () const |
const auto & | ensemble_rank () const |
const auto & | n_ensemble_ranks () const |
const auto & | ensemble_communicator () const |
DEAL_II_ALWAYS_INLINE const MPI_Comm & | synchronization_communicator () const |
const auto & | ensemble_leader_communicator () const |
const auto & | peer_communicator () const |
A class responsible for subdividing a given global MPI communicator into a set of "ensembles" with a coresponding ensemble communicator. This allows us to run similar, related hyperbolic systems in parallel on subranges of the set of (global) MPI processes.
After prepare()
is called, all getter functions return valid references.
Definition at line 28 of file mpi_ensemble.h.
ryujin::MPIEnsemble::MPIEnsemble | ( | const MPI_Comm & | mpi_communicator, |
const int | n_ensembles = 1 , |
||
const bool | global_synchronization = true |
||
) |
Prepare the MPI ensemble and split the gobal MPI communicator into n_ensembles
different subranges of comparable size. The boolean global_synchronization
indicates whether (global) world synchronization of time step size and other synchronization state is performend in the HyperbolicModule and ParabolicModule, or whether such synchronization remains local to the ensemble.
ryujin::MPIEnsemble::~MPIEnsemble | ( | ) |
|
inline |
Return the world communicator.
Definition at line 51 of file mpi_ensemble.h.
|
inline |
If true, then ensembles run in lockstep with a synchronized tau_max.
Definition at line 56 of file mpi_ensemble.h.
|
inline |
The (global) world rank of the current MPI process.
Definition at line 61 of file mpi_ensemble.h.
|
inline |
The total number of (global) MPI processes.
Definition at line 66 of file mpi_ensemble.h.
|
inline |
Return the ensemble in the interval [0, n_ensembles) that the given MPI process belongs to.
Definition at line 72 of file mpi_ensemble.h.
Referenced by ryujin::MPIEnsembleContainer< T >::MPIEnsembleContainer().
|
inline |
Return the total number of ensembles.
Definition at line 77 of file mpi_ensemble.h.
Referenced by ryujin::MPIEnsembleContainer< T >::MPIEnsembleContainer().
|
inline |
The (local) ensemble rank of the current MPI process.
Definition at line 82 of file mpi_ensemble.h.
|
inline |
The total number of (local) MPI processes belonging to the ensemble.
Definition at line 87 of file mpi_ensemble.h.
|
inline |
The corresponding subrange communicator of the ensemble. The communicator is collective over all ranks participating in the ensemble. I.e., it allows for ensemble-local communication.
Definition at line 94 of file mpi_ensemble.h.
|
inline |
Return a communicator for synchronization. The method either returns the (global) world communicator if global synchronization is enabled, or the (local) ensemble communicator.
Definition at line 102 of file mpi_ensemble.h.
|
inline |
A communicator spanning over all ensemble leaders that have ensemble rank 0. This communicator is collective over all ensemble leaders and invalid for all other ranks.
Definition at line 115 of file mpi_ensemble.h.
|
inline |
A "peer communicator" that groups all kth ranks of each ensemble together. (Suppose the ensemble_communicator() groups rows, then the peer_communicator() groups columns of the ensemble partition). The peer communicator is collective over all world ranks.
Definition at line 123 of file mpi_ensemble.h.