![]() |
Peano
|
#include <GridControlEvent.h>
Public Types | |
enum class | RefinementControl : int { Refine =0 , Erase =1 } |
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::GridControlEvent &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::GridControlEvent &buffer, int source, int tag, MPI_Comm communicator) |
static void | send (const peano4::grid::GridControlEvent &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::GridControlEvent &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
static void | sendAndPollDanglingMessages (const peano4::grid::GridControlEvent &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
static void | receiveAndPollDanglingMessages (peano4::grid::GridControlEvent &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
Private Attributes | |
RefinementControl | _refinementControl |
tarch::la::Vector< Dimensions, double > | _offset |
tarch::la::Vector< Dimensions, double > | _width |
tarch::la::Vector< Dimensions, double > | _h |
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 34 of file GridControlEvent.h.
Enumerator | |
---|---|
NoData |
Definition at line 135 of file GridControlEvent.h.
|
strong |
Enumerator | |
---|---|
Refine | |
Erase |
Definition at line 36 of file GridControlEvent.h.
peano4::grid::GridControlEvent::GridControlEvent | ( | ) |
Definition at line 40 of file GridControlEvent.h.
peano4::grid::GridControlEvent::GridControlEvent | ( | RefinementControl | __refinementControl, |
tarch::la::Vector< Dimensions, double > | __offset, | ||
tarch::la::Vector< Dimensions, double > | __width, | ||
tarch::la::Vector< Dimensions, double > | __h ) |
Definition at line 6 of file GridControlEvent.cpp.
References setH(), setOffset(), setRefinementControl(), and setWidth().
|
default |
peano4::grid::GridControlEvent::GridControlEvent | ( | ObjectConstruction | ) |
Definition at line 139 of file GridControlEvent.h.
|
static |
Definition at line 149 of file GridControlEvent.cpp.
|
static |
Definition at line 122 of file GridControlEvent.cpp.
|
static |
Definition at line 131 of file GridControlEvent.cpp.
|
static |
Definition at line 140 of file GridControlEvent.cpp.
|
static |
Definition at line 158 of file GridControlEvent.cpp.
|
static |
Definition at line 111 of file GridControlEvent.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 96 of file GridControlEvent.cpp.
|
static |
Definition at line 101 of file GridControlEvent.cpp.
Referenced by exahype2::RefinementControlService::receiveDanglingMessages(), and exahype2::RefinementControlService::triggerSendOfCopyOfCommittedEvents().
tarch::la::Vector< Dimensions, double > peano4::grid::GridControlEvent::getH | ( | ) | const |
Definition at line 67 of file GridControlEvent.cpp.
Referenced by exahype2::RefinementControl::addCommand(), peano4::grid::internal::equals(), peano4::grid::internal::refinementEventOverrulesCoarsening(), peano4::grid::internal::sort(), and peano4::grid::internal::twoEventsAreAdjacent().
Definition at line 75 of file GridControlEvent.cpp.
|
static |
Definition at line 106 of file GridControlEvent.cpp.
|
static |
Definition at line 116 of file GridControlEvent.cpp.
tarch::la::Vector< Dimensions, double > peano4::grid::GridControlEvent::getOffset | ( | ) | const |
Definition at line 35 of file GridControlEvent.cpp.
Referenced by peano4::grid::internal::createBoundingBoxEvent(), peano4::grid::internal::equals(), peano4::grid::isContained(), peano4::grid::overlaps(), peano4::grid::overlaps(), peano4::grid::internal::sort(), peano4::grid::internal::twoEventsAreAdjacent(), and peano4::grid::internal::twoEventsOverlap().
Definition at line 43 of file GridControlEvent.cpp.
peano4::grid::GridControlEvent::RefinementControl peano4::grid::GridControlEvent::getRefinementControl | ( | ) | const |
Definition at line 27 of file GridControlEvent.cpp.
Referenced by peano4::grid::internal::equals(), and peano4::grid::internal::refinementEventOverrulesCoarsening().
int peano4::grid::GridControlEvent::getSenderRank | ( | ) | const |
Definition at line 166 of file GridControlEvent.cpp.
tarch::la::Vector< Dimensions, double > peano4::grid::GridControlEvent::getWidth | ( | ) | const |
Definition at line 51 of file GridControlEvent.cpp.
Referenced by exahype2::RefinementControl::addCommand(), peano4::grid::internal::createBoundingBoxEvent(), peano4::grid::internal::equals(), peano4::grid::isContained(), peano4::grid::overlaps(), peano4::grid::overlaps(), peano4::grid::internal::twoEventsAreAdjacent(), and peano4::grid::internal::twoEventsOverlap().
Definition at line 59 of file GridControlEvent.cpp.
|
static |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.
Definition at line 170 of file GridControlEvent.cpp.
Referenced by peano4::parallel::Node::initMPIDatatypes().
|
static |
Definition at line 259 of file GridControlEvent.cpp.
References _senderDestinationRank.
Referenced by receiveAndPollDanglingMessages().
|
static |
Definition at line 284 of file GridControlEvent.cpp.
References _senderDestinationRank.
|
static |
Definition at line 324 of file GridControlEvent.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 255 of file GridControlEvent.cpp.
Referenced by 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 265 of file GridControlEvent.cpp.
|
static |
Definition at line 307 of file GridControlEvent.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::GridControlEvent::setH | ( | const tarch::la::Vector< Dimensions, double > & | value | ) |
Definition at line 71 of file GridControlEvent.cpp.
Referenced by examples::grid::MyObserver::getGridControlEvents(), examples::regulargridupscaling::MyObserver::getGridControlEvents(), and GridControlEvent().
Definition at line 79 of file GridControlEvent.cpp.
void peano4::grid::GridControlEvent::setOffset | ( | const tarch::la::Vector< Dimensions, double > & | value | ) |
Definition at line 39 of file GridControlEvent.cpp.
Referenced by examples::grid::MyObserver::getGridControlEvents(), examples::regulargridupscaling::MyObserver::getGridControlEvents(), and GridControlEvent().
Definition at line 47 of file GridControlEvent.cpp.
void peano4::grid::GridControlEvent::setRefinementControl | ( | RefinementControl | value | ) |
Definition at line 31 of file GridControlEvent.cpp.
Referenced by examples::grid::MyObserver::getGridControlEvents(), examples::regulargridupscaling::MyObserver::getGridControlEvents(), and GridControlEvent().
void peano4::grid::GridControlEvent::setWidth | ( | const tarch::la::Vector< Dimensions, double > & | value | ) |
Definition at line 55 of file GridControlEvent.cpp.
Referenced by examples::grid::MyObserver::getGridControlEvents(), examples::regulargridupscaling::MyObserver::getGridControlEvents(), and GridControlEvent().
Definition at line 63 of file GridControlEvent.cpp.
|
static |
Free the underlying MPI datatype.
Definition at line 242 of file GridControlEvent.cpp.
Referenced by peano4::parallel::Node::shutdownMPIDatatypes().
std::string peano4::grid::GridControlEvent::toString | ( | ) | const |
Definition at line 13 of file GridControlEvent.cpp.
Referenced by exahype2::RefinementControl::addCommand(), and peano4::grid::internal::mergeAdjacentRefinementEvents().
|
private |
Definition at line 154 of file GridControlEvent.h.
|
private |
Definition at line 152 of file GridControlEvent.h.
Referenced by scenarios.scenario.Scenario::set_global_simulation_parameters().
|
private |
Definition at line 151 of file GridControlEvent.h.
|
private |
Definition at line 158 of file GridControlEvent.h.
|
private |
Definition at line 153 of file GridControlEvent.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 167 of file GridControlEvent.h.