PEARL
Parallel Event Access and Replay Library
List of all members
pearl::MpiGroup Class Reference

Grouping set definition representation for a multi-process communication set. More...

#include <pearl/MpiGroup.h>

Inheritance diagram for pearl::MpiGroup:
pearl::CommSet pearl::GroupingSet pearl::uncopyable::Uncopyable

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...
 
- Public Member Functions inherited from pearl::CommSet
 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 CommLocationSetgetCommLocationSet () 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 LocationgetLocation (uint32_t localRank) const
 Get location by rank. More...
 
- Public Member Functions inherited from pearl::GroupingSet
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get grouping set name. More...
 
virtual ~GroupingSet ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from pearl::GroupingSet
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 Public Attributes inherited from pearl::CommSet
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...
 
- Protected Member Functions inherited from pearl::GroupingSet
 GroupingSet (IdType id, const String &name)
 Constructor. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MpiGroup()

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.

Note
ranks should be empty if the GroupingSet::PROPERTY_WORLD property flag is set.
Parameters
idGlobal grouping set identifier
nameCommunication set group name
propertiesProperty flags
commLocationSetAssociated communication location set
ranksList 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
Exceptions
std::bad_allocon failure to allocate storage

◆ ~MpiGroup()

virtual pearl::MpiGroup::~MpiGroup ( )
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).

Member Function Documentation

◆ createHandle()

MPI_Group pearl::MpiGroup::createHandle ( ) const

Returns an MPI group handle corresponding to this communication set object without caching it.

Returns
MPI group handle
        \n@par Exception safety\n        <b class="paramname">Strong guarantee:</b>         no effects in case an exception is thrown.        <br>\n
However, this call may abort if the underlying MPI calls fail (MPI errors are fatal).
Exceptions
std::bad_allocon failure to allocate storage

◆ getHandle()

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.

Returns
MPI group handle
        \n@par Exception safety\n        <b class="paramname">Strong guarantee:</b>         no effects in case an exception is thrown.        <br>\n
However, this call may abort if the underlying MPI calls fail (MPI errors are fatal).
Exceptions
std::bad_allocon failure to allocate storage

The documentation for this class was generated from the following file:

Scalasca    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