12 std::ostringstream out;
34 message, destination, tag,
69 return _senderDestinationRank;
74 MPI_Send( buffer.
_data.c_str(), buffer.
_data.size()+1, MPI_CHAR, destination, tag, communicator);
80 MPI_Probe( source, tag, communicator, &status );
82 MPI_Get_count( &status, MPI_CHAR, &count );
84 MPI_Recv( &tmp, count, MPI_CHAR, source, tag, communicator, &status);
94 std::function<
void()> startCommunicationFunctor,
95 std::function<
void()> waitFunctor,
98 MPI_Request sendRequestHandle;
100 MPI_Isend( buffer.
_data.c_str(), buffer.
_data.size()+1, MPI_CHAR, destination, tag, communicator, &sendRequestHandle );
101 MPI_Test( &sendRequestHandle, &flag, MPI_STATUS_IGNORE );
102 startCommunicationFunctor();
105 MPI_Test( &sendRequestHandle, &flag, MPI_STATUS_IGNORE );
114 std::function<
void()> startCommunicationFunctor,
115 std::function<
void()> waitFunctor,
116 MPI_Comm communicator
120 MPI_Iprobe( source, tag, communicator, &flag, &status );
121 startCommunicationFunctor();
124 MPI_Iprobe( source, tag, communicator, &flag, &status );
127 MPI_Get_count( &status, MPI_CHAR, &count );
129 MPI_Recv( &tmp, count, MPI_CHAR, source, tag, communicator, &status);
139 communicator, &flag, MPI_STATUS_IGNORE
void triggerDeadlockTimeOut(const std::string &className, const std::string &methodName, int communicationPartnerRank, int tag, int numberOfExpectedMessages=1, const std::string &comment="")
Triggers a time out and shuts down the cluster if a timeout is violated.
void setDeadlockWarningTimeStamp()
Memorise global timeout.
void writeTimeOutWarning(const std::string &className, const std::string &methodName, int communicationPartnerRank, int tag, int numberOfExpectedMessages=1)
Writes a warning if relevant.
void setDeadlockTimeOutTimeStamp()
static Rank & getInstance()
This operation returns the singleton instance.
MPI_Comm getCommunicator() const
virtual void receiveDanglingMessages() override
Answer to MPI Messages.
static ServiceRepository & getInstance()
The string message looks like the other messages which I generate through DaStGen 2,...
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.
int getSenderRank() const
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.
void setData(const std::string &value)
static void sendAndPollDanglingMessages(const tarch::mpi::StringMessage &message, int destination, int tag)
int _senderDestinationRank
static void receive(tarch::mpi::StringMessage &buffer, int source, int tag, MPI_Comm communicator)
std::string toString() const
std::string getData() const
static void receiveAndPollDanglingMessages(tarch::mpi::StringMessage &message, int source, int tag)