52 : internalComm_(mpiComm), level_(0), groupBegin_(), nbInGroup_(), computed_(false)
72 for(
int i=0;i<maxChild;++i) m *= maxChild;
76 for(
int size=1; size<=mpiSize; size*=maxChild) ++maxLevel;
90 while (nb>2 && (
level_<maxLevel))
94 for(
int i=0;i<maxChild && i<nb;i++)
96 if (i<nb%maxChild) n = nb/maxChild + 1;
99 if (mpiRank>=pos && mpiRank<pos+n)
105 nbInGroupParents_[
level_-1][idx] = n;
118 nbInGroupParents_[
level_-1][i] = 1;
Some useful policies for templated classes.
bool computed_
Number of process in each group.
void computeMPICommLevel()
std::vector< int > nbInGroup_
Rank beginning of a group.
const MPI_Comm & internalComm_
DivideAdaptiveComm(const MPI_Comm &mpiComm)
Calculate MPI communicator for each level of hierarchy.
std::vector< int > groupBegin_
std::vector< std::vector< int > > groupParentsBegin_
std::vector< std::vector< int > > nbInGroupParents_