PE_Groups#

#include <PE_Groups.h>
Brief description

: Cette classe regroupe des fonctions permettant la creation, la

How to reference this class#

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`PE\_Groups <class-pe-groups>`
[PE\_Groups](#class-pe-groups)

Detailed description#

destruction et le changement du groupe de processeurs actif. La creation du groupe principal doit etre dans le MAIN.cpp et il faut initialiser PE_Groups en lui donnant le groupe principal. Les autres groupes crees seront du meme type.

List of Public Static Methods#

List of Private Static Methods#

Complete Member Function Documentation#

create_group#

Definition
void PE_Groups::create_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group, int force_Comm_Group_NoParallel=0)
Brief description

Creation d’un nouveau groupe de processeurs (utilisation possible n’importe ou dans le code)

Detailed description

Il faut l’appeler simultanement sur tous les processeurs du groupe current_group() avec le meme tableau liste_pe. liste_pe est la liste des rangs dans le groupe courant des processeurs que l’on veut inclure dans le groupe. Le premier de la liste sera le maitre du groupe. La liste ne doit pas comporter de doublon et doit contenir au moins un processeur. La methode type et initialize l’objet group. Il faut ensuite appeler enter_group() et exit_group() (autant de fois qu’on veut)

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::create_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group, int force_Comm_Group_NoParallel=0) <pe-groups-public-static-void-pe-groups-create-group-const-arrofint-ref-liste-pe-trust-deriv-comm-group-ref-group-int-force-comm-group-noparallel-equal-0>`
[void PE_Groups::create_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group, int force_Comm_Group_NoParallel=0)](#pe-groups-public-static-void-pe-groups-create-group-const-arrofint-ref-liste-pe-trust-deriv-comm-group-ref-group-int-force-comm-group-noparallel-equal-0)

current_group#

Definition
const Comm_Group & PE_Groups::current_group()
Brief description

renvoie une reference au groupe de processeurs actif courant

Detailed description
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Comm_Group & PE_Groups::current_group() <pe-groups-public-static-const-comm-group-ref-pe-groups-current-group>`
[const Comm_Group & PE_Groups::current_group()](#pe-groups-public-static-const-comm-group-ref-pe-groups-current-group)

enter_group#

Definition
int PE_Groups::enter_group(const Comm_Group &group)
Brief description

Si le processeur local appartient au groupe, le groupe courant pour ce processeur devient “group” et on renvoie 1, sinon on renvoie 0.

Detailed description

Une reference au groupe actuel est sauvegardee et sera restauree quand on appellera exit_group() . Cette methode doit etre appelee simultanement sur tous les processeurs du groupe “group”. Attention: a chaque enter_group() doit correspondre un exit_group() . Cependant, il n’est pas interdit d’entrer plusieurs fois de suite dans le meme groupe, ni d’entrer dans un groupe plus grand que le groupe actuel. Exemple : group1 et group2 forment une partition du groupe_TRUST() int sync_point(int x) { PE_Groups::enter_group(groupe_TRUST()); int i = mp_sum(x); PE_Groups::exit_group() ; return i; } if (PE_Groups::enter_group(group1)) { s1 = mp_sum(x); // Somme sur le groupe 2 // Point de synchro avec l’autre groupe: s_all = sync_point(x); } else if (PE_Groups::enter_group(group2)) { s2 = mp_sum(x); // Point de synchro avec l’autre groupe: s_all = sync_point(x); } else { Cerr <<”Error: processor “ <<me() <<” is not within a subgroup.”; exit(); } PE_Groups::exit_group() ; // Sort du sous - groupe

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int PE_Groups::enter_group(const Comm_Group &group) <pe-groups-public-static-int-pe-groups-enter-group-const-comm-group-ref-group>`
[int PE_Groups::enter_group(const Comm_Group &group)](#pe-groups-public-static-int-pe-groups-enter-group-const-comm-group-ref-group)

exit_group#

Definition
void PE_Groups::exit_group()
Brief description

Retourne dans le groupe ou l’on etait avant le dernier enter_group() reussi (dont le resultat a ete 1).

Detailed description

Cette methode doit etre appelee simultanement sur tous les processeurs du current_group() actif juste avant exit_group() ).

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::exit_group() <pe-groups-public-static-void-pe-groups-exit-group>`
[void PE_Groups::exit_group()](#pe-groups-public-static-void-pe-groups-exit-group)

finalize#

Definition
void PE_Groups::finalize()
Brief description

Methode a appeler en fin d’execution, une fois qu’on est revenu dans le groupe_TRUST() et juste avant de detruire de Comm_Group .

Detailed description

principal.

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::finalize() <pe-groups-public-static-void-pe-groups-finalize>`
[void PE_Groups::finalize()](#pe-groups-public-static-void-pe-groups-finalize)

get_nb_groups#

Definition
const int & PE_Groups::get_nb_groups()
Brief description
Detailed description
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const int & PE_Groups::get_nb_groups() <pe-groups-public-static-const-int-ref-pe-groups-get-nb-groups>`
[const int & PE_Groups::get_nb_groups()](#pe-groups-public-static-const-int-ref-pe-groups-get-nb-groups)

get_node_group#

Definition
const Comm_Group & PE_Groups::get_node_group()
Brief description

Renvoie une reference au groupe sur les noeuds.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Comm_Group & PE_Groups::get_node_group() <pe-groups-public-static-const-comm-group-ref-pe-groups-get-node-group>`
[const Comm_Group & PE_Groups::get_node_group()](#pe-groups-public-static-const-comm-group-ref-pe-groups-get-node-group)

get_node_master#

Definition
const Comm_Group & PE_Groups::get_node_master()
Brief description

Renvoie le groupe contenant le maitre de mon noeud.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Comm_Group & PE_Groups::get_node_master() <pe-groups-public-static-const-comm-group-ref-pe-groups-get-node-master>`
[const Comm_Group & PE_Groups::get_node_master()](#pe-groups-public-static-const-comm-group-ref-pe-groups-get-node-master)

groupe_TRUST#

Definition
const Comm_Group & PE_Groups::groupe_TRUST()
Brief description

Renvoie une reference au groupe de tous les processeurs TRUST.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Comm_Group & PE_Groups::groupe_TRUST() <pe-groups-public-static-const-comm-group-ref-pe-groups-groupe-trust>`
[const Comm_Group & PE_Groups::groupe_TRUST()](#pe-groups-public-static-const-comm-group-ref-pe-groups-groupe-trust)

init_group#

Definition
void PE_Groups::init_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group)
Brief description

Initialisation d’un nouveau groupe de processeurs deja instantie (utilisation possible n’importe ou dans le code)

Detailed description

Il faut l’appeler simultanement sur tous les processeurs du groupe current_group() avec le meme tableau liste_pe. liste_pe est la liste des rangs dans le groupe courant des processeurs que l’on veut inclure dans le groupe. Le premier de la liste sera le maitre du groupe. La liste ne doit pas comporter de doublon et doit contenir au moins un processeur. La methode type et initialize l’objet group. Il faut ensuite appeler enter_group() et exit_group() (autant de fois qu’on veut)

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::init_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group) <pe-groups-public-static-void-pe-groups-init-group-const-arrofint-ref-liste-pe-trust-deriv-comm-group-ref-group>`
[void PE_Groups::init_group(const ArrOfInt &liste_pe, TRUST_Deriv< Comm_Group > &group)](#pe-groups-public-static-void-pe-groups-init-group-const-arrofint-ref-liste-pe-trust-deriv-comm-group-ref-group)

initialize#

Definition
void PE_Groups::initialize(const Comm_Group &groupe_trio_u)
Brief description

Methode a appeler au debut de l’execution (MAIN.

Detailed description

cpp) Elle initialise current_group() avec groupe_trio_u

Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::initialize(const Comm_Group &groupe_trio_u) <pe-groups-public-static-void-pe-groups-initialize-const-comm-group-ref-groupe-trio-u>`
[void PE_Groups::initialize(const Comm_Group &groupe_trio_u)](#pe-groups-public-static-void-pe-groups-initialize-const-comm-group-ref-groupe-trio-u)

initialize_node#

Definition
void PE_Groups::initialize_node(const Comm_Group &ngrp)
Brief description

Methode a appeler apres l’initialisation de trio_u_world et l’initialisation des compteurs statistiques de TRUST.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::initialize_node(const Comm_Group &ngrp) <pe-groups-public-static-void-pe-groups-initialize-node-const-comm-group-ref-ngrp>`
[void PE_Groups::initialize_node(const Comm_Group &ngrp)](#pe-groups-public-static-void-pe-groups-initialize-node-const-comm-group-ref-ngrp)

initialize_node_master#

Definition
void PE_Groups::initialize_node_master(const Comm_Group &ngrp)
Brief description

Methode a appeler apres l’initialisation de trio_u_world et de node_group et l’initialisation des compteurs statistiques de TRUST.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void PE_Groups::initialize_node_master(const Comm_Group &ngrp) <pe-groups-public-static-void-pe-groups-initialize-node-master-const-comm-group-ref-ngrp>`
[void PE_Groups::initialize_node_master(const Comm_Group &ngrp)](#pe-groups-public-static-void-pe-groups-initialize-node-master-const-comm-group-ref-ngrp)

rank_translate#

Definition
int PE_Groups::rank_translate(int rank, const Comm_Group &group, const Comm_Group &dest_group=current_group())
Brief description

Calcule le rank dans le groupe courant du processeur de rang “rank” dans le “group”.

Detailed description

Il faut que 0 < = rank <group.nproc() Si le processeur en question n’appartient pas au groupe courant, renvoie-1.

Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int PE_Groups::rank_translate(int rank, const Comm_Group &group, const Comm_Group &dest_group=current_group()) <pe-groups-public-static-int-pe-groups-rank-translate-int-rank-const-comm-group-ref-group-const-comm-group-ref-dest-group-equal-current-group>`
[int PE_Groups::rank_translate(int rank, const Comm_Group &group, const Comm_Group &dest_group=current_group())](#pe-groups-public-static-int-pe-groups-rank-translate-int-rank-const-comm-group-ref-group-const-comm-group-ref-dest-group-equal-current-group)

check_current_group#

Definition
int PE_Groups::check_current_group()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int PE_Groups::check_current_group() <pe-groups-private-static-int-pe-groups-check-current-group>`
[int PE_Groups::check_current_group()](#pe-groups-private-static-int-pe-groups-check-current-group)

Attributes Documentation#

current_group_ (private)
const Comm_Group * PE_Groups::current_group_ = 0