Provides interface to MPI Communicators. More...
Inheritance diagram for Feel::WorldComm:
Collaboration diagram for Feel::WorldComm:Public Types | |
| typedef boost::mpi::communicator | communicator_type |
| underlying MPI communicator type | |
| typedef std::shared_ptr< WorldComm > | self_ptrtype |
std::shared_ptr type | |
| typedef WorldComm | self_type |
| self type | |
| using | worldcomm_ptr_t = std::shared_ptr< WorldComm > |
| using | worldcomm_t = WorldComm |
| using | worldscomm_ptr_t = std::vector< worldcomm_ptr_t > |
Public Member Functions | |
| std::vector< int > const & | activityOnWorld () const |
| Returns the vector of activity in this world. | |
| void | applyActivityOnlyOn (int _localColor) const |
| worldcomm_ptr_t | clone () const |
| communicator_type const & | comm () const |
| Returns the local WorldComm,. More... | |
| communicator_type const & | globalComm () const |
| Returns the current WorldComm. | |
| rank_type | globalRank () const |
| Returns the rank in the global WorldComm. | |
| rank_type | globalSize () const |
| communicator_type const & | godComm () const |
| rank_type | godRank () const |
| Returns the rank in the God WorldComm. | |
| rank_type | godSize () const |
| boost::tuple< bool, std::set< int > > | hasMultiLocalActivity () const |
| bool | hasSubWorlds (int n) const |
| void | init (int color=0, bool colormap=false) |
| bool | isActive () const |
Returns true if current worldcomm is active in God worldcomm. | |
| bool | isActive (int rank) const |
Returns true if worldcomm rank is active in God worldcomm. | |
| bool | isMasterRank () const |
Returns true if process has master rank, false otherwise. | |
| rank_type | localColorToGlobalRank (int _color, int _localRank) const |
| communicator_type const & | localComm () const |
| Returns the local WorldComm. | |
| rank_type | localRank () const |
| Returns the rank in the local WorldComm. | |
| rank_type | localSize () const |
| std::vector< int > const & | mapColorWorld () const |
the colormap of the worldcomm by default the colormap set all processes to the same color 0 More... | |
| int | mapColorWorld (int k) const |
| the k-th entry of the colormap More... | |
| std::vector< rank_type > const & | mapGlobalRankToGodRank () const |
| vector that translates the global rank ids to god rank ids More... | |
| rank_type | mapGlobalRankToGodRank (int k) const |
| std::vector< rank_type > const & | mapLocalRankToGlobalRank () const |
| vector that translates the local rank ids to global rank ids More... | |
| rank_type | mapLocalRankToGlobalRank (int k) const |
| rank_type | masterRank () const |
| get the master rank The master rank is set to be the process with the minimal rank in the worldcomm More... | |
| worldcomm_t & | masterWorld (int n) |
| int | numberOfSubWorlds () const |
| worldcomm_ptr_t | operator+ (WorldComm const &_worldComm) const |
| WorldComm & | operator= (WorldComm const &wc) |
| copy a worldcomm | |
| bool | operator== (WorldComm const &wc) const |
| comparison of worldcomm | |
| void | print (std::string const &text, bool sync=false, bool print_to_cout=false, bool flush=false) |
| print text on the worldcomm More... | |
| void | registerSubWorlds (int n) const |
register sub worlds associated to worldmap | |
| void | registerSubWorldsGroupBySubspace (int n) |
| communicator_type const & | selfComm () const |
| void | setColorMap (std::vector< int > const &colormap) |
| void | setIsActive (std::vector< int > const &_isActive) const |
| void | showMe (std::ostream &__out=std::cout) const |
prints information on out on the WorldComm | |
| std::tuple< int, worldcomm_ptr_t, worldcomm_ptr_t > | split (int n) const |
| split the worldcomm into n sub worldcomm More... | |
| worldcomm_ptr_t | subWorld (int n) |
| worldcomm_ptr_t | subWorld (int n) const |
| worldcomm_t & | subWorldComm () |
get the sub worldcomm associated to color globalRank() in the colormap More... | |
| worldcomm_t const & | subWorldComm () const |
get the sub worldcomm associated to color globalRank() in the colormap More... | |
| worldcomm_ptr_t | subWorldComm (int color) const |
get the sub worldcomm shared_ptr associated to color color in the colormap More... | |
| worldcomm_ptr_t | subWorldComm (int color, std::vector< int > const &colormap) |
get the sub worldcomm shared_ptr associated to color color in the colormap More... | |
| worldcomm_t & | subWorldComm (std::vector< int > const &colormap) |
get the sub worldcomm shared_ptr associated to color globalRank() in the colormap More... | |
| worldcomm_ptr_t | subWorldCommPtr () |
get the sub worldcomm shared_ptr associated to color globalRank() in the colormap More... | |
| WorldComm & | subWorldCommSeq () |
| Returns the sequential sub worldcomm. | |
| WorldComm const & | subWorldCommSeq () const |
| Returns the sequential sub worldcomm. | |
| worldcomm_ptr_t & | subWorldCommSeqPtr () |
| Returns the sequential sub worldcomm. | |
| worldcomm_ptr_t const & | subWorldCommSeqPtr () const |
| Returns the sequential sub worldcomm. | |
| int | subWorldId (int n) const |
| worldscomm_ptr_t & | subWorlds (int n) |
| worldscomm_ptr_t const & | subWorlds (int n) const |
| worldscomm_ptr_t & | subWorldsGroupBySubspace (int n) |
| WorldComm () | |
| Default constructor. | |
| WorldComm (communicator_type const &_globalComm, communicator_type const &_godComm, int _localColor, int localRank, std::vector< int > const &isActive) | |
| WorldComm (communicator_type const &_globalComm, communicator_type const &_localComm, communicator_type const &_godComm, int _localColor, std::vector< int > const &isActive) | |
| WorldComm (communicator_type const &_globalComm, int _color, bool _isActive) | |
| WorldComm (int _color) | |
build a sub WorldComm from a _color a colormap is set based on the globalRank() of the processes More... | |
| WorldComm (int _colorLocal, int localRank, int _colorGlobal, int globalRank, communicator_type const &_godComm, bool _isActive, bool _doInitActiveMap=true) | |
| WorldComm (std::vector< int > const &_colorWorld) | |
Creates a sub WorldComm from a set of colors _colorWorld. More... | |
| WorldComm (std::vector< int > const &_colorWorld, int localRank, communicator_type const &_globalComm=communicator_type(), communicator_type const &_godComm=communicator_type()) | |
| WorldComm (super const &) | |
constructor from an boost::mpi::communicator | |
| WorldComm (WorldComm const &_wc) | |
Static Public Member Functions | |
| static self_ptrtype | New () |
| static self_ptrtype | New (super const &s) |
Provides interface to MPI Communicators.
|
explicit |
build a sub WorldComm from a _color a colormap is set based on the globalRank() of the processes
WorldComm to get the sub WorldComm, rather use member function subWorldComm( _color ) on this WorldComm | _color | color to use to generate the WorldComm: |
| Feel::WorldComm::WorldComm | ( | std::vector< int > const & | _colorWorld | ) |
Creates a sub WorldComm from a set of colors _colorWorld.
WorldComm to get the sub WorldComm, rather use member function subWorldComm( _color ) on this WorldComm | communicator_type const & Feel::WorldComm::comm | ( | ) | const |
| std::vector< int > const & Feel::WorldComm::mapColorWorld | ( | ) | const |
the colormap of the worldcomm by default the colormap set all processes to the same color 0
Referenced by operator==(), showMe(), split(), subWorldComm(), and subWorldCommPtr().
the k-th entry of the colormap
| k | the index of the process |
| std::vector< rank_type > const & Feel::WorldComm::mapGlobalRankToGodRank | ( | ) | const |
vector that translates the global rank ids to god rank ids
Referenced by operator==(), showMe(), and subWorldComm().
| std::vector< rank_type > const & Feel::WorldComm::mapLocalRankToGlobalRank | ( | ) | const |
vector that translates the local rank ids to global rank ids
Referenced by operator==(), showMe(), and subWorldComm().
| rank_type Feel::WorldComm::masterRank | ( | ) | const |
get the master rank The master rank is set to be the process with the minimal rank in the worldcomm
Referenced by Feel::PsLogger::log(), operator==(), and showMe().
| void Feel::WorldComm::print | ( | std::string const & | text, |
| bool | sync = false, |
||
| bool | print_to_cout = false, |
||
| bool | flush = false |
||
| ) |
print text on the worldcomm
| text | text to print |
| sync | whether to synchronize the worldcomm before printing and after |
| print_to_cout | print to standard output |
| flush | flush log files |
split the worldcomm into n sub worldcomm
| n | number of sub worldcomm |
References mapColorWorld(), and Feel::rank().
| worldcomm_t & Feel::WorldComm::subWorldComm | ( | ) |
get the sub worldcomm associated to color globalRank() in the colormap
References globalRank(), mapColorWorld(), and subWorldComm().
Referenced by subWorldComm(), and subWorldCommPtr().
| worldcomm_t const & Feel::WorldComm::subWorldComm | ( | ) | const |
get the sub worldcomm associated to color globalRank() in the colormap
References globalRank(), mapColorWorld(), and subWorldComm().
| worldcomm_ptr_t Feel::WorldComm::subWorldComm | ( | int | color | ) | const |
get the sub worldcomm shared_ptr associated to color color in the colormap
| color | color (in the worldcomm colormap) to be used to generate the worldcomm |
References globalRank(), isActive(), localComm(), mapColorWorld(), mapGlobalRankToGodRank(), and mapLocalRankToGlobalRank().
get the sub worldcomm shared_ptr associated to color color in the colormap
| color | color in the colormap to be used to generate the worldcomm |
| colormap | colormap to be set in worlcomm to generate the sub worldcomm |
References subWorldComm().
| worldcomm_t & Feel::WorldComm::subWorldComm | ( | std::vector< int > const & | colormap | ) |
get the sub worldcomm shared_ptr associated to color globalRank() in the colormap
| colormap | colormap to be set in worlcomm to generate the sub worldcomm |
References subWorldComm().
| worldcomm_ptr_t Feel::WorldComm::subWorldCommPtr | ( | ) |
get the sub worldcomm shared_ptr associated to color globalRank() in the colormap
References globalRank(), mapColorWorld(), and subWorldComm().