Chi-Tech
chi_mesh::sweep_management::AAH_ASynchronousCommunicator Class Reference

#include <AAH_AsynComm.h>

Inheritance diagram for chi_mesh::sweep_management::AAH_ASynchronousCommunicator:
chi_mesh::sweep_management::AsynchronousCommunicator

Public Member Functions

 AAH_ASynchronousCommunicator (FLUDS &fluds, size_t num_groups, size_t num_angles, int sweep_eager_limit, const chi::ChiMPICommunicatorSet &in_comm_set)
 
bool DoneSending () const
 
void InitializeDelayedUpstreamData ()
 
void InitializeLocalAndDownstreamBuffers ()
 
void SendDownstreamPsi (int angle_set_num)
 
bool ReceiveDelayedData (int angle_set_num)
 
void ClearDownstreamBuffers ()
 
AngleSetStatus ReceiveUpstreamPsi (int angle_set_num)
 
void ClearLocalAndReceiveBuffers ()
 
void Reset ()
 
- Public Member Functions inherited from chi_mesh::sweep_management::AsynchronousCommunicator
 AsynchronousCommunicator (FLUDS &fluds, const chi::ChiMPICommunicatorSet &comm_set)
 
virtual ~AsynchronousCommunicator ()=default
 
virtual std::vector< double > & InitGetDownwindMessageData (int location_id, uint64_t cell_global_id, unsigned int face_id, size_t angle_set_id, size_t data_size)
 

Data Fields

int max_num_mess
 

Protected Member Functions

void BuildMessageStructure ()
 

Private Attributes

const size_t num_groups_
 
const size_t num_angles_
 
bool done_sending
 
bool data_initialized
 
bool upstream_data_initialized
 
u_ll_int EAGER_LIMIT = 32000
 
std::vector< int > prelocI_message_count
 
std::vector< int > deplocI_message_count
 
std::vector< int > delayed_prelocI_message_count
 
std::vector< std::vector< u_ll_int > > prelocI_message_size
 
std::vector< std::vector< u_ll_int > > deplocI_message_size
 
std::vector< std::vector< u_ll_int > > delayed_prelocI_message_size
 
std::vector< std::vector< u_ll_int > > prelocI_message_blockpos
 
std::vector< std::vector< u_ll_int > > deplocI_message_blockpos
 
std::vector< std::vector< u_ll_int > > delayed_prelocI_message_blockpos
 
std::vector< std::vector< bool > > prelocI_message_received
 
std::vector< std::vector< bool > > delayed_prelocI_message_received
 
std::vector< std::vector< MPI_Request > > deplocI_message_request
 

Additional Inherited Members

- Protected Attributes inherited from chi_mesh::sweep_management::AsynchronousCommunicator
FLUDSfluds_
 
const chi::ChiMPICommunicatorSetcomm_set_
 

Detailed Description

Handles the swift communication of interprocess communication related to sweeping.

Definition at line 24 of file AAH_AsynComm.h.

Constructor & Destructor Documentation

◆ AAH_ASynchronousCommunicator()

chi_mesh::sweep_management::AAH_ASynchronousCommunicator::AAH_ASynchronousCommunicator ( FLUDS fluds,
size_t  num_groups,
size_t  num_angles,
int  sweep_eager_limit,
const chi::ChiMPICommunicatorSet in_comm_set 
)

Constructor.

Definition at line 8 of file AAH_AsynComm_general.cc.

Member Function Documentation

◆ BuildMessageStructure()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::BuildMessageStructure ( )
protected

Builds message structure.

Outgoing and incoming data needs to be sub-divided into messages each of which is smaller than the MPI eager-limit. There are three parts to this: predecessors, delayed-predecessors and successors.

This method gets called by an angleset that subscribes to this sweepbuffer.

Definition at line 16 of file AAH_AsynComm_buildmessagestructure.cc.

◆ ClearDownstreamBuffers()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::ClearDownstreamBuffers ( )

Sends downstream psi.

Definition at line 47 of file AAH_AsynComm_general.cc.

◆ ClearLocalAndReceiveBuffers()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::ClearLocalAndReceiveBuffers ( )

Receive all upstream Psi. This method is called from within an advancement of an angleset, right after execution.

Definition at line 39 of file AAH_AsynComm_general.cc.

◆ DoneSending()

bool chi_mesh::sweep_management::AAH_ASynchronousCommunicator::DoneSending ( ) const

Returns the private flag done_sending.

Definition at line 30 of file AAH_AsynComm_general.cc.

◆ InitializeDelayedUpstreamData()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::InitializeDelayedUpstreamData ( )

Initializes delayed upstream data. This method gets called when a sweep scheduler is constructed.

Definition at line 10 of file AAH_AsynComm_initdelayedupstrdata.cc.

◆ InitializeLocalAndDownstreamBuffers()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::InitializeLocalAndDownstreamBuffers ( )

