![]() |
PEARL
Parallel Event Access and Replay Library
|
Grouping set definition representation for a multi-process communication set. More...
#include <pearl/MpiGroup.h>
Public Member Functions | |
Constructors & destructor | |
MpiGroup (IdType id, const String &name, const Properties &properties, const CommLocationSet &commLocationSet, const std::vector< uint32_t > &ranks) | |
Constructor. More... | |
virtual | ~MpiGroup () |
Destructor. More... | |
Query functions | |
MPI_Group | getHandle () |
Get MPI group handle. More... | |
MPI_Group | createHandle () const |
Create MPI group handle. More... | |
![]() | |
CommSet (IdType id, const String &name, const Properties &properties, const CommLocationSet &commLocationSet, const std::vector< uint32_t > &ranks) | |
Constructor. More... | |
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... | |
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... | |
![]() | |
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... | |
![]() | |
GroupingSet (IdType id, const String &name) | |
Constructor. More... | |
![]() | |
bool | operator== (const CommSet &lhs, const CommSet &rhs) |
Equality operator. More... | |
bool | operator!= (const CommSet &lhs, const CommSet &rhs) |
Inequality operator. More... | |
![]() | |
std::ostream & | operator<< (std::ostream &stream, const GroupingSet &item) |
Stream output operator. More... | |
std::string | toStdString (GroupingSet::SetType type) |
Convert GroupingSet::SetType to std::string . More... | |
std::string | toStdString (const GroupingSet::Properties &properties) |
Convert GroupingSet::Properties to std::string More... | |
GroupingSet::Properties | operator& (const GroupingSet::Properties &lhs, const GroupingSet::Properties::EnumType rhs) |
Binary AND. More... | |
GroupingSet::Properties | operator& (const GroupingSet::Properties::EnumType lhs, const GroupingSet::Properties &rhs) |
Binary AND. More... | |
GroupingSet::Properties | operator& (const GroupingSet::Properties &lhs, const GroupingSet::Properties &rhs) |
Binary AND. More... | |
GroupingSet::Properties | operator| (const GroupingSet::Properties::EnumType lhs, const GroupingSet::Properties::EnumType rhs) |
Binary OR. More... | |
GroupingSet::Properties | operator| (const GroupingSet::Properties &lhs, const GroupingSet::Properties::EnumType rhs) |
Binary OR. More... | |
GroupingSet::Properties | operator| (const GroupingSet::Properties::EnumType lhs, const GroupingSet::Properties &rhs) |
Binary OR. More... | |
GroupingSet::Properties | operator| (const GroupingSet::Properties &lhs, const GroupingSet::Properties &rhs) |
Binary OR. More... | |
The MpiGroup class provides a specialized communication set definition representation for multi-process communication sets. In addition to the functionality of the base class CommSet, the MpiGroup class provides access to an MPI group handle resembling the communication set used in the target application.
pearl::MpiGroup::MpiGroup | ( | 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 lost 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 |
|
virtual |
Destroys the communication set instance.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n However, this call may abort if the underlying MPI calls fail (MPI errors are fatal).
MPI_Group pearl::MpiGroup::createHandle | ( | ) | const |
Returns an MPI group handle corresponding to this communication set object without caching it.
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\nHowever, this call may abort if the underlying MPI calls fail (MPI errors are fatal).
std::bad_alloc | on failure to allocate storage |
MPI_Group pearl::MpiGroup::getHandle | ( | ) |
Returns the MPI group handle associated with this communication set object. The MPI group is lazily created on first access and then cached until the instance is destructed.
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\nHowever, this call may abort if the underlying MPI calls fail (MPI errors are fatal).
std::bad_alloc | on failure to allocate storage |
![]() |
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 |