AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::lumberjack::BinaryTreeCommunicator Class Reference

A Communicator that utilizes a binary tree stucture of MPI nodes to scalably pass Message classes. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/lumberjack/BinaryTreeCommunicator.hpp>

Inheritance diagram for axom::lumberjack::BinaryTreeCommunicator:

Public Member Functions

void initialize (MPI_Comm comm, int ranksLimit)
 Called to initialize the Communicator. More...
 
void finalize ()
 Called to finalize the Communicator. More...
 
int rank ()
 Returns the MPI rank of this node. More...
 
void ranksLimit (int value)
 Sets the rank limit. More...
 
int ranksLimit ()
 Returns the rank limit. More...
 
int numPushesToFlush ()
 Function used by the Lumberjack class to indicate how many individual pushes fully flush all currently held Message classes to the root node. The Communicator class's tree structure dictates this. More...
 
void push (const char *packedMessagesToBeSent, std::vector< const char * > &receivedPackedMessages)
 All children push their Message classes pushed to their parent and then combined. More...
 
bool isOutputNode ()
 Function used by the Lumberjack to indicate whether this node should be outputting messages. Only the root node outputs messages. More...
 

Detailed Description

A Communicator that utilizes a binary tree stucture of MPI nodes to scalably pass Message classes.

You will need to add your Communicator using Lumberjack::initialize.

See also
Communicator Lumberjack

Member Function Documentation

◆ initialize()

void axom::lumberjack::BinaryTreeCommunicator::initialize ( MPI_Comm  comm,
int  ranksLimit 
)
virtual

Called to initialize the Communicator.

This performs any setup work the Communicator needs before doing any work. It is required that this is called before using the Communicator.

Parameters
[in]commThe MPI Communicator
[in]ranksLimitLimit on how many ranks are individually tracked per Message.

Implements axom::lumberjack::Communicator.

◆ finalize()

void axom::lumberjack::BinaryTreeCommunicator::finalize ( )
virtual

Called to finalize the Communicator.

This performs any cleanup work the Communicator needs to do before going away. It is required that this is the last function called by the Communicator.

Implements axom::lumberjack::Communicator.

◆ rank()

int axom::lumberjack::BinaryTreeCommunicator::rank ( )
virtual

Returns the MPI rank of this node.

Implements axom::lumberjack::Communicator.

◆ ranksLimit() [1/2]

void axom::lumberjack::BinaryTreeCommunicator::ranksLimit ( int  value)
virtual

Sets the rank limit.

This is the limit on how many ranks generated a given message are individually tracked per Message. After the limit has been reached, only the Message::rankCount is incremented.

Parameters
[in]valuelimits how many ranks are tracked per Message.

Implements axom::lumberjack::Communicator.

◆ ranksLimit() [2/2]

int axom::lumberjack::BinaryTreeCommunicator::ranksLimit ( )
virtual

Returns the rank limit.

This is the limit on how many ranks generated a given message are individually tracked per Message. After the limit has been reached, only the Message::rankCount is incremented.

Implements axom::lumberjack::Communicator.

◆ numPushesToFlush()

int axom::lumberjack::BinaryTreeCommunicator::numPushesToFlush ( )
virtual

Function used by the Lumberjack class to indicate how many individual pushes fully flush all currently held Message classes to the root node. The Communicator class's tree structure dictates this.

Implements axom::lumberjack::Communicator.

◆ push()

void axom::lumberjack::BinaryTreeCommunicator::push ( const char *  packedMessagesToBeSent,
std::vector< const char * > &  receivedPackedMessages 
)
virtual

All children push their Message classes pushed to their parent and then combined.

Parameters
[in]packedMessagesToBeSentAll of this rank's Message classes packed into a single buffer.
[in,out]receivedPackedMessagesReceived packed message buffers from this nodes children.

This is helpful when you want to spread your Lumberjack work over a set of your work. Instead of doing all of Lumberjack's work at one point in your program. This does not guarantee your Message will be ready to output. After this call only Message classes at the root node will be returned from Lumberjack::getMessages.

Implements axom::lumberjack::Communicator.

◆ isOutputNode()

bool axom::lumberjack::BinaryTreeCommunicator::isOutputNode ( )
virtual

Function used by the Lumberjack to indicate whether this node should be outputting messages. Only the root node outputs messages.

Returns
Boolean indicates whether you should output messages

Implements axom::lumberjack::Communicator.


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