- Main Page
- Modules
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# cMPICommunications Class Reference
[Parallel simulation support]

MPI implementation of the basic parallel simulation communications layer. More...

`#include <cmpicomm.h>`

Inheritance diagram for cMPICommunications:

List of all members.

## Public Member Functions
| cMPICommunications ()
virtual | ~cMPICommunications ()
Redefined methods from cParsimCommunications
virtual void | init ()
virtual void | shutdown ()
virtual int | getNumPartitions ()
virtual int | getProcId ()
virtual cCommBuffer * | createCommBuffer ()
virtual void | recycleCommBuffer (cCommBuffer *buffer)
virtual void | send (cCommBuffer *buffer, int tag, int destination)
virtual void | broadcast (cCommBuffer *buffer, int tag)
virtual bool | receiveBlocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId)
virtual bool | receiveNonblocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId)
## Protected Member Functions
virtual cMPICommBuffer * | doCreateCommBuffer ()

## Detailed Description

MPI implementation of the basic parallel simulation communications layer.

## Constructor & Destructor Documentation

cMPICommunications::cMPICommunications | ( |  | ) |

| Constructor.

virtual cMPICommunications::~cMPICommunications | ( |  | ) | `[virtual]`

| Destructor calls MPI_Finalize().

## Member Function Documentation

virtual void cMPICommunications::broadcast | ( | cCommBuffer * | buffer,
|  | int | tag
| ) | `[virtual]`

| Sends packed data with given tag to all partitions. Reimplemented from cParsimCommunications.

virtual cCommBuffer* cMPICommunications::createCommBuffer | ( |  | ) | `[virtual]`

| Creates an empty buffer of type cMPICommBuffer. Implements cParsimCommunications.

virtual cMPICommBuffer* cMPICommunications::doCreateCommBuffer | ( |  | ) | `[protected, virtual]`

| Factory method behind createCommBuffer(). Reimplemented in cPtrPassingMPICommunications.

virtual int cMPICommunications::getNumPartitions | ( |  | ) | `[virtual]`

| Returns total number of partitions. Implements cParsimCommunications.

virtual int cMPICommunications::getProcId | ( |  | ) | `[virtual]`

| Returns the MPI rank of this partition. Implements cParsimCommunications.

virtual void cMPICommunications::init | ( |  | ) | `[virtual]`

| Init the library. Implements cParsimCommunications.

virtual bool cMPICommunications::receiveBlocking | ( | int | filtTag,
|  | cCommBuffer * | buffer,
|  | int & | receivedTag,
|  | int & | sourceProcId
| ) | `[virtual]`

| Receives packed data with given tag from given destination. Normally returns true; false is returned if blocking was interrupted by the user. Implements cParsimCommunications.

virtual bool cMPICommunications::receiveNonblocking | ( | int | filtTag,
|  | cCommBuffer * | buffer,
|  | int & | receivedTag,
|  | int & | sourceProcId
| ) | `[virtual]`

| Receives packed data with given tag from given destination. Call is non-blocking -- it returns true if something has been received, false otherwise. Implements cParsimCommunications.

virtual void cMPICommunications::recycleCommBuffer | ( | cCommBuffer * | buffer | ) | `[virtual]`

| Recycle communication buffer after use. Implements cParsimCommunications.

virtual void cMPICommunications::send | ( | cCommBuffer * | buffer,
|  | int | tag,
|  | int | destination
| ) | `[virtual]`

| Sends packed data with given tag to destination. Implements cParsimCommunications.

virtual void cMPICommunications::shutdown | ( |  | ) | `[virtual]`

| Shutdown the communications library. Implements cParsimCommunications.

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

- cmpicomm.h