vt::rdma::RDMAManager struct

Core component of VT used to send pure data to registered RDMA handlers or memory locations.

Allows the registration of RDMA handlers and registered memory locations. The registered handlers trigger a function when the data arrives (GET) or is sent (PUT). If registered memory locations are used directly, one may create a RDMA channel which backs the GET/PUT by MPI_Get/MPI_Put.

Base classes

template<typename T>
struct vt::runtime::component::Component<RDMAManager>
Component class for a generic VT runtime module, CRTP'ed over the component's actual type

Public types

using RDMA_BitsType = Bits
using RDMA_StateType = State
using RDMA_TypeType = Type
using RDMA_InfoType = Info
using RDMA_PendingType = Pending
using RDMA_ChannelType = Channel
using RDMA_RegionType = Region
using RDMA_MapType = Map
using RDMA_GroupType = Group
using RDMA_ActionType = Action
using RDMA_ChannelLookupType = ChannelLookup
using RDMA_EndpointType = Endpoint
using RDMA_ContainerType = std::unordered_map<RDMA_HandleType, RDMA_StateType>
using RDMA_LiveChannelsType = std::unordered_map<RDMA_ChannelLookupType, RDMA_ChannelType>
using RDMA_OpContainerType = std::unordered_map<RDMA_OpType, RDMA_PendingType>
using RDMA_GetFunctionType = RDMA_StateType::RDMA_GetFunctionType
using RDMA_PutFunctionType = RDMA_StateType::RDMA_PutFunctionType
using RDMA_DirectType = std::tuple<RDMA_PtrType, ActionType>
template<typename MsgType>
using RDMA_GetTypedFunctionType = RDMA_StateType::RDMA_GetTypedFunctionType<MsgType>
template<typename MsgType>
using RDMA_PutTypedFunctionType = RDMA_StateType::RDMA_PutTypedFunctionType<MsgType>
using CollectiveScopeType = collective::CollectiveScope

Public static functions

static void getRDMAMsg(GetMessage* msg)
static void getRecvMsg(GetBackMessage* msg)
static void putBackMsg(PutBackMessage* msg)
static void putRecvMsg(PutMessage* msg)
static void setupChannel(CreateChannel* msg)
static void removeChannel(DestroyChannel* msg)
static void remoteChannel(ChannelMessage* msg)
static void getInfoChannel(GetInfoChannel* msg)

Constructors, destructors, conversion operators

RDMAManager()
Construct the RDMAManager.

Public functions

