#include <Teuchos_MPIComm.hpp>
Public Member Functions | |
| MPIComm () | |
| Empty constructor builds an object for MPI_COMM_WORLD. | |
| MPIComm (MPI_Comm comm) | |
| Construct a MPIComm for a given MPI communicator. | |
| 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. | |
| MPI_Comm | getComm () const |
| Get the MPI_Comm communicator handle. | |
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 | gatherv (void *sendBuf, int sendCount, int sendType, void *recvBuf, int *recvCount, int *displacements, int recvType, int root) const |
| Gather variable-sized arrays 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 | |
| static MPIComm & | world () |
| Get an object representing MPI_COMM_WORLD. | |
| static void | errCheck (int errCode, const std::string &methodName) |
| static MPI_Datatype | getDataType (int type) |
| Converts a PMachine data type code to a MPI_Datatype. | |
| static MPI_Op | getOp (int op) |
| Converts a PMachine operator code to a MPI_Op operator code. | |
Static Public Attributes | |
Data types | |
| static const int | INT = 1 |
| Integer data type. | |
| static const int | FLOAT = 2 |
| Float data type. | |
| static const int | DOUBLE = 3 |
| Double data type. | |
| static const int | CHAR = 4 |
| Character data type. | |
Operations | |
| static const int | SUM = 5 |
| Summation operation. | |
| static const int | MIN = 6 |
| Minimize operation. | |
| static const int | MAX = 7 |
| Maximize operation. | |
| static const int | PROD = 8 |
| Dot-product (Multiplication) operation. | |
At present, groups are not implemented so the only communicator is MPI_COMM_WORLD.
Definition at line 51 of file Teuchos_MPIComm.hpp.
| MPIComm::MPIComm | ( | ) |
Empty constructor builds an object for MPI_COMM_WORLD.
Definition at line 49 of file Teuchos_MPIComm.cpp.
| MPIComm::MPIComm | ( | MPI_Comm | comm | ) |
Construct a MPIComm for a given MPI communicator.
Definition at line 60 of file Teuchos_MPIComm.cpp.
| void MPIComm::allGather | ( | void * | sendBuf, | |
| int | sendCount, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| int | recvType | |||
| ) | const |
| void MPIComm::allGatherv | ( | void * | sendBuf, | |
| int | sendCount, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | recvDisplacements, | |||
| int | recvType | |||
| ) | const |
| 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 354 of file Teuchos_MPIComm.cpp.
| void MPIComm::allToAll | ( | void * | sendBuf, | |
| int | sendCount, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| int | recvType | |||
| ) | const |
| void MPIComm::allToAllv | ( | void * | sendBuf, | |
| int * | sendCount, | |||
| int * | sendDisplacements, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | recvDisplacements, | |||
| int | recvType | |||
| ) | const |
| void MPIComm::bcast | ( | void * | msg, | |
| int | length, | |||
| int | type, | |||
| int | src | |||
| ) | const |
| void MPIComm::errCheck | ( | int | errCode, | |
| const std::string & | methodName | |||
| ) | [static] |
Definition at line 394 of file Teuchos_MPIComm.cpp.
| void MPIComm::gather | ( | void * | sendBuf, | |
| int | sendCount, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| int | recvType, | |||
| int | root | |||
| ) | const |
| void MPIComm::gatherv | ( | void * | sendBuf, | |
| int | sendCount, | |||
| int | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | displacements, | |||
| int | recvType, | |||
| int | root | |||
| ) | const |
| MPI_Comm Teuchos::MPIComm::getComm | ( | ) | const [inline] |
| MPI_Datatype MPIComm::getDataType | ( | int | type | ) | [static] |
Converts a PMachine data type code to a MPI_Datatype.
Definition at line 378 of file Teuchos_MPIComm.cpp.
| int Teuchos::MPIComm::getNProc | ( | ) | const [inline] |
| MPI_Op MPIComm::getOp | ( | int | op | ) | [static] |
Converts a PMachine operator code to a MPI_Op operator code.
Definition at line 401 of file Teuchos_MPIComm.cpp.
| int Teuchos::MPIComm::getRank | ( | ) | const [inline] |
| void MPIComm::synchronize | ( | ) | const |
Synchronize all the processors in the communicator.
Definition at line 150 of file Teuchos_MPIComm.cpp.
| MPIComm & MPIComm::world | ( | ) | [static] |
const int Teuchos::MPIComm::CHAR = 4 [static] |
const int Teuchos::MPIComm::DOUBLE = 3 [static] |
const int Teuchos::MPIComm::FLOAT = 2 [static] |
const int Teuchos::MPIComm::INT = 1 [static] |
const int Teuchos::MPIComm::MAX = 7 [static] |
const int Teuchos::MPIComm::MIN = 6 [static] |
const int Teuchos::MPIComm::PROD = 8 [static] |
const int Teuchos::MPIComm::SUM = 5 [static] |
1.5.9