MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::VarMessage< Tag > Struct Template Referenceabstract

Variable-length MPI message containing unspecific binary data. More...

#include <communication.hpp>

Inheritance diagram for mfem::VarMessage< Tag >:
[legend]
Collaboration diagram for mfem::VarMessage< Tag >:
[legend]

Public Member Functions

void Isend (int rank, MPI_Comm comm)
 Non-blocking send to processor 'rank'. Returns immediately. Completion (as tested by MPI_Wait/Test) does not mean the message was received – it may be on its way or just buffered locally.
 
void Issend (int rank, MPI_Comm comm)
 Non-blocking synchronous send to processor 'rank'. Returns immediately. Completion (MPI_Wait/Test) means that the message was received.
 
void Recv (int rank, int size, MPI_Comm comm)
 Post-probe receive from processor 'rank' of message size 'size'.
 
void RecvDrop (int rank, int size, MPI_Comm comm)
 Like Recv(), but throw away the message.
 
 VarMessage ()
 
void Clear ()
 Clear the message and associated request.
 
virtual ~VarMessage ()
 
 VarMessage (const VarMessage &other)
 

Static Public Member Functions

template<typename MapT >
static void IsendAll (MapT &rank_msg, MPI_Comm comm)
 Helper to send all messages in a rank-to-message map container.
 
template<typename MapT >
static void WaitAllSent (MapT &rank_msg)
 Helper to wait for all messages in a map container to be sent.
 
template<typename MapT >
static bool TestAllSent (MapT &rank_msg)
 Return true if all messages in the map container were sent, otherwise return false, without waiting.
 
static void Probe (int &rank, int &size, MPI_Comm comm)
 Blocking probe for incoming message of this type from any rank. Returns the rank and message size.
 
static bool IProbe (int &rank, int &size, MPI_Comm comm)
 Non-blocking probe for incoming message of this type from any rank. If there is an incoming message, returns true and sets 'rank' and 'size'. Otherwise returns false.
 
template<typename MapT >
static void RecvAll (MapT &rank_msg, MPI_Comm comm)
 Helper to receive all messages in a rank-to-message map container.
 

Public Attributes

std::string data
 
MPI_Request send_request
 

Protected Member Functions

virtual void Encode (int rank)=0
 
virtual void Decode (int rank)=0
 

Detailed Description

template<int Tag>
struct mfem::VarMessage< Tag >

Variable-length MPI message containing unspecific binary data.

Definition at line 422 of file communication.hpp.

Constructor & Destructor Documentation

◆ VarMessage() [1/2]

template<int Tag>
mfem::VarMessage< Tag >::VarMessage ( )
inline

Definition at line 554 of file communication.hpp.

◆ ~VarMessage()

template<int Tag>
virtual mfem::VarMessage< Tag >::~VarMessage ( )
inlinevirtual

Definition at line 559 of file communication.hpp.

◆ VarMessage() [2/2]

template<int Tag>
mfem::VarMessage< Tag >::VarMessage ( const VarMessage< Tag > & other)
inline

Definition at line 565 of file communication.hpp.

Member Function Documentation

◆ Clear()

template<int Tag>
void mfem::VarMessage< Tag >::Clear ( )
inline

Clear the message and associated request.

Definition at line 557 of file communication.hpp.

◆ Decode()

◆ Encode()

◆ IProbe()

template<int Tag>
static bool mfem::VarMessage< Tag >::IProbe ( int & rank,
int & size,
MPI_Comm comm )
inlinestatic

Non-blocking probe for incoming message of this type from any rank. If there is an incoming message, returns true and sets 'rank' and 'size'. Otherwise returns false.

Definition at line 501 of file communication.hpp.

◆ Isend()

template<int Tag>
void mfem::VarMessage< Tag >::Isend ( int rank,
MPI_Comm comm )
inline

Non-blocking send to processor 'rank'. Returns immediately. Completion (as tested by MPI_Wait/Test) does not mean the message was received – it may be on its way or just buffered locally.

Definition at line 431 of file communication.hpp.

◆ IsendAll()

template<int Tag>
template<typename MapT >
static void mfem::VarMessage< Tag >::IsendAll ( MapT & rank_msg,
MPI_Comm comm )
inlinestatic

Helper to send all messages in a rank-to-message map container.

Definition at line 450 of file communication.hpp.

◆ Issend()

template<int Tag>
void mfem::VarMessage< Tag >::Issend ( int rank,
MPI_Comm comm )
inline

Non-blocking synchronous send to processor 'rank'. Returns immediately. Completion (MPI_Wait/Test) means that the message was received.

Definition at line 441 of file communication.hpp.

◆ Probe()

template<int Tag>
static void mfem::VarMessage< Tag >::Probe ( int & rank,
int & size,
MPI_Comm comm )
inlinestatic

Blocking probe for incoming message of this type from any rank. Returns the rank and message size.

Definition at line 490 of file communication.hpp.

◆ Recv()

template<int Tag>
void mfem::VarMessage< Tag >::Recv ( int rank,
int size,
MPI_Comm comm )
inline

Post-probe receive from processor 'rank' of message size 'size'.

Definition at line 514 of file communication.hpp.

◆ RecvAll()

template<int Tag>
template<typename MapT >
static void mfem::VarMessage< Tag >::RecvAll ( MapT & rank_msg,
MPI_Comm comm )
inlinestatic

Helper to receive all messages in a rank-to-message map container.

Definition at line 539 of file communication.hpp.

◆ RecvDrop()

template<int Tag>
void mfem::VarMessage< Tag >::RecvDrop ( int rank,
int size,
MPI_Comm comm )
inline

Like Recv(), but throw away the message.

Definition at line 529 of file communication.hpp.

◆ TestAllSent()

template<int Tag>
template<typename MapT >
static bool mfem::VarMessage< Tag >::TestAllSent ( MapT & rank_msg)
inlinestatic

Return true if all messages in the map container were sent, otherwise return false, without waiting.

Definition at line 472 of file communication.hpp.

◆ WaitAllSent()

template<int Tag>
template<typename MapT >
static void mfem::VarMessage< Tag >::WaitAllSent ( MapT & rank_msg)
inlinestatic

Helper to wait for all messages in a map container to be sent.

Definition at line 460 of file communication.hpp.

Member Data Documentation

◆ data

template<int Tag>
std::string mfem::VarMessage< Tag >::data

Definition at line 424 of file communication.hpp.

◆ send_request

template<int Tag>
MPI_Request mfem::VarMessage< Tag >::send_request

Definition at line 425 of file communication.hpp.


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