auto name() -> std::string override
Get the name of the component.
template<typename T>
void putTypedData(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ByteType const& offset, TagType const& tag, ActionType action_after_put = no_action)
Put typed data to registered RDMA handle.
template<typename T>
void putTypedData(RDMA_HandleType const& han, T ptr, ByteType const& num_elems = no_byte, ByteType const& offset = no_byte, ActionType action_after_put = no_action)
Put typed data to registered RDMA handle.
void putData(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ActionType action_after_put = no_action)
Put raw data to registered RDMA handle.
void putData(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& offset, TagType const& tag, ByteType const& elm_size = rdma_default_byte_size, ActionType action_after_put = no_action, NodeType const& collective_node = uninitialized_destination, bool const direct_message_send = false)
Put raw data to registered RDMA handle.
void getDataIntoBuf(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& offset, TagType const& tag = no_tag, ActionType next_action = no_action, ByteType const& elm_size = rdma_default_byte_size, NodeType const& collective_node = uninitialized_destination)
Get data into user buffer.
void putDataIntoBufCollective(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& elm_size, ByteType const& offset, ActionType after_put_action = no_action)
Collectively put data into a buffer.
void getDataIntoBufCollective(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& elm_size, ByteType const& offset, ActionType next_action = no_action)
Collectively get data into buffer.
void getRegionTypeless(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, RDMA_RegionType const& region, ActionType next_action)
Get a dimensional region.
void putRegionTypeless(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, RDMA_RegionType const& region, ActionType after_put_action)
Put a dimensional region.
template<typename T>
void getRegion(RDMA_HandleType const& rdma_handle, T ptr, RDMA_RegionType const& region, ActionType next_action = no_action)
Get a region with typed data.
template<typename T>
void getTypedDataInfoBuf(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ByteType const& elm_offset = no_byte, TagType const& tag = no_tag, ActionType next_action = no_action)
Get typed data into buffer.
template<typename T>
void getTypedDataInfoBuf(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ActionType na)
Get typed data into buffer.
void getData(RDMA_HandleType const& rdma_handle, RDMA_RecvType cont)
Get data with continuation.
void getData(RDMA_HandleType const& rdma_handle, TagType const& tag, ByteType const& num_bytes, ByteType const& offset, RDMA_RecvType cont)
Get data with continuation.
template<typename T>
auto registerNewTypedRdmaHandler(T ptr, ByteType const& num_elems) -> RDMA_HandleType
Register a new typed RDMA handler.
auto registerNewRdmaHandler(bool const& use_default = false, RDMA_PtrType const& ptr = nullptr, ByteType const& num_bytes = no_byte, bool const& is_collective = false) -> RDMA_HandleType
Register a typeless RDMA handler.
auto collectiveRegisterRdmaHandler(bool const& use_default, RDMA_PtrType const& ptr, ByteType const& num_bytes) -> RDMA_HandleType
Collectively register a typeless RDMA handler.
template<typename T>
auto registerCollectiveTyped(T ptr, ByteType const& num_total_elems, ByteType const& num_elems, RDMA_MapType const& map = default_map) -> RDMA_HandleType
Collectively register a new typed RDMA handler.
auto registerNewCollective(bool const& use_default, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& num_total_bytes, ByteType const& elm_size = rdma_default_byte_size, RDMA_MapType const& map = default_map) -> RDMA_HandleType
Collectively register a new typeless RDMA handler.
void unregisterRdmaHandler(RDMA_HandleType const& handle, RDMA_TypeType const& type = RDMA_TypeType::GetOrPut, TagType const& tag = no_tag, bool const& use_default = false)
Unregister a RDMA handler.
void unregisterRdmaHandler(RDMA_HandleType const& handle, RDMA_HandlerType const& handler, TagType const& tag = no_tag)
Unregister a RDMA handler.
template<typename MsgType = BaseMessage, ActiveTypedRDMAGetFnType<MsgType>* f>
auto associateGetFunction(MsgType* msg, RDMA_HandleType const& han, RDMA_GetTypedFunctionType<MsgType> const& fn, bool const& any_tag = false, TagType const& tag = no_tag) -> RDMA_HandlerType
Associate a get function handler with a RDMA handle.
template<typename MsgType = BaseMessage, ActiveTypedRDMAPutFnType<MsgType>* f>
auto associatePutFunction(MsgType* msg, RDMA_HandleType const& han, RDMA_PutTypedFunctionType<MsgType> const& fn, bool const& any_tag = false, TagType const& tag = no_tag) -> RDMA_HandlerType
Associate a put function handler with a RDMA handle.
void newChannel(RDMA_TypeType const& type, RDMA_HandleType const& han, NodeType const& target, NodeType const& non_target, ActionType const& action)
Create a new RDMA channel.
void newGetChannel(RDMA_HandleType const& han, RDMA_EndpointType const& target, RDMA_EndpointType const& non_target, ActionType const& action = nullptr)
Create a new GET RDMA channel.
void newGetChannel(] RDMA_HandleType const& han, ] NodeType const& target, ] NodeType const& non_target, ] ActionType const& action = nullptr)
Create a new GET RDMA channel.
void newPutChannel(] RDMA_HandleType const& han, ] NodeType const& target, ] NodeType const& non_target, ] ActionType const& action = nullptr)
Create a new PUT RDMA channel.
void syncLocalGetChannel(RDMA_HandleType const& han, ActionType const& action)
Sync locally a GET channel.
void syncLocalGetChannel(RDMA_HandleType const& han, NodeType const& in_target, ActionType const& action = nullptr)
Sync locally on a GET channel.
void syncLocalPutChannel(RDMA_HandleType const& han, NodeType const& dest, ActionType const& action = nullptr)
Sync locally on a PUT channel.
void syncLocalPutChannel(RDMA_HandleType const& han, NodeType const& dest, NodeType const& in_target, ActionType const& action = nullptr)
Sync locally on a PUT channel.
void syncRemoteGetChannel(RDMA_HandleType const& han, NodeType const& in_target = uninitialized_destination, ActionType const& action = nullptr)
Remotely sync GET on channel.
void syncRemotePutChannel(RDMA_HandleType const& han, ActionType const& action)
Remotely sync PUT on channel.
void syncRemotePutChannel(RDMA_HandleType const& han, NodeType const& in_target, ActionType const& action = nullptr)
Remotely sync PUT on channel.
void removeDirectChannel(RDMA_HandleType const& han, NodeType const& override_target = uninitialized_destination, ActionType const& action = nullptr)
Remove channel.
auto allocateNewRdmaHandler() -> RDMA_HandlerType
template<typename SerializerT>
void serialize(SerializerT& s)

