Peano 4
Loading...
Searching...
No Matches
peano4::parallel::TreeEntry Struct Reference

#include <TreeEntry.h>

Public Types

enum  ObjectConstruction { NoData }
 

Public Member Functions

 TreeEntry ()
 
 TreeEntry (int __id, int __master)
 
int getId () const
 
void setId (int value)
 
int getMaster () const
 
void setMaster (int value)
 
 TreeEntry (const TreeEntry &copy)=default
 
PragmaPop int getSenderRank () const
 
 TreeEntry (ObjectConstruction)
 
std::string toString () const
 

Static Public Member Functions

PragmaPush static SilenceUnknownAttribute 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 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 peano4::parallel::TreeEntry &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 (peano4::parallel::TreeEntry &buffer, int source, int tag, MPI_Comm communicator)
 
static void send (const peano4::parallel::TreeEntry &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 (peano4::parallel::TreeEntry &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator)
 
static void sendAndPollDanglingMessages (const peano4::parallel::TreeEntry &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
 
static void receiveAndPollDanglingMessages (peano4::parallel::TreeEntry &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
 

Private Attributes

PragmaPush SilenceUnknownAttribute int _id
 
int _master
 
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 27 of file TreeEntry.h.

Member Enumeration Documentation

◆ ObjectConstruction

Enumerator
NoData 

Definition at line 102 of file TreeEntry.h.

Constructor & Destructor Documentation

◆ TreeEntry() [1/4]

peano4::parallel::TreeEntry::TreeEntry ( )

Definition at line 29 of file TreeEntry.h.

◆ TreeEntry() [2/4]

peano4::parallel::TreeEntry::TreeEntry ( int __id,
int __master )

Definition at line 10 of file TreeEntry.cpp.

References setId(), and setMaster().

Here is the call graph for this function:

◆ TreeEntry() [3/4]

peano4::parallel::TreeEntry::TreeEntry ( const TreeEntry & copy)
default

◆ TreeEntry() [4/4]

peano4::parallel::TreeEntry::TreeEntry ( ObjectConstruction )

Definition at line 106 of file TreeEntry.h.

Member Function Documentation

◆ getBoundaryExchangeDatatype()

MPI_Datatype peano4::parallel::TreeEntry::getBoundaryExchangeDatatype ( )
static

Definition at line 81 of file TreeEntry.cpp.

◆ getForkDatatype()

MPI_Datatype peano4::parallel::TreeEntry::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.

Definition at line 63 of file TreeEntry.cpp.

◆ getGlobalCommunciationDatatype()

MPI_Datatype peano4::parallel::TreeEntry::getGlobalCommunciationDatatype ( )
static

Definition at line 69 of file TreeEntry.cpp.

◆ getId()

int peano4::parallel::TreeEntry::getId ( ) const

Definition at line 31 of file TreeEntry.cpp.

◆ getJoinDatatype()

MPI_Datatype peano4::parallel::TreeEntry::getJoinDatatype ( )
static

Definition at line 75 of file TreeEntry.cpp.

◆ getMaster()

int peano4::parallel::TreeEntry::getMaster ( ) const

Definition at line 41 of file TreeEntry.cpp.

◆ getMultiscaleDataExchangeDatatype()

MPI_Datatype peano4::parallel::TreeEntry::getMultiscaleDataExchangeDatatype ( )
static

Definition at line 87 of file TreeEntry.cpp.

◆ getSenderRank()

int peano4::parallel::TreeEntry::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.

Definition at line 92 of file TreeEntry.cpp.

◆ initDatatype()

void peano4::parallel::TreeEntry::initDatatype ( )
static

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

Definition at line 97 of file TreeEntry.cpp.

◆ receive() [1/2]

void peano4::parallel::TreeEntry::receive ( peano4::parallel::TreeEntry & buffer,
int source,
int tag,
MPI_Comm communicator )
static

Definition at line 182 of file TreeEntry.cpp.

References _senderDestinationRank.

Referenced by receiveAndPollDanglingMessages().

Here is the caller graph for this function:

◆ receive() [2/2]

void peano4::parallel::TreeEntry::receive ( peano4::parallel::TreeEntry & buffer,
int source,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
static

Definition at line 209 of file TreeEntry.cpp.

References _senderDestinationRank.

◆ receiveAndPollDanglingMessages()

◆ send() [1/2]

void peano4::parallel::TreeEntry::send ( const peano4::parallel::TreeEntry & 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.

Definition at line 177 of file TreeEntry.cpp.

Referenced by sendAndPollDanglingMessages().

Here is the caller graph for this function:

◆ send() [2/2]

void peano4::parallel::TreeEntry::send ( const peano4::parallel::TreeEntry & 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.

Definition at line 189 of file TreeEntry.cpp.

◆ sendAndPollDanglingMessages()

◆ setId()

void peano4::parallel::TreeEntry::setId ( int value)

Definition at line 36 of file TreeEntry.cpp.

Referenced by peano4::parallel::Node::registerId(), and TreeEntry().

Here is the caller graph for this function:

◆ setMaster()

void peano4::parallel::TreeEntry::setMaster ( int value)

Definition at line 46 of file TreeEntry.cpp.

Referenced by peano4::parallel::Node::registerId(), and TreeEntry().

Here is the caller graph for this function:

◆ shutdownDatatype()

void peano4::parallel::TreeEntry::shutdownDatatype ( )
static

Free the underlying MPI datatype.

Definition at line 157 of file TreeEntry.cpp.

◆ toString()

std::string peano4::parallel::TreeEntry::toString ( ) const

Definition at line 17 of file TreeEntry.cpp.

Field Documentation

◆ _id

PragmaPush SilenceUnknownAttribute int peano4::parallel::TreeEntry::_id
private

Definition at line 120 of file TreeEntry.h.

◆ _master

int peano4::parallel::TreeEntry::_master
private

Definition at line 121 of file TreeEntry.h.

◆ _senderDestinationRank

int peano4::parallel::TreeEntry::_senderDestinationRank
private

Definition at line 126 of file TreeEntry.h.

Referenced by receive(), and receive().

◆ Datatype

MPI_Datatype peano4::parallel::TreeEntry::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 135 of file TreeEntry.h.


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