Teuchos::MPIComm Class Reference

Object representation of an MPI communicator. More...

#include <Teuchos_MPIComm.hpp>

List of all members.

Public Member Functions

 MPIComm ()
 Empty constructor builds an object for MPI_COMM_WORLD.
int getRank () const
 Return process rank.
int getNProc () const
 Return number of processors in the communicator.
void synchronize () const
 Synchronize all the processors in the communicator.
Collective communications
void allToAll (void *sendBuf, int sendCount, int sendType, void *recvBuf, int recvCount, int recvType) const
 All-to-all gather-scatter.
void allToAllv (void *sendBuf, int *sendCount, int *sendDisplacements, int sendType, void *recvBuf, int *recvCount, int *recvDisplacements, int recvType) const
 Variable-length gather-scatter.
void allReduce (void *input, void *result, int inputCount, int type, int op) const
 Do a collective operation, scattering the results to all processors.
void gather (void *sendBuf, int sendCount, int sendType, void *recvBuf, int recvCount, int recvType, int root) const
 Gather to root.
void allGather (void *sendBuf, int sendCount, int sendType, void *recvBuf, int recvCount, int recvType) const
 Gather to all processors.
void allGatherv (void *sendBuf, int sendCount, int sendType, void *recvBuf, int *recvCount, int *recvDisplacements, int recvType) const
 Variable-length gather to all processors.
void bcast (void *msg, int length, int type, int src) const
 Broadcast.

Static Public Member Functions

MPICommworld ()
 Get an object representing MPI_COMM_WORLD.
void errCheck (int errCode, const string &methodName)

Static Public Attributes

Data types
const int INT = 1
 Integer data type.
const int FLOAT = 2
 Float data type.
const int DOUBLE = 3
 Double data type.
const int CHAR = 4
 Character data type.
Operations
const int SUM = 5
 Summation operation.
const int MIN = 6
 Minimize operation.
const int MAX = 7
 Maximize operation.
const int PROD = 8
 Dot-product (Multiplication) operation.

Private Member Functions

void init ()
 common initialization function, called by all ctors

Private Attributes

int nProc_
int myRank_


Detailed Description

Object representation of an MPI communicator.

At present, groups are not implemented so the only communicator is MPI_COMM_WORLD.

Definition at line 50 of file Teuchos_MPIComm.hpp.


Constructor & Destructor Documentation

MPIComm::MPIComm  ) 
 

Empty constructor builds an object for MPI_COMM_WORLD.

Definition at line 48 of file Teuchos_MPIComm.cpp.


Member Function Documentation

MPIComm & MPIComm::world  )  [static]
 

Get an object representing MPI_COMM_WORLD.

Definition at line 126 of file Teuchos_MPIComm.cpp.

int Teuchos::MPIComm::getRank  )  const [inline]
 

Return process rank.

Definition at line 66 of file Teuchos_MPIComm.hpp.

int Teuchos::MPIComm::getNProc  )  const [inline]
 

Return number of processors in the communicator.

Definition at line 69 of file Teuchos_MPIComm.hpp.

void MPIComm::synchronize  )  const
 

Synchronize all the processors in the communicator.

Definition at line 133 of file Teuchos_MPIComm.cpp.

void MPIComm::allToAll void *  sendBuf,
int  sendCount,
int  sendType,
void *  recvBuf,
int  recvCount,
int  recvType
const
 

All-to-all gather-scatter.

Definition at line 144 of file Teuchos_MPIComm.cpp.

void MPIComm::allToAllv void *  sendBuf,
int *  sendCount,
int *  sendDisplacements,
int  sendType,
void *  recvBuf,
int *  recvCount,
int *  recvDisplacements,
int  recvType
const
 

Variable-length gather-scatter.

Definition at line 161 of file Teuchos_MPIComm.cpp.

void MPIComm::allReduce void *  input,
void *  result,
int  inputCount,
int  type,
int  op
const
 

Do a collective operation, scattering the results to all processors.

Definition at line 253 of file Teuchos_MPIComm.cpp.

void MPIComm::gather void *  sendBuf,
int  sendCount,
int  sendType,
void *  recvBuf,
int  recvCount,
int  recvType,
int  root
const
 

Gather to root.

Definition at line 180 of file Teuchos_MPIComm.cpp.

void MPIComm::allGather void *  sendBuf,
int  sendCount,
int  sendType,
void *  recvBuf,
int  recvCount,
int  recvType
const
 

Gather to all processors.

Definition at line 198 of file Teuchos_MPIComm.cpp.

void MPIComm::allGatherv void *  sendBuf,
int  sendCount,
int  sendType,
void *  recvBuf,
int *  recvCount,
int *  recvDisplacements,
int  recvType
const
 

Variable-length gather to all processors.

Definition at line 218 of file Teuchos_MPIComm.cpp.

void MPIComm::bcast void *  msg,
int  length,
int  type,
int  src
const
 

Broadcast.

Definition at line 240 of file Teuchos_MPIComm.cpp.

void Teuchos::MPIComm::errCheck int  errCode,
const string &  methodName
[static]
 

void MPIComm::init  )  [private]
 

common initialization function, called by all ctors

Definition at line 66 of file Teuchos_MPIComm.cpp.


Member Data Documentation

const int Teuchos::MPIComm::INT = 1 [static]
 

Integer data type.

Definition at line 36 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::FLOAT = 2 [static]
 

Float data type.

Definition at line 37 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::DOUBLE = 3 [static]
 

Double data type.

Definition at line 38 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::CHAR = 4 [static]
 

Character data type.

Definition at line 39 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::SUM = 5 [static]
 

Summation operation.

Definition at line 41 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::MIN = 6 [static]
 

Minimize operation.

Definition at line 42 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::MAX = 7 [static]
 

Maximize operation.

Definition at line 43 of file Teuchos_MPIComm.cpp.

const int Teuchos::MPIComm::PROD = 8 [static]
 

Dot-product (Multiplication) operation.

Definition at line 44 of file Teuchos_MPIComm.cpp.

int Teuchos::MPIComm::nProc_ [private]
 

Definition at line 154 of file Teuchos_MPIComm.hpp.

int Teuchos::MPIComm::myRank_ [private]
 

Definition at line 155 of file Teuchos_MPIComm.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:42:53 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1