Function documentation

template<typename T>
void vt::rdma::RDMAManager::putTypedData(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ByteType const& offset, TagType const& tag, ActionType action_after_put = no_action)

Put typed data to registered RDMA handle.

Parameters
rdma_handle in the registered RDMA handle
ptr in pointer to put
num_elems in number of elements to put from the pointer start
offset in offset—number of typed elements from start
tag in tag to identify put
action_after_put in action to execute after put completes locally

template<typename T>
void vt::rdma::RDMAManager::putTypedData(RDMA_HandleType const& han, T ptr, ByteType const& num_elems = no_byte, ByteType const& offset = no_byte, ActionType action_after_put = no_action)

Put typed data to registered RDMA handle.

Parameters
han in the registered RDMA handle
ptr in pointer to put
num_elems in number of elements to put from the pointer start
offset in offset—number of typed elements from start
action_after_put in action to execute after put completes locally

void vt::rdma::RDMAManager::putData(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ActionType action_after_put = no_action)

Put raw data to registered RDMA handle.

Parameters
rdma_handle in the registered RDMA handle
ptr in pointer to put
num_bytes in number of bytes to put
action_after_put in action to execute after put completes locally

void vt::rdma::RDMAManager::putData(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& offset, TagType const& tag, ByteType const& elm_size = rdma_default_byte_size, ActionType action_after_put = no_action, NodeType const& collective_node = uninitialized_destination, bool const direct_message_send = false)

Put raw data to registered RDMA handle.

Parameters
rdma_handle in the registered RDMA handle
ptr in pointer to put
num_bytes in number of bytes to put
offset in offset from point start to put
tag in tag to identify put
elm_size in size of an element
action_after_put in action to execute after put completes locally
collective_node in node to target
direct_message_send in whether the ptr provided has an envelope with it

void vt::rdma::RDMAManager::getDataIntoBuf(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& offset, TagType const& tag = no_tag, ActionType next_action = no_action, ByteType const& elm_size = rdma_default_byte_size, NodeType const& collective_node = uninitialized_destination)

Get data into user buffer.

Parameters
rdma_handle in the registered RDMA handle
ptr in destination for data
num_bytes in number of bytes
offset in offset on the remote node, relative to rdma_handle
tag in tag to identify get
next_action in action when get completes
elm_size in size of each element
collective_node in node to target

void vt::rdma::RDMAManager::putDataIntoBufCollective(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& elm_size, ByteType const& offset, ActionType after_put_action = no_action)

Collectively put data into a buffer.

Parameters
rdma_handle in the registered RDMA handle
ptr in data to put
num_bytes in number of bytes
elm_size in size of each element
offset in offset to put
after_put_action in action to execute after put completes locally

void vt::rdma::RDMAManager::getDataIntoBufCollective(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& elm_size, ByteType const& offset, ActionType next_action = no_action)

Collectively get data into buffer.

Parameters
rdma_handle in the registered RDMA handle
ptr in buffer to get into
num_bytes in number of bytes
elm_size in size of each element
offset in offset to get
next_action in action to execute after get completes

void vt::rdma::RDMAManager::getRegionTypeless(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, RDMA_RegionType const& region, ActionType next_action)

Get a dimensional region.

Parameters
rdma_handle in the registered RDMA handle
ptr in buffer to get into
region in region to get
next_action in action to execute after get completes

void vt::rdma::RDMAManager::putRegionTypeless(RDMA_HandleType const& rdma_handle, RDMA_PtrType const& ptr, RDMA_RegionType const& region, ActionType after_put_action)

Put a dimensional region.

Parameters
rdma_handle in the registered RDMA handle
ptr in buffer to get into
region in region to get
after_put_action in action to execute after put completes locally

template<typename T>
void vt::rdma::RDMAManager::getRegion(RDMA_HandleType const& rdma_handle, T ptr, RDMA_RegionType const& region, ActionType next_action = no_action)

Get a region with typed data.

