PEARL
Parallel Event Access and Replay Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions
pearl::Communicator Class Reference

Representation of a communicator definition. More...

#include <pearl/Communicator.h>

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

List of all members.

Public Types

enum  Paradigm {
  PARADIGM_UNKNOWN, PARADIGM_MPI, PARADIGM_ARMCI, PARADIGM_SHMEM,
  PARADIGM_GASPI, NUMBER_OF_PARADIGMS
}
 Communicator paradigm. More...
typedef uint32_t IdType
 Communicator definition identifier type.

Public Member Functions

IdType getId () const
 Get global identifier.
const String & getName () const
 Get communicator name.
const ProcessGroup & getGroup () const
 Get associated process group.
Communicator * getParent () const
 Get parent communicator.
Paradigm getParadigm () const
 Get paradigm.
Constructors & destructor
 Communicator (IdType id, const String &name, const ProcessGroup &group, Paradigm paradigm, Communicator *parent)
 Constructor.
virtual ~Communicator ()
 Destructor.

Static Public Attributes

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

Friends

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

Related Functions

(Note that these are not member functions.)

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

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

typedef uint32_t pearl::Communicator::IdType

Member Enumeration Documentation

Enumerator:
PARADIGM_UNKNOWN 

Unknown paradigm, used only if no other paradigm fits.

PARADIGM_MPI 

Message Passing Interface.

PARADIGM_ARMCI 

Aggregate Remote Memory Copy Interface.

PARADIGM_SHMEM 

SHMEM (Cray, SGI, OpenSHMEM)

PARADIGM_GASPI 

Global Address Space Programming Interface.

NUMBER_OF_PARADIGMS 

Not a valid paradigm, for internal use only.


Constructor & Destructor Documentation

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
parentParent communicator (NULL for root communicators or when this information is not available)
virtual pearl::Communicator::~Communicator ( ) [virtual]

Releases all allocated resources and destroys the instance.


Member Function Documentation

Returns the ProcessGroup object associated to this communicator.

Returns:
Process group object

Returns the global identifier of the communicator definition.

Returns:
Global identifier

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

Returns:
Communicator name

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

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

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.
std::ostream& operator<< ( std::ostream &  stream,
const Communicator &  item 
) [friend]
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
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

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

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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