![]() |
PEARL
Parallel Event Access and Replay Library
|
Grouping set definition representation for defining a subgroup of Location definition objects from a communication location set. More...
#include <pearl/CommSet.h>
Public Member Functions | |
Constructors & destructor | |
CommSet (IdType id, const String &name, const Properties &properties, const CommLocationSet &commLocationSet, const std::vector< uint32_t > &ranks) | |
Constructor. More... | |
Query functions | |
virtual SetType | getType () const |
Get grouping set type. More... | |
Properties | getProperties () const |
Get grouping set properties. More... | |
const CommLocationSet & | getCommLocationSet () const |
Get communication location set. More... | |
Paradigm | getParadigm () const |
Get paradigm. More... | |
uint32_t | numRanks () const |
Get number of ranks. More... | |
uint32_t | getLocalRank (uint32_t globalRank) const |
Convert global to local rank. More... | |
uint32_t | getGlobalRank (uint32_t localRank) const |
Convert local to global rank. More... | |
const Location & | getLocation (uint32_t localRank) const |
Get location by rank. More... | |
![]() | |
IdType | getId () const |
Get global identifier. More... | |
const String & | getName () const |
Get grouping set name. More... | |
virtual | ~GroupingSet () |
Destructor. More... | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast< IdType >(0)) |
Numerical identifier used for undefined communication set definitions. More... | |
static const CommSet | UNDEFINED |
Static instance of class CommSet representing undefined communication set entries in other definitions. More... | |
Additional Inherited Members | |
![]() | |
enum | SetType { LOCATION_SET, REGION_SET, METRIC_SET, COMM_LOCATION_SET, COMM_SET } |
Grouping set types. More... | |
enum | Property { PROPERTY_NONE = 0, PROPERTY_SELF = (1 << 0), PROPERTY_WORLD = (1 << 1), PROPERTY_GLOBAL_RANKS = (1 << 2) } |
Grouping set properties. More... | |
typedef uint32_t | IdType |
Grouping set definition identifier type. More... | |
typedef Flags< Property, uint8_t > | Properties |
Grouping set property flags type. More... | |
![]() | |
GroupingSet (IdType id, const String &name) | |
Constructor. More... | |
The CommSet class provides a specialized grouping set definition representation for defining a subgroup of Location definition objects from the associated communication location set. The group is defined through an ordered set of identifiers (global ranks), which correspond to the indices of the Location definition objects in the associated communication location set. This also implicitly assigns a local rank in the range [0,#members-1] with respect to this communication set to each member Location.
CommSet instances define subgroups of locations involved in some form of communication or synchronization. Examples of such subgroups are MPI groups or OpenMP thread teams.
pearl::CommSet::CommSet | ( | IdType | id, |
const String & | name, | ||
const Properties & | properties, | ||
const CommLocationSet & | commLocationSet, | ||
const std::vector< uint32_t > & | ranks | ||
) |
Creates a new instance with the given global identifier id
, communication set name
, properties
, the associated communication location set commLocationSet
, and a ranks
vector providing a list of global ranks defining the subset.
ranks
should be empty if the GroupingSet::PROPERTY_WORLD property flag is set.id | Global grouping set identifier |
name | Communication set group name |
properties | Property flags |
commLocationSet | Associated communication location set |
ranks | List of ranks (i.e., indices in commLocationSet ) defining the subset \n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n |
std::bad_alloc | on failure to allocate storage |
const CommLocationSet& pearl::CommSet::getCommLocationSet | ( | ) | const |
Returns a constant reference to the associated communication location set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
uint32_t pearl::CommSet::getGlobalRank | ( | uint32_t | localRank | ) | const |
Returns the global rank of the subset member with the given local rank localRank
with respect to this communication set.
localRank | Local rank with respect to this communciation set |
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n
RuntimeError | on localRank ∉ [0,#num_ranks-1] |
uint32_t pearl::CommSet::getLocalRank | ( | uint32_t | globalRank | ) | const |
Returns the local rank of the subset member with the given global rank globalRank
with respect to this communication set.
globalRank | Global rank identifier |
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n
RuntimeError | on failure to find globalRank in this communication set |
const Location& pearl::CommSet::getLocation | ( | uint32_t | localRank | ) | const |
Returns a constant reference to the Location definition object with the given localRank
.
localRank | Local rank with respect to this communication set. |
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n
pearl::RuntimeError | on localRank ∉ [0,#num_ranks-1] |
Paradigm pearl::CommSet::getParadigm | ( | ) | const |
Returns the paradigm associated to this communication set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
Properties pearl::CommSet::getProperties | ( | ) | const |
Returns the property flags of this communication set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
|
virtual |
Returns the type of the grouping set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
Implements pearl::GroupingSet.
uint32_t pearl::CommSet::numRanks | ( | ) | const |
Returns the number of ranks in this communication set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
Compares two communication set definition objects lhs
and rhs
for inequality. Two communication sets are considered unequal if either their identifiers, names, property flags, or the sizes of the rank lists differ.
lhs | Left-hand operand |
rhs | Right-hand operand |
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
Compares two communication set definition objects lhs
and rhs
for equality. Two communication sets are considered equal if their identifiers, names, property flags, and the sizes of the rank lists are identical.
lhs | Left-hand operand |
rhs | Right-hand operand |
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
|
static |
![]() |
Copyright © 1998–2019 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |