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

Communicator definition representation for multi-process communicators. More...

#include <pearl/MpiComm.h>

Inheritance diagram for pearl::MpiComm:
pearl::Communicator

Public Member Functions

Query functions
MPI_Comm getHandle () const
 Get MPI communicator handle. More...
 
Communicator duplication
MpiCommduplicate () const
 Create copy. More...
 
- Public Member Functions inherited from pearl::Communicator
 Communicator (IdType id, const String &name, const CommSet &commSet, const Communicator *parent)
 Constructor. More...
 
virtual ~Communicator ()
 Destructor. More...
 
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get communicator name. More...
 
const CommSetgetCommSet () const
 Get associated communication set. More...
 
const CommunicatorgetParent () const
 Get parent communicator. More...
 
uint32_t getSize () const
 Get size. More...
 
Paradigm getParadigm () const
 Get paradigm. More...
 

Constructors & destructor

 MpiComm (IdType id, const String &name, const MpiGroup &group, const MpiComm *parent)
 Constructor. More...
 
virtual ~MpiComm ()
 Destructor. More...
 
 MpiComm (const MpiComm &comm)
 Copy constructor. More...
 

Additional Inherited Members

- Public Types inherited from pearl::Communicator
typedef uint32_t IdType
 Communicator definition identifier type. More...
 
- Static Public Attributes inherited from pearl::Communicator
static const IdType NO_ID = (~static_cast< IdType >(0))
 Numerical identifier used for undefined communicator definitions. More...
 
static const Communicator UNDEFINED
 Static instance of class Communicator representing undefined communicator entries in other definitions. More...
 

Detailed Description

The MpiComm class provides a specialized communicator definition representation for multi-process communicators. In addition to the functionality provided by the base class Communicator, the MpiComm class provides access to an MPI communicator handle resembling the communication context used in the target application.

Constructor & Destructor Documentation

◆ MpiComm() [1/2]

pearl::MpiComm::MpiComm ( IdType  id,
const String name,
const MpiGroup group,
const MpiComm parent 
)

Creates a new instance with the given global identifier id, communicator name, associated multi-process communication set commSet, and a parent communicator.

Parameters
idGlobal communicator identifier
nameCommunicator name
groupAssociated multi-process communication set (MPI group)
parentParent communicator (nullptr for root communicators or when this information is not available)
        \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

◆ ~MpiComm()

virtual pearl::MpiComm::~MpiComm ( )
virtual

Destroys the communicator 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).

◆ MpiComm() [2/2]

pearl::MpiComm::MpiComm ( const MpiComm comm)
protected

Copies the given instance and duplicates the associated MPI communicator handle using MPI_Comm_dup. It is 'protected' to prevent accidental invocation; users need to call MpiComm::duplicate() explicitly to create a communicator copy.

Parameters
commMulti-process communicator definition to duplicate
        \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

◆ duplicate()

MpiComm* pearl::MpiComm::duplicate ( ) const

Returns a pointer to a copy of the instance (including a copy of the MPI communicator handle).

Returns
Copy of the 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).

◆ getHandle()

MPI_Comm pearl::MpiComm::getHandle ( ) const

Returns the MPI communicator handle associated with this communicator object.

Returns
MPI communicator handle
        \n@par Exception safety\n        <b class="paramname">No-throw guarantee:</b>         never throws exceptions.        <br>\n

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