This is the final level of initialization before a sweep-chunk executes. Once all upstream dependencies are met and if the sweep scheduler places this angleset as "ready-to-execute", then the angle-set will call this method. It is also fairly important in terms of memory to only allocate these chunks of memory when actually ready to use them since they form the majority of memory usage.

Definition at line 18 of file AAH_AsynComm_initbuffers.cc.

◆ ReceiveDelayedData()

bool chi_mesh::sweep_management::AAH_ASynchronousCommunicator::ReceiveDelayedData ( int  angle_set_num)

Receives delayed data from successor locations.

Definition at line 14 of file AAH_AsynComm_receivedelayeddata.cc.

◆ ReceiveUpstreamPsi()

chi_mesh::sweep_management::AngleSetStatus chi_mesh::sweep_management::AAH_ASynchronousCommunicator::ReceiveUpstreamPsi ( int  angle_set_num)

Check if all upstream dependencies have been met and receives it as it becomes available.

Definition at line 15 of file AAH_AsynComm_receiveupstreampsi.cc.

◆ Reset()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::Reset ( )

Clear flags in preperation for another sweep.

Definition at line 70 of file AAH_AsynComm_general.cc.

◆ SendDownstreamPsi()

void chi_mesh::sweep_management::AAH_ASynchronousCommunicator::SendDownstreamPsi ( int  angle_set_num)

Sends downstream psi. This method gets called after a sweep chunk has executed

Definition at line 11 of file AAH_AsynComm_senddownstreampsi.cc.

Field Documentation

◆ data_initialized

bool chi_mesh::sweep_management::AAH_ASynchronousCommunicator::data_initialized
private

Definition at line 31 of file AAH_AsynComm.h.

◆ delayed_prelocI_message_blockpos

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::delayed_prelocI_message_blockpos
private

Definition at line 46 of file AAH_AsynComm.h.

◆ delayed_prelocI_message_count

std::vector<int> chi_mesh::sweep_management::AAH_ASynchronousCommunicator::delayed_prelocI_message_count
private

Definition at line 38 of file AAH_AsynComm.h.

◆ delayed_prelocI_message_received

std::vector<std::vector<bool> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::delayed_prelocI_message_received
private

Definition at line 49 of file AAH_AsynComm.h.

◆ delayed_prelocI_message_size

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::delayed_prelocI_message_size
private

Definition at line 42 of file AAH_AsynComm.h.

◆ deplocI_message_blockpos

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::deplocI_message_blockpos
private

Definition at line 45 of file AAH_AsynComm.h.

◆ deplocI_message_count

std::vector<int> chi_mesh::sweep_management::AAH_ASynchronousCommunicator::deplocI_message_count
private

Definition at line 37 of file AAH_AsynComm.h.

◆ deplocI_message_request

std::vector<std::vector<MPI_Request> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::deplocI_message_request
private

Definition at line 51 of file AAH_AsynComm.h.

◆ deplocI_message_size

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::deplocI_message_size
private

Definition at line 41 of file AAH_AsynComm.h.

◆ done_sending

bool chi_mesh::sweep_management::AAH_ASynchronousCommunicator::done_sending
private

Definition at line 30 of file AAH_AsynComm.h.

◆ EAGER_LIMIT

u_ll_int chi_mesh::sweep_management::AAH_ASynchronousCommunicator::EAGER_LIMIT = 32000
private

Definition at line 34 of file AAH_AsynComm.h.

◆ max_num_mess

int chi_mesh::sweep_management::AAH_ASynchronousCommunicator::max_num_mess

Definition at line 54 of file AAH_AsynComm.h.

◆ num_angles_

const size_t chi_mesh::sweep_management::AAH_ASynchronousCommunicator::num_angles_
private

Definition at line 28 of file AAH_AsynComm.h.

◆ num_groups_

const size_t chi_mesh::sweep_management::AAH_ASynchronousCommunicator::num_groups_
private

Definition at line 27 of file AAH_AsynComm.h.

◆ prelocI_message_blockpos

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::prelocI_message_blockpos
private

Definition at line 44 of file AAH_AsynComm.h.

◆ prelocI_message_count

std::vector<int> chi_mesh::sweep_management::AAH_ASynchronousCommunicator::prelocI_message_count
private

Definition at line 36 of file AAH_AsynComm.h.

◆ prelocI_message_received

std::vector<std::vector<bool> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::prelocI_message_received
private

Definition at line 48 of file AAH_AsynComm.h.

◆ prelocI_message_size

std::vector<std::vector<u_ll_int> > chi_mesh::sweep_management::AAH_ASynchronousCommunicator::prelocI_message_size
private

Definition at line 40 of file AAH_AsynComm.h.

◆ upstream_data_initialized

bool chi_mesh::sweep_management::AAH_ASynchronousCommunicator::upstream_data_initialized
private

Definition at line 32 of file AAH_AsynComm.h.


The documentation for this class was generated from the following files: