16#ifndef PE_Groups_included
17#define PE_Groups_included
19#include <TRUSTTabs_forward.h>
20#include <TRUST_Vector.h>
21#include <TRUST_Deriv.h>
22#include <Comm_Group.h>
36 static void create_group(
const ArrOfInt& liste_pe, OWN_PTR(
Comm_Group) &group,
int force_Comm_Group_NoParallel = 0);
55 static int check_current_group();
66 assert(check_current_group());
67 return *current_group_;
: This class describes a group of processors on which
This class groups functions for creating, destroying and changing the active processor group.
static void initialize_user_defined_group(const Comm_Group &ngrp)
static int enter_group(const Comm_Group &group)
If the local processor belongs to the group, the current group for this processor becomes "group" and...
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).
static void init_group(const ArrOfInt &liste_pe, OWN_PTR(Comm_Group) &group)
Initializes a new processor group that is already instantiated (can be called anywhere in the code).
static void initialize_node_master(const Comm_Group &ngrp)
Method to call after the initialization of trio_u_world, node_group, and TRUST's statistical counters...
static const int & get_nb_groups()
static void finalize()
Method to call at the end of execution, once back in groupe_TRUST() and just before destroying the ma...
static const Comm_Group & get_node_master()
Returns the group containing the master of my node.
static void initialize(const Comm_Group &groupe_trio_u)
Method to call at the beginning of execution (MAIN.cpp). Initializes current_group() with groupe_trio...
static void initialize_node(const Comm_Group &ngrp)
Method to call after the initialization of trio_u_world and TRUST's statistical counters.
static const Comm_Group & get_user_defined_group()
Returns a reference to the user-defined group.
static const Comm_Group & get_node_group()
Returns a reference to the node-level communicator group.
static bool has_user_defined_group()
static const Comm_Group & current_group()
Returns a reference to the current active processor group.
static int rank_translate(int rank, const Comm_Group &group, const Comm_Group &dest_group=current_group())
Computes the rank in the current group of the processor with rank "rank" in "group".
static const Comm_Group & groupe_TRUST()
Returns a reference to the group containing all TRUST processors.
static void exit_group()
Returns to the group that was active before the last successful enter_group() call (which returned 1)...