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

Abstract base class defining the interface of all Communicator classes. More...

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

Inheritance diagram for axom::lumberjack::Communicator:

Public Member Functions

virtual ~Communicator ()
 Virtual destructor. More...
 
virtual void initialize (MPI_Comm comm, int ranksLimit)=0
 Called to initialize the Communicator. More...
 
virtual void finalize ()=0
 Called to finalize the Communicator. More...
 
virtual int rank ()=0
 Returns the MPI rank of this node. More...
 
virtual void ranksLimit (int value)=0
 Sets the rank limit. More...
 
virtual int ranksLimit ()=0
 Returns the rank limit. More...
 
virtual int numPushesToFlush ()=0
 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...
 
virtual void push (const char *packedMessagesToBeSent, std::vector< const char * > &receivedPackedMessages)=0
 This pushes all messages once up the Communicator class's tree structure. More...
 
virtual bool isOutputNode ()=0
 Function indicates whether this node should be outputting messages. The Communicator class's communication structure dictates this. More...
 

Detailed Description

Abstract base class defining the interface of all Communicator classes.

Concrete instances need to inherit from this class and implement these functions.You will need to add your Communicator using Lumberjack::initialize

See also
BinaryTreeCommunicator RootCommunicator Lumberjack

Constructor & Destructor Documentation

◆ ~Communicator()

virtual axom::lumberjack::Communicator::~Communicator ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

virtual void axom::lumberjack::Communicator::initialize ( MPI_Comm  comm,
int  ranksLimit 
)
pure 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.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ finalize()

virtual void axom::lumberjack::Communicator::finalize ( )
pure 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.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ rank()

virtual int axom::lumberjack::Communicator::rank ( )
pure virtual

Returns the MPI rank of this node.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ ranksLimit() [1/2]

virtual void axom::lumberjack::Communicator::ranksLimit ( int  value)
pure virtual

Sets the rank limit.

Parameters
[in]valueLimit the ranks to individually track per Message.

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.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ ranksLimit() [2/2]

virtual int axom::lumberjack::Communicator::ranksLimit ( )
pure 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.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ numPushesToFlush()

virtual int axom::lumberjack::Communicator::numPushesToFlush ( )
pure 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.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ push()

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

This pushes all messages once up the Communicator class's tree structure.

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

All of the children push their Message classes to their parent node. This is is helpful if you want to spread the work load of Lumberjack over a large set of work.

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.

◆ isOutputNode()

virtual bool axom::lumberjack::Communicator::isOutputNode ( )
pure virtual

Function indicates whether this node should be outputting messages. The Communicator class's communication structure dictates this.

Returns
Boolean indicates whether you should output messages

Implemented in axom::lumberjack::RootCommunicator, and axom::lumberjack::BinaryTreeCommunicator.


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