Peano
Loading...
Searching...
No Matches
tarch::mpi::DoubleMessage Struct Reference

#include <DoubleMessage.h>

Public Types

enum  ObjectConstruction { NoData }

Public Member Functions

 DoubleMessage ()
 DoubleMessage (double __value)
double getValue () const
void setValue (double value)
 DoubleMessage (const DoubleMessage &copy)=default
int getSenderRank () const
 DoubleMessage (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::DoubleMessage &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::DoubleMessage &buffer, int source, int tag, MPI_Comm communicator)
static void send (const tarch::mpi::DoubleMessage &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::DoubleMessage &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator)
static void sendAndPollDanglingMessages (const tarch::mpi::DoubleMessage &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
static void receiveAndPollDanglingMessages (tarch::mpi::DoubleMessage &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())

Private Attributes

double _value
int _senderDestinationRank

Static Private Attributes

static MPI_Datatype Datatype
 Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.

Detailed Description

Definition at line 33 of file DoubleMessage.h.

Member Enumeration Documentation

◆ ObjectConstruction

Enumerator
NoData 

Definition at line 121 of file DoubleMessage.h.

Constructor & Destructor Documentation

◆ DoubleMessage() [1/4]

tarch::mpi::DoubleMessage::DoubleMessage ( )

Definition at line 37 of file DoubleMessage.h.

Referenced by DoubleMessage(), and DoubleMessage().

Here is the caller graph for this function:

◆ DoubleMessage() [2/4]

tarch::mpi::DoubleMessage::DoubleMessage ( double __value)

◆ DoubleMessage() [3/4]

tarch::mpi::DoubleMessage::DoubleMessage ( const DoubleMessage & copy)
default

References DoubleMessage().

Here is the call graph for this function:

◆ DoubleMessage() [4/4]

tarch::mpi::DoubleMessage::DoubleMessage ( ObjectConstruction )

Definition at line 125 of file DoubleMessage.h.

References DoubleMessage().

Here is the call graph for this function:

Member Function Documentation

◆ freeBoundaryExchangeDatatype()

void tarch::mpi::DoubleMessage::freeBoundaryExchangeDatatype ( )
static

◆ freeForkDatatype()

void tarch::mpi::DoubleMessage::freeForkDatatype ( )
static

◆ freeGlobalCommunciationDatatype()

void tarch::mpi::DoubleMessage::freeGlobalCommunciationDatatype ( )
static

◆ freeJoinDatatype()

void tarch::mpi::DoubleMessage::freeJoinDatatype ( )
static

◆ freeMultiscaleDataExchangeDatatype()

void tarch::mpi::DoubleMessage::freeMultiscaleDataExchangeDatatype ( )
static

◆ getBoundaryExchangeDatatype()

MPI_Datatype tarch::mpi::DoubleMessage::getBoundaryExchangeDatatype ( )
static

◆ getForkDatatype()

MPI_Datatype tarch::mpi::DoubleMessage::getForkDatatype ( )
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.

◆ getGlobalCommunciationDatatype()

MPI_Datatype tarch::mpi::DoubleMessage::getGlobalCommunciationDatatype ( )
static

◆ getJoinDatatype()

MPI_Datatype tarch::mpi::DoubleMessage::getJoinDatatype ( )
static

◆ getMultiscaleDataExchangeDatatype()

MPI_Datatype tarch::mpi::DoubleMessage::getMultiscaleDataExchangeDatatype ( )
static

◆ getSenderRank()

int tarch::mpi::DoubleMessage::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.

◆ getValue()

double tarch::mpi::DoubleMessage::getValue ( ) const

◆ initDatatype()

void tarch::mpi::DoubleMessage::initDatatype ( )
static

Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.

◆ receive() [1/2]

void tarch::mpi::DoubleMessage::receive ( tarch::mpi::DoubleMessage & buffer,
int source,
int tag,
MPI_Comm communicator )
static

◆ receive() [2/2]

void tarch::mpi::DoubleMessage::receive ( tarch::mpi::DoubleMessage & buffer,
int source,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
static

◆ receiveAndPollDanglingMessages()

void tarch::mpi::DoubleMessage::receiveAndPollDanglingMessages ( tarch::mpi::DoubleMessage & message,
int source,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ send() [1/2]

void tarch::mpi::DoubleMessage::send ( const tarch::mpi::DoubleMessage & 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::DoubleMessage::send ( const tarch::mpi::DoubleMessage & 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::DoubleMessage::sendAndPollDanglingMessages ( const tarch::mpi::DoubleMessage & message,
int destination,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ setValue()

void tarch::mpi::DoubleMessage::setValue ( double value)

◆ shutdownDatatype()

void tarch::mpi::DoubleMessage::shutdownDatatype ( )
static

Free the underlying MPI datatype.

◆ toString()

std::string tarch::mpi::DoubleMessage::toString ( ) const

Field Documentation

◆ _senderDestinationRank

int tarch::mpi::DoubleMessage::_senderDestinationRank
private

Definition at line 143 of file DoubleMessage.h.

◆ _value

double tarch::mpi::DoubleMessage::_value
private

Definition at line 137 of file DoubleMessage.h.

◆ Datatype

MPI_Datatype tarch::mpi::DoubleMessage::Datatype
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 DoubleMessage.h.


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