Parameters
rdma_handle in the registered RDMA handle
ptr in buffer to get into
region in region to get
next_action in action to execute after get completes

template<typename T>
void vt::rdma::RDMAManager::getTypedDataInfoBuf(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ByteType const& elm_offset = no_byte, TagType const& tag = no_tag, ActionType next_action = no_action)

Get typed data into buffer.

Parameters
rdma_handle in the registered RDMA handle
ptr in destination for data
num_elems in number of elements
elm_offset in offset—number of typed elements from start
tag in tag to identify get
next_action in action when get completes

template<typename T>
void vt::rdma::RDMAManager::getTypedDataInfoBuf(RDMA_HandleType const& rdma_handle, T ptr, ByteType const& num_elems, ActionType na)

Get typed data into buffer.

Parameters
rdma_handle in the registered RDMA handle
ptr in buffer to get into
num_elems in number of elements
na in action to execute after get

void vt::rdma::RDMAManager::getData(RDMA_HandleType const& rdma_handle, RDMA_RecvType cont)

Get data with continuation.

Parameters
rdma_handle in the registered RDMA handle
cont in continuation with data and length

void vt::rdma::RDMAManager::getData(RDMA_HandleType const& rdma_handle, TagType const& tag, ByteType const& num_bytes, ByteType const& offset, RDMA_RecvType cont)

Get data with continuation.

Parameters
rdma_handle in the registered RDMA handle
tag in tag for get
num_bytes in number of bytes
offset in offset to get
cont in continuation with data and length

template<typename T>
RDMA_HandleType vt::rdma::RDMAManager::registerNewTypedRdmaHandler(T ptr, ByteType const& num_elems)

Register a new typed RDMA handler.

Parameters
ptr in pointer to data to register
num_elems in number of elements
Returns the RDMA handle

RDMA_HandleType vt::rdma::RDMAManager::registerNewRdmaHandler(bool const& use_default = false, RDMA_PtrType const& ptr = nullptr, ByteType const& num_bytes = no_byte, bool const& is_collective = false)

Register a typeless RDMA handler.

Parameters
use_default in use default handler
ptr in point to data to register
num_bytes in number of bytes
is_collective in whether it's a collective registration
Returns the RDMA handle

RDMA_HandleType vt::rdma::RDMAManager::collectiveRegisterRdmaHandler(bool const& use_default, RDMA_PtrType const& ptr, ByteType const& num_bytes)

Collectively register a typeless RDMA handler.

Parameters
use_default in use default handler
ptr in point to data to register
num_bytes in number of bytes
Returns the RDMA handle

template<typename T>
RDMA_HandleType vt::rdma::RDMAManager::registerCollectiveTyped(T ptr, ByteType const& num_total_elems, ByteType const& num_elems, RDMA_MapType const& map = default_map)

Collectively register a new typed RDMA handler.

Parameters
ptr in pointer to data to register
num_total_elems in total number of elements
num_elems in element size
map in map for data to node
Returns the RDMA handle

RDMA_HandleType vt::rdma::RDMAManager::registerNewCollective(bool const& use_default, RDMA_PtrType const& ptr, ByteType const& num_bytes, ByteType const& num_total_bytes, ByteType const& elm_size = rdma_default_byte_size, RDMA_MapType const& map = default_map)

Collectively register a new typeless RDMA handler.

Parameters
use_default in whether to use default handler
ptr in buffer to register
num_bytes in number of bytes
num_total_bytes in total bytes for across all nodes
elm_size in size of an element
map in map for data to node
Returns the RDMA handle

void vt::rdma::RDMAManager::unregisterRdmaHandler(RDMA_HandleType const& handle, RDMA_TypeType const& type = RDMA_TypeType::GetOrPut, TagType const& tag = no_tag, bool const& use_default = false)

Unregister a RDMA handler.

Parameters
handle in the handler
type in type of handlers (GET or PUT)
tag in the handler tag
use_default in whether it's a default handler

void vt::rdma::RDMAManager::unregisterRdmaHandler(RDMA_HandleType const& handle, RDMA_HandlerType const& handler, TagType const& tag = no_tag)

Unregister a RDMA handler.

Parameters
handle in the RDMA handle
handler in the RDMA handler
tag in the handler tag

template<typename MsgType = BaseMessage, ActiveTypedRDMAGetFnType<MsgType>* f>
RDMA_HandlerType vt::rdma::RDMAManager::associateGetFunction(MsgType* msg, RDMA_HandleType const& han, RDMA_GetTypedFunctionType<MsgType> const& fn, bool const& any_tag = false, TagType const& tag = no_tag)

