8#include <ryujin/base/compile_time_options.h>
11#include <deal.II/base/mpi.h>
12#include <deal.II/base/utilities.h>
44 const int n_ensembles = 1,
45 const bool global_synchronization =
true);
102 DEAL_II_ALWAYS_INLINE
inline const MPI_Comm &
105 if (global_synchronization_)
106 return world_communicator_;
108 return ensemble_communicator_;
134 const MPI_Comm world_communicator_;
136 bool global_synchronization_;
143 int n_ensemble_ranks_;
145 MPI_Group world_group_;
146 std::vector<MPI_Group> ensemble_groups_;
147 MPI_Group ensemble_leader_group_;
149 MPI_Comm ensemble_communicator_;
150 MPI_Comm ensemble_leader_communicator_;
151 MPI_Comm peer_communicator_;
ACCESSOR_READ_ONLY_NO_DEREFERENCE(ensemble_leader_communicator)
ACCESSOR_READ_ONLY(n_ensembles)
ACCESSOR_READ_ONLY_NO_DEREFERENCE(peer_communicator)
ACCESSOR_READ_ONLY(n_ensemble_ranks)
std::string base_name(const std::string &base_name) const
ACCESSOR_READ_ONLY_NO_DEREFERENCE(world_communicator)
MPIEnsemble(const MPI_Comm &mpi_communicator, const int n_ensembles=1, const bool global_synchronization=true)
ACCESSOR_READ_ONLY_NO_DEREFERENCE(ensemble_communicator)
ACCESSOR_READ_ONLY(ensemble)
ACCESSOR_READ_ONLY(global_synchronization)
DEAL_II_ALWAYS_INLINE const MPI_Comm & synchronization_communicator() const
ACCESSOR_READ_ONLY(ensemble_rank)
ACCESSOR_READ_ONLY(world_rank)
ACCESSOR_READ_ONLY(n_world_ranks)