![]() |
Peano
|
#include <IntegerMessage.h>
Public Types | |
enum | ObjectConstruction { NoData } |
Public Member Functions | |
IntegerMessage () | |
IntegerMessage (int __value) | |
int | getValue () const |
void | setValue (int value) |
IntegerMessage (const IntegerMessage ©)=default | |
int | getSenderRank () const |
IntegerMessage (ObjectConstruction) | |
std::string | toString () const |
Static Public Member Functions | |
static MPI_Datatype | getForkDatatype () |
Hands out MPI datatype if we work without the LLVM MPI extension. | |
static MPI_Datatype | getJoinDatatype () |
static MPI_Datatype | getBoundaryExchangeDatatype () |
static MPI_Datatype | getMultiscaleDataExchangeDatatype () |
static MPI_Datatype | getGlobalCommunciationDatatype () |
static void | freeForkDatatype () |
static void | freeJoinDatatype () |
static void | freeBoundaryExchangeDatatype () |
static void | freeMultiscaleDataExchangeDatatype () |
static void | freeGlobalCommunciationDatatype () |
static void | initDatatype () |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation. | |
static void | shutdownDatatype () |
Free the underlying MPI datatype. | |
static void | send (const tarch::mpi::IntegerMessage &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::IntegerMessage &buffer, int source, int tag, MPI_Comm communicator) |
static void | send (const tarch::mpi::IntegerMessage &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::IntegerMessage &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
static void | sendAndPollDanglingMessages (const tarch::mpi::IntegerMessage &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
static void | receiveAndPollDanglingMessages (tarch::mpi::IntegerMessage &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
Private Attributes | |
int | _value |
int | _senderDestinationRank |
Static Private Attributes | |
static MPI_Datatype | Datatype = MPI_DATATYPE_NULL |
Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype. | |
Definition at line 33 of file IntegerMessage.h.
Enumerator | |
---|---|
NoData |
Definition at line 121 of file IntegerMessage.h.
tarch::mpi::IntegerMessage::IntegerMessage | ( | ) |
Definition at line 37 of file IntegerMessage.h.
tarch::mpi::IntegerMessage::IntegerMessage | ( | int | __value | ) |
Definition at line 10 of file IntegerMessage.cpp.
References setValue().
|
default |
tarch::mpi::IntegerMessage::IntegerMessage | ( | ObjectConstruction | ) |
Definition at line 125 of file IntegerMessage.h.
|
static |
Definition at line 107 of file IntegerMessage.cpp.
|
static |
Definition at line 80 of file IntegerMessage.cpp.
|
static |
Definition at line 89 of file IntegerMessage.cpp.
|
static |
Definition at line 98 of file IntegerMessage.cpp.
|
static |
Definition at line 116 of file IntegerMessage.cpp.
|
static |
Definition at line 68 of file IntegerMessage.cpp.
|
static |
Hands out MPI datatype if we work without the LLVM MPI extension.
If we work with this additional feature, this is the routine where the lazy initialisation is done and the datatype is also cached.
Definition at line 50 of file IntegerMessage.cpp.
|
static |
Definition at line 56 of file IntegerMessage.cpp.
Referenced by peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage().
|
static |
Definition at line 62 of file IntegerMessage.cpp.
|
static |
Definition at line 74 of file IntegerMessage.cpp.
int tarch::mpi::IntegerMessage::getSenderRank | ( | ) | const |
Definition at line 124 of file IntegerMessage.cpp.
int tarch::mpi::IntegerMessage::getValue | ( | ) | const |
Definition at line 28 of file IntegerMessage.cpp.
Referenced by toolbox::particles::SieveParticles< T >::exchangeSieveListsGlobally(), tarch::hasNonCriticalAssertionBeenViolated(), peano4::parallel::SpacetreeSet::streamDataFromSplittingTreeToNewTree(), and peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage().
|
static |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.
Definition at line 129 of file IntegerMessage.cpp.
Referenced by tarch::mpi::Rank::init().
|
static |
Definition at line 202 of file IntegerMessage.cpp.
References _senderDestinationRank.
Referenced by tarch::hasNonCriticalAssertionBeenViolated(), receiveAndPollDanglingMessages(), and peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage().
|
static |
Definition at line 229 of file IntegerMessage.cpp.
References _senderDestinationRank.
|
static |
Definition at line 269 of file IntegerMessage.cpp.
References tarch::mpi::Rank::getInstance(), tarch::services::ServiceRepository::getInstance(), receive(), tarch::services::ServiceRepository::receiveDanglingMessages(), tarch::mpi::Rank::setDeadlockTimeOutTimeStamp(), tarch::mpi::Rank::setDeadlockWarningTimeStamp(), tarch::mpi::Rank::triggerDeadlockTimeOut(), and tarch::mpi::Rank::writeTimeOutWarning().
Referenced by toolbox::particles::SieveParticles< T >::exchangeSieveListsGlobally(), and peano4::parallel::SpacetreeSet::streamDataFromSplittingTreeToNewTree().
|
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.
Definition at line 197 of file IntegerMessage.cpp.
Referenced by sendAndPollDanglingMessages(), peano4::parallel::SpacetreeSet::streamDataFromSplittingTreeToNewTree(), peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage(), and tarch::triggerNonCriticalAssertion().
|
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.
Definition at line 209 of file IntegerMessage.cpp.
|
static |
Definition at line 252 of file IntegerMessage.cpp.
References tarch::mpi::Rank::getInstance(), tarch::services::ServiceRepository::getInstance(), tarch::services::ServiceRepository::receiveDanglingMessages(), send(), tarch::mpi::Rank::setDeadlockTimeOutTimeStamp(), tarch::mpi::Rank::setDeadlockWarningTimeStamp(), tarch::mpi::Rank::triggerDeadlockTimeOut(), and tarch::mpi::Rank::writeTimeOutWarning().
Referenced by toolbox::particles::SieveParticles< T >::exchangeSieveListsGlobally().
Definition at line 33 of file IntegerMessage.cpp.
Referenced by IntegerMessage(), and peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage().
|
static |
Free the underlying MPI datatype.
Definition at line 183 of file IntegerMessage.cpp.
Referenced by tarch::mpi::Rank::shutdown().
std::string tarch::mpi::IntegerMessage::toString | ( | ) | const |
Definition at line 16 of file IntegerMessage.cpp.
Referenced by peano4::parallel::tests::PingPongTest::testDaStGenTypeIntegerMessage().
|
private |
Definition at line 143 of file IntegerMessage.h.
|
private |
Definition at line 137 of file IntegerMessage.h.
|
staticprivate |
Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.
However, Peano calls init explicitly in most cases. Without the LLVM extension which caches the MPI datatype once constructed, this field stores the type.
Definition at line 152 of file IntegerMessage.h.