Associate a get function handler with a RDMA handle.

Parameters
msg in the message passed on handler
han in the RDMA handle
fn in the active function
any_tag in whether any tag triggers this handler
tag in the specific tag to match
Returns the RDMA handler

template<typename MsgType = BaseMessage, ActiveTypedRDMAPutFnType<MsgType>* f>
RDMA_HandlerType vt::rdma::RDMAManager::associatePutFunction(MsgType* msg, RDMA_HandleType const& han, RDMA_PutTypedFunctionType<MsgType> const& fn, bool const& any_tag = false, TagType const& tag = no_tag)

Associate a put function handler with a RDMA handle.

Parameters
msg in the message passed on handler
han in the RDMA handle
fn in the active function
any_tag in whether any tag triggers this handler
tag in the specific tag to match
Returns the RDMA handler

void vt::rdma::RDMAManager::newChannel(RDMA_TypeType const& type, RDMA_HandleType const& han, NodeType const& target, NodeType const& non_target, ActionType const& action)

Create a new RDMA channel.

Parameters
type in the type of channel (GET/PUT)
han in the RDMA handle
target in target node
non_target in non-target node
action in action when complete

void vt::rdma::RDMAManager::newGetChannel(RDMA_HandleType const& han, RDMA_EndpointType const& target, RDMA_EndpointType const& non_target, ActionType const& action = nullptr)

Create a new GET RDMA channel.

Parameters
han in the RDMA handle
target in target node
non_target in non-target node
action in action when complete

void vt::rdma::RDMAManager::newGetChannel(] RDMA_HandleType const& han, ] NodeType const& target, ] NodeType const& non_target, ] ActionType const& action = nullptr)

Create a new GET RDMA channel.

Parameters
han in the RDMA handle
target in target node
non_target in non-target node
action in action when complete

void vt::rdma::RDMAManager::newPutChannel(] RDMA_HandleType const& han, ] NodeType const& target, ] NodeType const& non_target, ] ActionType const& action = nullptr)

Create a new PUT RDMA channel.

Parameters
han in the RDMA handle
target in target node
non_target in non-target node
action in action when complete

void vt::rdma::RDMAManager::syncLocalGetChannel(RDMA_HandleType const& han, ActionType const& action)

Sync locally a GET channel.

Parameters
han in the RDMA handle
action in action when sync completes

void vt::rdma::RDMAManager::syncLocalGetChannel(RDMA_HandleType const& han, NodeType const& in_target, ActionType const& action = nullptr)

Sync locally on a GET channel.

Parameters
han in the RDMA handle
in_target in the target
action in action when sync completes

void vt::rdma::RDMAManager::syncLocalPutChannel(RDMA_HandleType const& han, NodeType const& dest, ActionType const& action = nullptr)

Sync locally on a PUT channel.

Parameters
han in the RDMA handle
dest in the target
action in action when sync completes

void vt::rdma::RDMAManager::syncLocalPutChannel(RDMA_HandleType const& han, NodeType const& dest, NodeType const& in_target, ActionType const& action = nullptr)

Sync locally on a PUT channel.

Parameters
han in the RDMA handle
dest in destination node
in_target in the target
action in action when sync completes

void vt::rdma::RDMAManager::syncRemoteGetChannel(RDMA_HandleType const& han, NodeType const& in_target = uninitialized_destination, ActionType const& action = nullptr)

Remotely sync GET on channel.

Parameters
han in the RDMA handle
in_target in target
action in action after completion

void vt::rdma::RDMAManager::syncRemotePutChannel(RDMA_HandleType const& han, ActionType const& action)

Remotely sync PUT on channel.

Parameters
han in the RDMA handle
action in action after completion

void vt::rdma::RDMAManager::syncRemotePutChannel(RDMA_HandleType const& han, NodeType const& in_target, ActionType const& action = nullptr)

Remotely sync PUT on channel.

Parameters
han in the RDMA handle
in_target in target
action in action after completion

void vt::rdma::RDMAManager::removeDirectChannel(RDMA_HandleType const& han, NodeType const& override_target = uninitialized_destination, ActionType const& action = nullptr)

Remove channel.

Parameters
han in the RDMA handle
override_target in the target
action in action after removal