Playa::MPISession Class Reference

This class provides methods for initializing, finalizing, and querying the global MPI session. More...

List of all members.

Public Member Functions

 ~MPISession ()

Static Public Member Functions

static void init (int *argc, void ***argv)
 Initializer, calls MPI_Init() if necessary.
static void init (int *argc, char ***argv)
 Initializer, calls MPI_Init() if necessary.
static int getRank ()
 Returns the process rank relative to MPI_COMM_WORLD.
static int getNProc ()
 Returns the number of processors in MPI_COMM_WORLD.
static void finalize ()
 Finalizer, calls MPI_Finalize() if necessary.
static bool & showStartupMessage ()

Private Member Functions

 MPISession (int *argc, char ***argv)

Static Private Attributes

static int rank_ = 0
static int nProc_ = 1


Detailed Description

This class provides methods for initializing, finalizing, and querying the global MPI session.

Definition at line 25 of file PlayaMPISession.hpp.


Constructor & Destructor Documentation

Playa::MPISession::MPISession ( int *  argc,
char ***  argv 
) [private]

private ctor, to be called only by init()

Definition at line 16 of file PlayaMPISession.cpp.

References nProc_, rank_, and showStartupMessage().

Referenced by init().

Playa::MPISession::~MPISession (  ) 

dtor calls MPI finalize

Definition at line 85 of file PlayaMPISession.cpp.

References Playa::MPIOp::clearOpRegistry(), and Playa::MPIDataType::clearTypeRegistry().


Member Function Documentation

void Playa::MPISession::finalize (  )  [static]

Finalizer, calls MPI_Finalize() if necessary.

Definition at line 79 of file PlayaMPISession.cpp.

static int Playa::MPISession::getNProc (  )  [inline, static]

Returns the number of processors in MPI_COMM_WORLD.

Definition at line 38 of file PlayaMPISession.hpp.

References nProc_.

static int Playa::MPISession::getRank (  )  [inline, static]

Returns the process rank relative to MPI_COMM_WORLD.

Definition at line 35 of file PlayaMPISession.hpp.

References rank_.

void Playa::MPISession::init ( int *  argc,
char ***  argv 
) [static]

Initializer, calls MPI_Init() if necessary.

Definition at line 69 of file PlayaMPISession.cpp.

References MPISession().

void Playa::MPISession::init ( int *  argc,
void ***  argv 
) [static]

Initializer, calls MPI_Init() if necessary.

Definition at line 74 of file PlayaMPISession.cpp.

static bool& Playa::MPISession::showStartupMessage (  )  [inline, static]

Set to true if a message should be written by each processor at startup.

Definition at line 45 of file PlayaMPISession.hpp.

Referenced by MPISession().


Member Data Documentation

int Playa::MPISession::nProc_ = 1 [static, private]

Definition at line 49 of file PlayaMPISession.hpp.

Referenced by getNProc(), and MPISession().

int Playa::MPISession::rank_ = 0 [static, private]

Definition at line 48 of file PlayaMPISession.hpp.

Referenced by getRank(), and MPISession().

Site Contact