16#include <Comm_Group_MPI.h>
17#include <My_Comm_Group.h>
18#include <Comm_Group.h>
108 Process::exit(
"What !!! You need an MPI TRUST version to use My_Comm_Group !!!");
111 assert(!my_comm_group);
116 if (nb_groups > nb_procs)
117 nb_groups = nb_procs;
119 const int base_size = nb_procs / nb_groups;
120 const int extra = nb_procs % nb_groups;
126 for (
int i = 0; i < nb_groups; i++)
128 const int group_size = base_size + (i < extra ? 1 : 0);
130 if (rank >= count && rank < count + group_size)
132 ArrOfInt tab(group_size);
133 for (
int j = 0; j < group_size; j++)
151 assert(my_comm_group);
152 return my_comm_group.valeur();
: This class describes a group of processors on which
Class defining operators and methods for all reading operation in an input flow (file,...
Base class for "interpreter" objects.
Entree & interpreter(Entree &) override
static const Comm_Group & get_my_comm_group()
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void initialize_user_defined_group(const Comm_Group &ngrp)
static void create_group(const ArrOfInt &liste_pe, OWN_PTR(Comm_Group) &group, int force_Comm_Group_NoParallel=0)
Creates a new processor group (can be called anywhere in the code).
Helper class to factorize the readOn method of Objet_U classes.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
int lire_avec_accolades_depuis(Entree &is)
Parse the parameter block { ... } from is.
static int nproc()
Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current...
static int me()
Returns the rank of the local processor in the current communication group. See Comm_Group::rank() an...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static bool is_sequential()
Base class for output streams.