#include <ReceiveBuffer.h>
Public Member Functions | |
ReceiveBuffer (const libMesh::Parallel::Communicator &comm, Context *const context, const ParallelStudyMethod method, const unsigned int clicks_per_receive, const Parallel::MessageTag object_buffer_tag) | |
~ReceiveBuffer () override | |
Destructor: ensures that all send requests have completed. More... | |
bool | currentlyReceiving () const |
Whether or not there are messages that are being currently received. More... | |
unsigned long int | objectsReceived () const |
The work received since the last reset. More... | |
unsigned long int | buffersReceived () const |
The number of buffers received since the last reset. More... | |
unsigned long int | numProbes () const |
The total number of times we've polled for messages. More... | |
unsigned long int | objectPoolCreated () const |
Number of buffers created in the object buffer pool. More... | |
unsigned long int | bufferPoolCreated () const |
Number of buffers created in the buffer pool. More... | |
void | receive (const bool start_receives_only=false) |
Start receives for all currently available messages. More... | |
void | clear () |
Clear all existing data. More... | |
Real | receiveLoopTime () const |
Amount of time (in seconds) spent in the loop checking for messages and creating Receives. More... | |
Real | cleanupRequestsTime () const |
Amount of time (in seconds) spent finishing receives and collecting objects. More... | |
void | cleanupRequests () |
Checks to see if any Requests can be finished. More... | |
MooseUtils::LIFOBuffer< std::shared_ptr< Object > > & | buffer () |
Gets the buffer that the received objects are filled into after the requests are finished. More... | |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Protected Attributes | |
const Parallel::Communicator & | _communicator |
Private Member Functions | |
template<typename C , typename OutputIter , typename T > | |
void | blocking_receive_packed_range (const Parallel::Communicator &comm, const processor_id_type src_processor_id, C *context, OutputIter out, const T *, Parallel::Request &req, Parallel::Status &stat, const Parallel::MessageTag &tag) const |
Private Attributes | |
Context *const | _context |
The context. More... | |
MooseUtils::LIFOBuffer< std::shared_ptr< Object > > | _buffer |
The buffer that finished requests are filled into. More... | |
const ParallelStudyMethod | _method |
The method. More... | |
const unsigned int | _clicks_per_receive |
Iterations to wait before checking for new objects. More... | |
std::list< std::pair< std::shared_ptr< Parallel::Request >, std::shared_ptr< std::vector< std::shared_ptr< Object > > > > > | _requests |
List of Requests and buffers for each request. More... | |
const Parallel::MessageTag | _object_buffer_tag |
MessageTag for sending objects. More... | |
std::chrono::steady_clock::duration | _receive_loop_time |
Receive loop time. More... | |
std::chrono::steady_clock::duration | _cleanup_requests_time |
Time cleaning up requests. More... | |
unsigned long int | _objects_received |
Total objects received. More... | |
unsigned long int | _buffers_received |
Total object buffers received. More... | |
unsigned long int | _num_probes |
Total number of times we've polled for messages. More... | |
MooseUtils::SharedPool< std::vector< std::shared_ptr< Object > > > | _object_buffer_pool |
Shared pool of object buffers for incoming messages. More... | |
MooseUtils::SharedPool< std::vector< typename Parallel::Packing< std::shared_ptr< Object > >::buffer_type > > | _buffer_pool |
Shared pool of buffers. More... | |
Definition at line 28 of file ReceiveBuffer.h.
ReceiveBuffer< Object, Context >::ReceiveBuffer | ( | const libMesh::Parallel::Communicator & | comm, |
Context *const | context, | ||
const ParallelStudyMethod | method, | ||
const unsigned int | clicks_per_receive, | ||
const Parallel::MessageTag | object_buffer_tag | ||
) |
Definition at line 178 of file ReceiveBuffer.h.
|
override |
Destructor: ensures that all send requests have completed.
Definition at line 192 of file ReceiveBuffer.h.
|
inlineprivate |
Definition at line 146 of file ReceiveBuffer.h.
|
inline |
Gets the buffer that the received objects are filled into after the requests are finished.
Definition at line 105 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::blocking_receive_packed_range().
|
inline |
Number of buffers created in the buffer pool.
Definition at line 70 of file ReceiveBuffer.h.
|
inline |
The number of buffers received since the last reset.
Definition at line 55 of file ReceiveBuffer.h.
void ReceiveBuffer< Object, Context >::cleanupRequests | ( | ) |
Checks to see if any Requests can be finished.
Definition at line 281 of file ReceiveBuffer.h.
|
inline |
Amount of time (in seconds) spent finishing receives and collecting objects.
Definition at line 92 of file ReceiveBuffer.h.
void ReceiveBuffer< Object, Context >::clear | ( | ) |
Clear all existing data.
Definition at line 267 of file ReceiveBuffer.h.
|
inline |
Whether or not there are messages that are being currently received.
Definition at line 45 of file ReceiveBuffer.h.
|
inline |
The total number of times we've polled for messages.
Definition at line 60 of file ReceiveBuffer.h.
|
inline |
Number of buffers created in the object buffer pool.
Definition at line 65 of file ReceiveBuffer.h.
|
inline |
The work received since the last reset.
Definition at line 50 of file ReceiveBuffer.h.
void ReceiveBuffer< Object, Context >::receive | ( | const bool | start_receives_only = false | ) |
Start receives for all currently available messages.
Adds the to the working buffer
Definition at line 200 of file ReceiveBuffer.h.
|
inline |
Amount of time (in seconds) spent in the loop checking for messages and creating Receives.
Definition at line 87 of file ReceiveBuffer.h.
|
private |
The buffer that finished requests are filled into.
Definition at line 111 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::buffer().
|
private |
Shared pool of buffers.
Definition at line 143 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::bufferPoolCreated().
|
private |
Total object buffers received.
Definition at line 134 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::buffersReceived().
|
private |
Time cleaning up requests.
Definition at line 129 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::cleanupRequestsTime().
|
private |
Iterations to wait before checking for new objects.
Definition at line 116 of file ReceiveBuffer.h.
|
private |
The context.
Definition at line 109 of file ReceiveBuffer.h.
|
private |
The method.
Definition at line 114 of file ReceiveBuffer.h.
|
private |
Total number of times we've polled for messages.
Definition at line 136 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::numProbes().
|
private |
Shared pool of object buffers for incoming messages.
Definition at line 139 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::objectPoolCreated().
|
private |
MessageTag for sending objects.
Definition at line 124 of file ReceiveBuffer.h.
|
private |
Total objects received.
Definition at line 132 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::objectsReceived().
|
private |
Receive loop time.
Definition at line 127 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::receiveLoopTime().
|
private |
List of Requests and buffers for each request.
Definition at line 121 of file ReceiveBuffer.h.
Referenced by ReceiveBuffer< Object, Context >::currentlyReceiving().