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

A Communicator that all MPI nodes communicate with the root node. This class does NOT scale and is provided for demonstration purposes only. More...

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

Inheritance diagram for axom::lumberjack::RootCommunicator:

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)
 This pushes all messages to the root node. 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 all MPI nodes communicate with the root node. This class does NOT scale and is provided for demonstration purposes only.

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

See also
BinaryTreeCommunicator Communicator Lumberjack

Member Function Documentation

◆ initialize()

void axom::lumberjack::RootCommunicator::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::RootCommunicator::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::RootCommunicator::rank ( )
virtual

Returns the MPI rank of this node.

Implements axom::lumberjack::Communicator.

◆ ranksLimit() [1/2]

void axom::lumberjack::RootCommunicator::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::RootCommunicator::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::RootCommunicator::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::RootCommunicator::push ( const char *  packedMessagesToBeSent,
std::vector< const char * > &  receivedPackedMessages 
)
virtual

This pushes all messages to the root node.

All messages are pushed to the root node. This is the same as RootCommunicator::pushMessagesFully for this Communicator.

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

Implements axom::lumberjack::Communicator.

◆ isOutputNode()

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

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

Implements axom::lumberjack::Communicator.


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