Wrapper around BufferSystem for OpenMP parallel MPI communication.
Manages a set of sending (packing) and receiving (unpacking) functions for all communication partners. These functions are executed in parallel and are not allowed to influence each other.
When running multiple BufferSystems concurrently different MPI tags have to be used for the systems: the tag can be passed in the constructor.
#include <OpenMPBufferSystem.h>
Public Member Functions | |
GenericOpenMPBufferSystem (const MPI_Comm &communicator, int tag=0, bool _serialSends=false, bool _serialRecvs=false) | |
void | enforceSerialSends (bool val) |
void | enforceSerialRecvs (bool val) |
void | setReceiverInfo (bool _sizeChangesEverytime) |
bool | isSizeCommunicatedInNextStep () const |
void | addReceivingFunction (MPIRank rank, const std::function< void(RecvBuffer_T &buf) > &recvFunction) |
void | addSendingFunction (MPIRank rank, const std::function< void(SendBuffer_T &buf) > &sendFunction) |
void | clearReceivingFunctions () |
void | clearSendingFunctions () |
void | startCommunication () |
void | wait () |
bool | sizeChangesEverytime () const |
bool | serialSends () const |
bool | serialRecvs () const |
Private Member Functions | |
void | setupBufferSystem () |
void | startCommunicationOpenMP () |
void | startCommunicationSerial () |
void | waitOpenMP () |
void | waitSerial () |
Private Attributes | |
GenericBufferSystem< RecvBuffer_T, SendBuffer_T > | bs_ |
bool | dirty_ |
bool | serialSends_ |
bool | serialRecvs_ |
bool | sizeChangesEverytime_ |
std::map< MPIRank, std::function< void(RecvBuffer_T &)> > | recvFunctions_ |
std::vector< MPIRank > | sendRanks_ |
std::vector< std::function< void(SendBuffer_T &)> > | sendFunctions_ |
walberla::mpi::GenericOpenMPBufferSystem< Rb, Sb >::GenericOpenMPBufferSystem | ( | const MPI_Comm & | communicator, |
int | tag = 0 , |
||
bool | _serialSends = false , |
||
bool | _serialRecvs = false |
||
) |
void walberla::mpi::GenericOpenMPBufferSystem< Rb, Sb >::addReceivingFunction | ( | MPIRank | rank, |
const std::function< void(RecvBuffer_T &buf) > & | recvFunction | ||
) |
void walberla::mpi::GenericOpenMPBufferSystem< Rb, Sb >::addSendingFunction | ( | MPIRank | rank, |
const std::function< void(SendBuffer_T &buf) > & | sendFunction | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
inline |
void walberla::mpi::GenericOpenMPBufferSystem< Rb, Sb >::startCommunication |
|
private |
|
private |
void walberla::mpi::GenericOpenMPBufferSystem< Rb, Sb >::wait |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |