vt::messaging::ActiveMessenger struct

Core component of VT used to send messages.

ActiveMessenger is a core VT component that provides the ability to send messages Message to registered handlers. It manages the incoming and outgoing messages using MPI to communicate MPI_Irecv and MPI_Isend

Calls that send messages, such as sendMsg and broadcastMsg, relinquish ownership of the message supplied. This is implied regardless of the type of the message argument. This implicit behavior is equivalent to the explicit use of std::move.

The following two code snippets have the same semantics:

theMsg()-sendMsg(0, msg);
theMsg()-sendMsg(0, std::move(msg));

It is invalid to attempt to access the messages after such calls, and doing so may result in a vtAssert or undefined behavior. In special cases promoteMsg can be used to acquire secondary ownership.

There are various ways to send messages:

Base classes

template<typename T>
struct vt::runtime::component::PollableComponent<ActiveMessenger>
Component class for a generic, pollable VT runtime module, CRTP'ed over the component's actual type. A pollable component will be registered with the VT scheduler to ensure it makes progress.

Public types

using BufferedMsgType = BufferedActiveMsg
using MessageType = ShortMessage
using CountType = int32_t
using PendingRecvType = PendingRecv
using EventRecordType = event::AsyncEvent::EventRecordType
using SendFnType = std::function<SendInfo(PtrLenPairType, NodeType, TagType)>
using UserSendFnType = std::function<void(SendFnType)>
using ContainerPendingType = std::unordered_map<TagType, PendingRecvType>
using ReadyHanTagType = std::tuple<HandlerType, TagType>
using HandlerManagerType = HandlerManager
using PendingSendType = PendingSend