![]() |
fpmas 1.6
|
#include <communication.h>
Public Member Functions | |
MPI_Comm | getMpiComm () const |
MPI_Group | getMpiGroup () const |
int | getRank () const override |
int | getSize () const override |
void | send (const void *data, int count, MPI_Datatype datatype, int destination, int tag) override |
void | send (const DataPack &data, MPI_Datatype datatype, int destination, int tag) override |
void | send (int destination, int tag) override |
void | Isend (const void *data, int count, MPI_Datatype datatype, int destination, int tag, Request &req) override |
void | Isend (const DataPack &data, MPI_Datatype datatype, int destination, int tag, Request &req) override |
void | Isend (int destination, int tag, Request &req) override |
void | Issend (const void *data, int count, MPI_Datatype datatype, int destination, int tag, Request &req) override |
void | Issend (const DataPack &data, MPI_Datatype datatype, int destination, int tag, Request &req) override |
void | Issend (int destination, int tag, Request &req) override |
void | recv (int source, int tag, Status &status=Status::IGNORE) override |
void | recv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, Status &status=Status::IGNORE) override |
void | recv (DataPack &data, MPI_Datatype datatype, int source, int tag, Status &status=Status::IGNORE) override |
void | probe (MPI_Datatype type, int source, int tag, Status &) override |
bool | Iprobe (MPI_Datatype type, int source, int tag, Status &) override |
bool | test (Request &req) override |
void | wait (Request &req) override |
void | waitAll (std::vector< Request > &req) override |
std::unordered_map< int, DataPack > | allToAll (std::unordered_map< int, DataPack > export_map, MPI_Datatype datatype) override |
std::vector< DataPack > | gather (DataPack data, MPI_Datatype datatype, int root) override |
std::vector< DataPack > | allGather (DataPack data, MPI_Datatype datatype) override |
DataPack | bcast (DataPack data, MPI_Datatype datatype, int root) override |
void | barrier () override |
virtual int | getRank () const =0 |
virtual int | getSize () const =0 |
virtual void | send (const void *data, int count, MPI_Datatype datatype, int destination, int tag)=0 |
virtual void | send (const DataPack &data, MPI_Datatype datatype, int destination, int tag)=0 |
virtual void | send (int destination, int tag)=0 |
virtual void | Isend (const void *data, int count, MPI_Datatype datatype, int destination, int tag, Request &request)=0 |
virtual void | Isend (const DataPack &data, MPI_Datatype datatype, int destination, int tag, Request &request)=0 |
virtual void | Isend (int destination, int tag, Request &request)=0 |
virtual void | Issend (const void *data, int count, MPI_Datatype datatype, int destination, int tag, Request &request)=0 |
virtual void | Issend (const DataPack &data, MPI_Datatype datatype, int destination, int tag, Request &request)=0 |
virtual void | Issend (int destination, int tag, Request &request)=0 |
virtual void | probe (MPI_Datatype type, int source, int tag, Status &status)=0 |
virtual bool | Iprobe (MPI_Datatype type, int source, int tag, Status &status)=0 |
virtual void | recv (int source, int tag, Status &status=Status::IGNORE)=0 |
virtual void | recv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, Status &status)=0 |
virtual void | recv (DataPack &data, MPI_Datatype datatype, int source, int tag, Status &status)=0 |
virtual bool | test (Request &request)=0 |
virtual void | wait (Request &request)=0 |
virtual void | waitAll (std::vector< Request > &requests)=0 |
virtual std::unordered_map< int, DataPack > | allToAll (std::unordered_map< int, DataPack > export_map, MPI_Datatype datatype)=0 |
virtual std::vector< DataPack > | gather (DataPack data, MPI_Datatype datatype, int root)=0 |
virtual std::vector< DataPack > | allGather (DataPack data, MPI_Datatype datatype)=0 |
virtual DataPack | bcast (DataPack data, MPI_Datatype datatype, int root)=0 |
virtual void | barrier ()=0 |
Protected Attributes | |
int | size |
int | rank |
MPI_Group | group |
MPI_Comm | comm |
Additional Inherited Members | |
![]() | |
static MPI_Datatype | IGNORE_TYPE = MPI_INT |
fpmas::api::communication::MpiCommunicator implementation, based on the system MPI library (i.e. #include <mpi.h>
).
MPI_Comm fpmas::communication::MpiCommunicatorBase::getMpiComm | ( | ) | const |
Returns the built MPI communicator.
MPI_Group fpmas::communication::MpiCommunicatorBase::getMpiGroup | ( | ) | const |
Returns the built MPI group.
|
overridevirtual |
Returns the MPI rank of this communicator.
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Returns the size of this communicator (i.e. the current processes count).
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Perfoms an MPI_Send operation.
data | input buffer |
count | items count in the buffer |
datatype | MPI type of the data to send |
destination | rank of the destination proc |
tag | message tag |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Equivalent to send(data.buffer, data.count, datatype, destination, tag)
data | input DataPack |
datatype | MPI type of the data to send |
destination | rank of the destination process |
tag | message tag |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Send operation without data.
destination | rank of the destination proc |
tag | message tag |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Sends data
to destination
(non-blocking, asynchronous).
The FPMAS implementation always copy the input data to the input Request.
The method returns immediately, without waiting for the message to be buffered or received by the destination process.
The operation must be completed with wait() or waitAll() so that the request object is properly freed.
data | input buffer |
count | items count in the buffer |
datatype | MPI type of the data to send |
destination | rank of the destination process |
tag | message tag |
request | output Request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Equivalent to send(data.buffer, data.count, datatype, destination, tag, request)
data | input DataPack |
datatype | MPI type of the data to send |
destination | rank of the destination process |
tag | message tag |
request | output Request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Sends a void message to destination
(non-blocking, asynchronous).
This might be useful to send END message for example, when only a message tag without body might be enough.
destination | rank of the destination process |
tag | message tag |
request | output Request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Issend operation.
data | input buffer |
count | items count in the buffer |
datatype | MPI type of the data to send |
destination | rank of the destination proc |
tag | message tag |
req | output MPI request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Equivalent to Issend(data.buffer, data.count, datatype, destination, tag, request).
data | input DataPack |
datatype | MPI type of the data to send |
destination | rank of the destination process |
tag | message tag |
request | output Request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Issend operation without data.
destination | rank of the destination proc |
tag | message tag |
req | output MPI request |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Recv operation without data.
source | rank of the process to receive from |
tag | message tag |
status | output MPI status |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Recv operation.
buffer | output buffer |
count | items count to receive |
datatype | MPI type of the data to receive |
source | rank of the proc to receive from |
tag | message tag |
status | output MPI status |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Equivalent to recv(data.buffer, data.count, datatype, source, tag, status)
data | output DataPack |
datatype | MPI type of the data to receive |
source | rank of the process to receive from |
tag | message tag |
status | output MPI status |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Probe operation.
Upon return, the output status
contains information about the message to receive.
type | expected message type |
source | source rank |
tag | recv tag |
status | MPI status |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Iprobe operation.
Upon return, the output status
contains information about the message to receive.
type | expected message type |
source | source rank |
tag | recv tag |
status | MPI status |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Test operation.
req | MPI request to test |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Wait operation.
req | Request to wait for completion |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Waits for the completion of all requests
.
Can be used to complete non-blocking communications. Upon return, all requests
internal data buffers are freed.
requests | Requests to wait |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Alltoall operation.
export_map | data to export to each proc |
datatype | MPI datatype of the data to send / receive |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Gather operation.
data | data to send to root |
datatype | MPI datatype |
root | rank of the root process |
rank == root
, a vector containing gathered data, else an empty vector. Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Allgather operation.
data | to send to all processes |
datatype | MPI datatype |
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Bcast operation.
data | data to broadcast |
datatype | MPI datatype |
root | rank of the process from which data is sent |
root
Implements fpmas::api::communication::MpiCommunicator.
|
overridevirtual |
Performs an MPI_Barrier operation.
Implements fpmas::api::communication::MpiCommunicator.
|
protected |
Communicator size
|
protected |
Communicator rank
|
protected |
Internal MPI_Group
|
protected |
Internal MPI_Comm