PEARL
Parallel Event Access and Replay Library
Public Types | Static Public Attributes | Friends | List of all members
pearl::Communicator Class Reference

Representation of a communicator definition. More...

#include <pearl/Communicator.h>

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

Public Types

typedef uint32_t IdType
 Communicator definition identifier type. More...
 

Public Member Functions

Constructors & destructor
 Communicator (IdType id, const String &name, const ProcessGroup &group, Paradigm paradigm, Communicator *parent)
 Constructor. More...
 
virtual ~Communicator ()
 Destructor. More...
 
Access definition data
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get communicator name. More...
 
const ProcessGroupgetGroup () const
 Get associated process group. More...
 
CommunicatorgetParent () const
 Get parent communicator. More...
 
Paradigm getParadigm () const
 Get communicator paradigm. More...
 

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined communicator definitions. More...
 
static const Communicator UNDEFINED
 

Friends

std::ostream & operator<< (std::ostream &stream, const Communicator &item)
 

Related Functions

(Note that these are not member functions.)

Stream I/O functions
std::ostream & operator<< (std::ostream &stream, const Communicator &item)
 Stream output operator. More...
 
Comparison operators
bool operator== (const Communicator &lhs, const Communicator &rhs)
 Equality operator. More...
 
bool operator!= (const Communicator &lhs, const Communicator &rhs)
 Inequality operator. More...
 

Detailed Description

Instances of the Communicator class provide information about MPI communicators. Communicators are characterized by a name and a parent communicator as well as an associated group of processes. The numerical identifiers of the individual communicators are globally defined and continuously enumerated, i.e., the ID is element of [0,#communicators-1].

Member Typedef Documentation

◆ IdType

typedef uint32_t pearl::Communicator::IdType

Constructor & Destructor Documentation

◆ Communicator()

pearl::Communicator::Communicator ( IdType  id,
const String name,
const ProcessGroup group,
Paradigm  paradigm,
Communicator parent 
)

Creates a new communicator definition instance and initializes it with the given values.

Parameters
idGlobal communicator identifier
nameCommunicator name
groupAssociated process group object
paradigmCommunicator paradigm
parentParent communicator (NULL for root communicators or when this information is not available)

◆ ~Communicator()

virtual pearl::Communicator::~Communicator ( )
virtual

Releases all allocated resources and destroys the instance.

Member Function Documentation

◆ getGroup()

const ProcessGroup& pearl::Communicator::getGroup ( ) const

Returns the ProcessGroup object associated to this communicator.

Returns
Process group object

◆ getId()

IdType pearl::Communicator::getId ( ) const

Returns the global identifier of the communicator definition.

Returns
Global identifier

◆ getName()

const String& pearl::Communicator::getName ( ) const

Returns the string definition storing the communicators's name. If this information is not available, String::UNDEFINED is returned.

Returns
Communicator name

◆ getParadigm()

Paradigm pearl::Communicator::getParadigm ( ) const

Returns the paradigm of the communicator. The paradigm can be used to distiguish communicators of different message passing libraries, such as MPI, ARMCI, SHMEM, etc..

Returns
Paradigm

◆ getParent()

Communicator* pearl::Communicator::getParent ( ) const

Returns a pointer to the parent communicator if applicable. Returns NULL for root communicators or when this information is not available.

Returns
Parent communicator

Friends And Related Function Documentation

◆ operator!=()

bool operator!= ( const Communicator lhs,
const Communicator rhs 
)
related

Compares two communicator definition objects lhs and rhs for inequality. Two communicators are considered unequal if either their IDs, names, associated process groups, or parents differ.

Parameters
lhsLeft-hand operand
rhsRight-hand operand
Returns
True if the communicator definitions differ, false otherwise.

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const Communicator item 
)
friend

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  stream,
const Communicator item 
)
related

Prints the contents of the given communicator definition object item to an output stream in a human-readable form.

Parameters
streamOutput stream
itemCommunicator definition object
Returns
Output stream

◆ operator==()

bool operator== ( const Communicator lhs,
const Communicator rhs 
)
related

Compares two communicator definition objects lhs and rhs for equality. Two communicators are considered equal if their identifiers, names, associated process groups, and parants are identical.

Parameters
lhsLeft-hand operand
rhsRight-hand operand
Returns
True if the communicator definitions are equal, false otherwise.

Member Data Documentation

◆ NO_ID

const IdType pearl::Communicator::NO_ID = (~static_cast<IdType>(0))
static

◆ UNDEFINED

const Communicator pearl::Communicator::UNDEFINED
static

Static instance of class Communicator representing undefined communicator entries in other definitions.


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

Scalasca    Copyright © 1998–2016 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming