![]() |
Peano
|
#include <AutomatonState.h>
Public Types | |
enum | ObjectConstruction { NoData } |
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 peano4::grid::AutomatonState &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::grid::AutomatonState &buffer, int source, int tag, MPI_Comm communicator) |
static void | send (const peano4::grid::AutomatonState &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::grid::AutomatonState &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
static void | sendAndPollDanglingMessages (const peano4::grid::AutomatonState &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
static void | receiveAndPollDanglingMessages (peano4::grid::AutomatonState &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
Private Attributes | |
int | _level |
tarch::la::Vector< Dimensions, double > | _x |
tarch::la::Vector< Dimensions, double > | _h |
bool | _inverted |
std::bitset< Dimensions > | _evenFlags |
tarch::la::Vector< DimensionsTimesTwo, int > | _accessNumber |
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 32 of file AutomatonState.h.
Enumerator | |
---|---|
NoData |
Definition at line 160 of file AutomatonState.h.
|
default |
peano4::grid::AutomatonState::AutomatonState | ( | int | __level, |
tarch::la::Vector< Dimensions, double > | __x, | ||
tarch::la::Vector< Dimensions, double > | __h, | ||
bool | __inverted, | ||
std::bitset< Dimensions > | __evenFlags, | ||
tarch::la::Vector< DimensionsTimesTwo, int > | __accessNumber ) |
Definition at line 6 of file AutomatonState.cpp.
References setAccessNumber(), setEvenFlags(), setH(), setInverted(), setLevel(), and setX().
peano4::grid::AutomatonState::AutomatonState | ( | const AutomatonState & | copy | ) |
Definition at line 15 of file AutomatonState.cpp.
References setEvenFlags(), setH(), setInverted(), setLevel(), and setX().
|
default |
peano4::grid::AutomatonState::AutomatonState | ( | ObjectConstruction | ) |
Definition at line 162 of file AutomatonState.h.
Definition at line 161 of file AutomatonState.cpp.
Referenced by peano4::grid::PeanoCurve::invertEvenFlag().
|
static |
Definition at line 263 of file AutomatonState.cpp.
|
static |
Definition at line 236 of file AutomatonState.cpp.
|
static |
Definition at line 245 of file AutomatonState.cpp.
|
static |
Definition at line 254 of file AutomatonState.cpp.
|
static |
Definition at line 272 of file AutomatonState.cpp.
tarch::la::Vector< DimensionsTimesTwo, int > peano4::grid::AutomatonState::getAccessNumber | ( | ) | const |
Definition at line 166 of file AutomatonState.cpp.
References DimensionsTimesTwo.
Referenced by peano4::grid::PeanoCurve::getFaceReadStackNumber(), peano4::grid::PeanoCurve::getFaceWriteStackNumber(), peano4::grid::PeanoCurve::getVertexReadStackNumber(), peano4::grid::PeanoCurve::getVertexWriteStackNumber(), operator=(), peano4::grid::PeanoCurve::removeFaceAccessNumber(), and peano4::grid::PeanoCurve::setFaceAccessNumber().
Definition at line 184 of file AutomatonState.cpp.
|
static |
Definition at line 224 of file AutomatonState.cpp.
std::bitset< Dimensions > peano4::grid::AutomatonState::getEvenFlags | ( | ) | const |
Definition at line 137 of file AutomatonState.cpp.
Referenced by peano4::grid::PeanoCurve::getFaceNumberAlongCurve(), peano4::grid::PeanoCurve::getFaceReadStackNumber(), peano4::grid::PeanoCurve::getFaceWriteStackNumber(), peano4::grid::PeanoCurve::getFirstVertexIndex(), peano4::grid::PeanoCurve::getVertexReadStackNumber(), peano4::grid::PeanoCurve::getVertexWriteStackNumber(), and operator=().
Definition at line 151 of file AutomatonState.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 206 of file AutomatonState.cpp.
|
static |
Definition at line 212 of file AutomatonState.cpp.
tarch::la::Vector< Dimensions, double > peano4::grid::AutomatonState::getH | ( | ) | const |
Definition at line 99 of file AutomatonState.cpp.
Referenced by peano4::grid::GridTraversalEventGenerator::createGenericCellTraversalEvent(), peano4::grid::Spacetree::descend(), peano4::grid::Spacetree::evaluateGridControlEvents(), peano4::grid::Spacetree::loadVertices(), operator=(), and peano4::grid::Spacetree::refineState().
Definition at line 117 of file AutomatonState.cpp.
bool peano4::grid::AutomatonState::getInverted | ( | ) | const |
Definition at line 127 of file AutomatonState.cpp.
Referenced by peano4::grid::PeanoCurve::getFaceNumberAlongCurve(), peano4::grid::PeanoCurve::getFaceReadStackNumber(), peano4::grid::PeanoCurve::getFaceWriteStackNumber(), peano4::grid::PeanoCurve::getFirstVertexIndex(), peano4::grid::PeanoCurve::getInputStackNumber(), peano4::grid::PeanoCurve::getOutputStackNumber(), and operator=().
|
static |
Definition at line 218 of file AutomatonState.cpp.
int peano4::grid::AutomatonState::getLevel | ( | ) | const |
Definition at line 61 of file AutomatonState.cpp.
Referenced by peano4::grid::GridTraversalEventGenerator::createGenericCellTraversalEvent(), peano4::grid::Spacetree::loadVertices(), operator=(), and peano4::grid::Spacetree::refineState().
|
static |
Definition at line 230 of file AutomatonState.cpp.
int peano4::grid::AutomatonState::getSenderRank | ( | ) | const |
Definition at line 280 of file AutomatonState.cpp.
tarch::la::Vector< Dimensions, double > peano4::grid::AutomatonState::getX | ( | ) | const |
Definition at line 71 of file AutomatonState.cpp.
Referenced by peano4::grid::GridTraversalEventGenerator::createGenericCellTraversalEvent(), peano4::grid::Spacetree::loadVertices(), operator=(), and peano4::grid::Spacetree::refineState().
Definition at line 89 of file AutomatonState.cpp.
|
static |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.
Definition at line 285 of file AutomatonState.cpp.
References DimensionsTimesTwo.
Referenced by peano4::parallel::Node::initMPIDatatypes().
peano4::grid::AutomatonState & peano4::grid::AutomatonState::operator= | ( | const AutomatonState & | other | ) |
Definition at line 24 of file AutomatonState.cpp.
References getAccessNumber(), getEvenFlags(), getH(), getInverted(), getLevel(), getX(), setEvenFlags(), setH(), setInverted(), setLevel(), and setX().
|
static |
Definition at line 388 of file AutomatonState.cpp.
References _senderDestinationRank.
Referenced by peano4::parallel::SpacetreeSet::answerQuestions(), and receiveAndPollDanglingMessages().
|
static |
Definition at line 415 of file AutomatonState.cpp.
References _senderDestinationRank.
|
static |
Definition at line 455 of file AutomatonState.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().
|
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 383 of file AutomatonState.cpp.
Referenced by peano4::parallel::SpacetreeSet::addSpacetree(), and sendAndPollDanglingMessages().
|
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 395 of file AutomatonState.cpp.
|
static |
Definition at line 438 of file AutomatonState.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().
void peano4::grid::AutomatonState::setAccessNumber | ( | const tarch::la::Vector< DimensionsTimesTwo, int > & | value | ) |
Definition at line 176 of file AutomatonState.cpp.
References DimensionsTimesTwo.
Referenced by AutomatonState(), peano4::grid::PeanoCurve::removeFaceAccessNumber(), peano4::grid::PeanoCurve::setFaceAccessNumber(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
Definition at line 189 of file AutomatonState.cpp.
void peano4::grid::AutomatonState::setEvenFlags | ( | const std::bitset< Dimensions > & | value | ) |
Definition at line 145 of file AutomatonState.cpp.
Referenced by AutomatonState(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
Definition at line 156 of file AutomatonState.cpp.
void peano4::grid::AutomatonState::setH | ( | const tarch::la::Vector< Dimensions, double > & | value | ) |
Definition at line 109 of file AutomatonState.cpp.
Referenced by AutomatonState(), peano4::grid::Spacetree::refineState(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
Definition at line 122 of file AutomatonState.cpp.
Definition at line 132 of file AutomatonState.cpp.
Referenced by AutomatonState(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
Definition at line 66 of file AutomatonState.cpp.
Referenced by AutomatonState(), peano4::grid::Spacetree::refineState(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
void peano4::grid::AutomatonState::setX | ( | const tarch::la::Vector< Dimensions, double > & | value | ) |
Definition at line 81 of file AutomatonState.cpp.
Referenced by AutomatonState(), peano4::grid::Spacetree::refineState(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().
Definition at line 94 of file AutomatonState.cpp.
|
static |
Free the underlying MPI datatype.
Definition at line 369 of file AutomatonState.cpp.
Referenced by peano4::parallel::Node::shutdownMPIDatatypes().
std::string peano4::grid::AutomatonState::toString | ( | ) | const |
Definition at line 39 of file AutomatonState.cpp.
Referenced by peano4::grid::GridTraversalEventGenerator::createEnterCellTraversalEvent(), peano4::grid::GridTraversalEventGenerator::createGenericCellTraversalEvent(), peano4::grid::GridTraversalEventGenerator::createLeaveCellTraversalEvent(), peano4::grid::Spacetree::descend(), peano4::grid::Spacetree::evaluateGridControlEvents(), peano4::grid::Spacetree::loadVertices(), peano4::grid::Spacetree::receiveAndMergeUserData(), peano4::grid::Spacetree::refineState(), and peano4::grid::Spacetree::sendUserData().
|
private |
Definition at line 208 of file AutomatonState.h.
|
private |
Definition at line 202 of file AutomatonState.h.
|
private |
Definition at line 195 of file AutomatonState.h.
|
private |
Definition at line 197 of file AutomatonState.h.
|
private |
Definition at line 184 of file AutomatonState.h.
|
private |
Definition at line 212 of file AutomatonState.h.
|
private |
Definition at line 189 of file AutomatonState.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 221 of file AutomatonState.h.