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

#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 &copy)=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
 Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.
 

Detailed Description

Definition at line 33 of file IntegerMessage.h.

Member Enumeration Documentation

◆ ObjectConstruction

Enumerator
NoData 

Definition at line 121 of file IntegerMessage.h.

Constructor & Destructor Documentation

◆ IntegerMessage() [1/4]

tarch::mpi::IntegerMessage::IntegerMessage ( )

Definition at line 37 of file IntegerMessage.h.

◆ IntegerMessage() [2/4]

tarch::mpi::IntegerMessage::IntegerMessage ( int __value)

◆ IntegerMessage() [3/4]

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

◆ IntegerMessage() [4/4]

tarch::mpi::IntegerMessage::IntegerMessage ( ObjectConstruction )

Definition at line 125 of file IntegerMessage.h.

Member Function Documentation

◆ freeBoundaryExchangeDatatype()

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

◆ freeForkDatatype()

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

◆ freeGlobalCommunciationDatatype()

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

◆ freeJoinDatatype()

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

◆ freeMultiscaleDataExchangeDatatype()

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

◆ getBoundaryExchangeDatatype()

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

◆ getForkDatatype()

static MPI_Datatype tarch::mpi::IntegerMessage::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()

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

◆ getJoinDatatype()

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

◆ getMultiscaleDataExchangeDatatype()

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

◆ getSenderRank()

int tarch::mpi::IntegerMessage::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()

int tarch::mpi::IntegerMessage::getValue ( ) const

◆ initDatatype()

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

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

◆ receive() [1/2]

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

◆ receive() [2/2]

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

◆ receiveAndPollDanglingMessages()

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

◆ send() [1/2]

static void tarch::mpi::IntegerMessage::send ( const tarch::mpi::IntegerMessage & 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]

static void tarch::mpi::IntegerMessage::send ( const tarch::mpi::IntegerMessage & 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()

static void tarch::mpi::IntegerMessage::sendAndPollDanglingMessages ( const tarch::mpi::IntegerMessage & message,
int destination,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

◆ setValue()

void tarch::mpi::IntegerMessage::setValue ( int value)

◆ shutdownDatatype()

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

Free the underlying MPI datatype.

◆ toString()

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

Field Documentation

◆ _senderDestinationRank

int tarch::mpi::IntegerMessage::_senderDestinationRank
private

Definition at line 143 of file IntegerMessage.h.

◆ _value

int tarch::mpi::IntegerMessage::_value
private

Definition at line 137 of file IntegerMessage.h.

Referenced by exahype2.dslhype.SyntaxTree.Integer::__add__(), exahype2.dslhype.SyntaxTree.Integer::__eq__(), exahype2.dslhype.SyntaxTree.Float::__float__(), exahype2.dslhype.SyntaxTree.Integer::__gt__(), exahype2.dslhype.SyntaxTree.Integer::__int__(), exahype2.dslhype.SyntaxTree.Integer::__lt__(), exahype2.dslhype.SyntaxTree.Integer::__neg__(), exahype2.dslhype.SyntaxTree.Boolean::__str__(), exahype2.dslhype.SyntaxTree.String::__str__(), exahype2.dslhype.SyntaxTree.Integer::__sub__(), exahype2.dslhype.SyntaxTree.Subscript::get_type(), exahype2.dslhype.SyntaxTree.VectorIndex::get_type(), exahype2.dslhype.SyntaxTree.Subscript::is_nested_subscript(), exahype2.dslhype.SyntaxTree.Integer::print_cpp(), exahype2.dslhype.SyntaxTree.Boolean::print_cpp(), exahype2.dslhype.SyntaxTree.String::print_cpp(), exahype2.dslhype.SyntaxTree.Float::print_cpp(), exahype2.dslhype.SyntaxTree.Integer::print_mlir(), exahype2.dslhype.SyntaxTree.Boolean::print_mlir(), exahype2.dslhype.SyntaxTree.String::print_mlir(), exahype2.dslhype.SyntaxTree.Float::print_mlir(), exahype2.dslhype.SyntaxTree.Subscript::print_mlir(), exahype2.dslhype.SyntaxTree.VectorIndex::print_mlir(), exahype2.dslhype.SyntaxTree.Integer::print_omp(), exahype2.dslhype.SyntaxTree.Boolean::print_omp(), exahype2.dslhype.SyntaxTree.String::print_omp(), exahype2.dslhype.SyntaxTree.Float::print_omp(), exahype2.dslhype.SyntaxTree.Integer::print_sycl(), exahype2.dslhype.SyntaxTree.Boolean::print_sycl(), exahype2.dslhype.SyntaxTree.String::print_sycl(), exahype2.dslhype.SyntaxTree.Float::print_sycl(), exahype2.dslhype.SyntaxTree.Integer::print_tree(), exahype2.dslhype.SyntaxTree.Boolean::print_tree(), exahype2.dslhype.SyntaxTree.String::print_tree(), and exahype2.dslhype.SyntaxTree.Float::print_tree().

◆ Datatype

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


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