The string message looks like the other messages which I generate through DaStGen 2, but I actually wrote it myself manually to support dynamic string lengths.
More...
#include <StringMessage.h>
|
| static void | sendAndPollDanglingMessages (const tarch::mpi::StringMessage &message, int destination, int tag) |
| static void | receiveAndPollDanglingMessages (tarch::mpi::StringMessage &message, int source, int tag) |
| static void | send (const tarch::mpi::StringMessage &buffer, int destination, int tag, MPI_Comm communicator) |
| | In DaStGen (the first version), I had a non-static version of the send as well as the receive.
|
| static void | receive (tarch::mpi::StringMessage &buffer, int source, int tag, MPI_Comm communicator) |
| static void | send (const tarch::mpi::StringMessage &buffer, int destination, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
| | Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.
|
| static void | receive (tarch::mpi::StringMessage &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
| static bool | isMessageInQueue (int tag, MPI_Comm communicator) |
| | In older DaStGen version, I tried to find out whether a particular message type is in the MPI queue.
|
The string message looks like the other messages which I generate through DaStGen 2, but I actually wrote it myself manually to support dynamic string lengths.
- Author
- Tobias Weinzierl
Definition at line 34 of file StringMessage.h.
◆ StringMessage() [1/2]
| tarch::mpi::StringMessage::StringMessage |
( |
| ) |
|
◆ StringMessage() [2/2]
| tarch::mpi::StringMessage::StringMessage |
( |
const std::string & | value | ) |
|
◆ getData()
| std::string tarch::mpi::StringMessage::getData |
( |
| ) |
const |
◆ getSenderRank()
| int tarch::mpi::StringMessage::getSenderRank |
( |
| ) |
const |
- Returns
- The rank of the sender of an object. It only make ssense to call this routine after you've invoked receive with MPI_ANY_SOURCE.
◆ isMessageInQueue()
| bool tarch::mpi::StringMessage::isMessageInQueue |
( |
int | tag, |
|
|
MPI_Comm | communicator ) |
|
static |
In older DaStGen version, I tried to find out whether a particular message type is in the MPI queue.
That is, I looked whether a message on this tag does exist, and then I looked whether the memory footprint matches via count. I think this is invalid. MPI really looks only into the number of bytes, so you have to know which type drops in once there is a message on a tag.
◆ receive() [1/2]
◆ receive() [2/2]
| void tarch::mpi::StringMessage::receive |
( |
tarch::mpi::StringMessage & | buffer, |
|
|
int | source, |
|
|
int | tag, |
|
|
std::function< void()> | startCommunicationFunctor, |
|
|
std::function< void()> | waitFunctor, |
|
|
MPI_Comm | communicator ) |
|
static |
◆ receiveAndPollDanglingMessages()
◆ send() [1/2]
| void tarch::mpi::StringMessage::send |
( |
const tarch::mpi::StringMessage & | buffer, |
|
|
int | destination, |
|
|
int | tag, |
|
|
MPI_Comm | communicator ) |
|
static |
In DaStGen (the first version), I had a non-static version of the send as well as the receive.
However, this did not work with newer C++11 versions, as a member function using this as pointer usually doesn't see the vtable while the init sees the object from outside, i.e. including a vtable. So this routine now is basically an alias for a blocking MPI_Send.
◆ send() [2/2]
| void tarch::mpi::StringMessage::send |
( |
const tarch::mpi::StringMessage & | buffer, |
|
|
int | destination, |
|
|
int | tag, |
|
|
std::function< void()> | startCommunicationFunctor, |
|
|
std::function< void()> | waitFunctor, |
|
|
MPI_Comm | communicator ) |
|
static |
Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.
In systems with heavy MPI usage, this can help to avoid deadlocks.
◆ sendAndPollDanglingMessages()
| void tarch::mpi::StringMessage::sendAndPollDanglingMessages |
( |
const tarch::mpi::StringMessage & | message, |
|
|
int | destination, |
|
|
int | tag ) |
|
static |
◆ setData()
| void tarch::mpi::StringMessage::setData |
( |
const std::string & | value | ) |
|
◆ toString()
| std::string tarch::mpi::StringMessage::toString |
( |
| ) |
const |
◆ _data
| std::string tarch::mpi::StringMessage::_data |
|
private |
◆ _senderDestinationRank
| int tarch::mpi::StringMessage::_senderDestinationRank |
|
private |
The documentation for this struct was generated from the following file: