LCI v2.0.0-dev
For Asynchronous Multithreaded Communication
Loading...
Searching...
No Matches
Basic Concepts

This section describes basic concepts in LCI. More...

Classes

struct  lci::error_t
 Wrapper class for error code. More...
 
struct  lci::net_status_t
 The struct for network status. More...
 
struct  lci::rmr_t
 The type of remote memory region. More...
 
struct  lci::buffer_t
 The type of a local buffer descriptor. More...
 
struct  lci::rbuffer_t
 The type of a remote buffer descriptor. More...
 
struct  lci::allocator_base_t
 The user-defined allocator type. More...
 
struct  lci::data_t
 A generic type for describing or holding data. More...
 
struct  lci::status_t
 The type of the completion desciptor for a posted communication. More...
 
class  lci::comp_impl_t
 Completion object implementation base type. More...
 

Typedefs

using lci::net_imm_data_t = uint32_t
 The type of network-layer immediate data field.
 
using lci::tag_t = uint64_t
 The type of tag.
 
using lci::rcomp_t = uint32_t
 The type of remote completion handler.
 
using lci::matching_entry_key_t = uint64_t
 The type of matching engine entry key.
 
using lci::matching_entry_val_t = void*
 The type of matching engine entry value.
 
using lci::comp_handler_t = void (*)(status_t status)
 Function Signature for completion handler.
 
using lci::reduce_op_t
 The user-defined reduction operation.
 
using lci::graph_node_t = void*
 The node type for the completion graph.
 
using lci::graph_node_run_cb_t = status_t (*)(void* value)
 The function signature for a node function in the completion graph.
 
using lci::graph_node_free_cb_t = void (*)(void* value)
 The function signature for a callback that will be triggered when the node was freed.
 
using lci::graph_edge_run_cb_t
 The function signature for a edge funciton in the completion graph.
 

Enumerations

enum class  lci::errorcode_t {
  lci::errorcode_t::done_min , lci::errorcode_t::done , lci::errorcode_t::done_backlog , lci::errorcode_t::done_max ,
  lci::errorcode_t::posted_min , lci::errorcode_t::posted , lci::errorcode_t::posted_backlog , lci::errorcode_t::posted_max ,
  lci::errorcode_t::retry_min , lci::errorcode_t::retry , lci::errorcode_t::retry_init , lci::errorcode_t::retry_lock ,
  lci::errorcode_t::retry_nopacket , lci::errorcode_t::retry_nomem , lci::errorcode_t::retry_backlog , lci::errorcode_t::retry_max ,
  lci::errorcode_t::fatal
}
 The actual error code for LCI API functions. More...
 
enum class  lci::net_opcode_t {
  lci::net_opcode_t::SEND , lci::net_opcode_t::RECV , lci::net_opcode_t::WRITE , lci::net_opcode_t::REMOTE_WRITE ,
  lci::net_opcode_t::READ
}
 The Type of network communication operation codes. More...
 
enum class  lci::broadcast_algorithm_t { lci::broadcast_algorithm_t::none , lci::broadcast_algorithm_t::direct , lci::broadcast_algorithm_t::tree , lci::broadcast_algorithm_t::ring }
 The type of broadcast algorithm. More...
 
enum class  lci::reduce_scatter_algorithm_t { lci::reduce_scatter_algorithm_t::none , lci::reduce_scatter_algorithm_t::direct , lci::reduce_scatter_algorithm_t::tree , lci::reduce_scatter_algorithm_t::ring }
 The type of reduce scatter algorithm. More...
 
enum class  lci::allreduce_algorithm_t { lci::allreduce_algorithm_t::none , lci::allreduce_algorithm_t::direct , lci::allreduce_algorithm_t::tree , lci::allreduce_algorithm_t::ring }
 The type of allreduce algorithm. More...
 
enum class  lci::direction_t { lci::direction_t::OUT , lci::direction_t::IN }
 The enum class of comunication direction. More...
 
enum class  lci::matching_entry_type_t : unsigned { lci::matching_entry_type_t::send = 0 , lci::matching_entry_type_t::recv = 1 }
 The type of matching entry. More...
 
enum class  lci::matching_policy_t : unsigned {
  lci::matching_policy_t::none = 0 , lci::matching_policy_t::rank_only = 1 , lci::matching_policy_t::tag_only = 2 , lci::matching_policy_t::rank_tag = 3 ,
  lci::matching_policy_t::max = 4
}
 Enum class for matching policy. More...
 
enum class  lci::comp_semantic_t { lci::comp_semantic_t::buffer , lci::comp_semantic_t::network }
 The enum class of completion semantic. More...
 

Functions

template<typename T>
graph_node_t lci::graph_add_node_op (comp_t graph, const T &op)
 Add a functor as a node to the completion graph.
 

Variables

const mr_t lci::MR_HOST = mr_t()
 A special mr_t value for host memory.
 
const mr_t lci::MR_DEVICE = mr_t(reinterpret_cast<void*>(0x1))
 A special mr_t value for device memory.
 
const mr_t lci::MR_UNKNOWN = mr_t(reinterpret_cast<void*>(0x2))
 A special mr_t value for unknown memory. LCI will detect the memory type automatically.
 
const rmr_t lci::RMR_NULL = rmr_t()
 The NULL value of rkey_t.
 
const int lci::ANY_SOURCE = -1
 Special rank value for any-source receive.
 
const tag_t lci::ANY_TAG = static_cast<tag_t>(-1)
 Special tag value for any-tag receive.
 
const comp_t lci::COMP_NULL = comp_t(reinterpret_cast<comp_impl_t*>(0x0))
 Special completion object setting allow_posted to false.
 
const comp_t lci::COMP_NULL_EXPECT_DONE
 Deprecated. Same as COMP_NULL.
 
const comp_t lci::COMP_NULL_RETRY = comp_t(reinterpret_cast<comp_impl_t*>(0x1))
 Special completion object setting allow_posted and allow_retry to false.
 
const comp_t lci::COMP_NULL_EXPECT_DONE_OR_RETRY
 Deprecated. Same as COMP_NULL_RETRY.
 
const graph_node_t lci::GRAPH_START = reinterpret_cast<graph_node_t>(0x1)
 The start node of the completion graph.
 
const graph_node_run_cb_t lci::GRAPH_NODE_DUMMY_CB = nullptr
 A dummy callback function for a graph node.
 

Detailed Description

This section describes basic concepts in LCI.

Typedef Documentation

◆ comp_handler_t

using lci::comp_handler_t = void (*)(status_t status)

Function Signature for completion handler.

◆ graph_edge_run_cb_t

Initial value:
void (*)(status_t status, void* src_value,
void* dst_value)
The type of the completion desciptor for a posted communication.
Definition lci.hpp:604

The function signature for a edge funciton in the completion graph.

◆ graph_node_free_cb_t

using lci::graph_node_free_cb_t = void (*)(void* value)

The function signature for a callback that will be triggered when the node was freed.

◆ graph_node_run_cb_t

using lci::graph_node_run_cb_t = status_t (*)(void* value)

The function signature for a node function in the completion graph.

The function should return true if the node is considered completed.

◆ graph_node_t

using lci::graph_node_t = void*

The node type for the completion graph.

◆ matching_entry_key_t

using lci::matching_entry_key_t = uint64_t

The type of matching engine entry key.

◆ matching_entry_val_t

The type of matching engine entry value.

◆ net_imm_data_t

using lci::net_imm_data_t = uint32_t

The type of network-layer immediate data field.

The immediate data field is used to carry small data in the network

◆ rcomp_t

using lci::rcomp_t = uint32_t

The type of remote completion handler.

A remote completion handler is used to address a completion object on a remote process.

◆ reduce_op_t

Initial value:
void (*)(const void* left, const void* right, void* dst,
size_t n)

The user-defined reduction operation.

right and dst can be the same pointer.

◆ tag_t

using lci::tag_t = uint64_t

The type of tag.

Enumeration Type Documentation

◆ allreduce_algorithm_t

enum class lci::allreduce_algorithm_t
strong

The type of allreduce algorithm.

Enumerator
none 

automatically select the best algorithm

direct 

direct algorithm

tree 

reduce followed by broadcast

ring 

ring algorithm

◆ broadcast_algorithm_t

enum class lci::broadcast_algorithm_t
strong

The type of broadcast algorithm.

Enumerator
none 

automatically select the best algorithm

direct 

direct algorithm

tree 

binomial tree algorithm

ring 

ring algorithm

◆ comp_semantic_t

enum class lci::comp_semantic_t
strong

The enum class of completion semantic.

The completion semantic is used to define when a posted communication with OUT direction is considered as completed. For IN direction, a communication is considered as completed when the data has been written into the local buffer.

Enumerator
buffer 

When the local buffers can be written or freed

network 

When the associated network-layer operation is completed.

◆ direction_t

enum class lci::direction_t
strong

The enum class of comunication direction.

Enumerator
OUT 

push data out, such as send/active message/put

IN 

pull data in, such as receive/get

◆ errorcode_t

enum class lci::errorcode_t
strong

The actual error code for LCI API functions.

The error code is used to indicate the status of certain LCI operations. It has three categories: done, posted, and retry. The done category indicates that the operation has been completed. The posted category indicates that the operation is posted and the completion will be reported later. The retry category indicates that the operation temporarily failed and the user should retry the operation. Within each category, there are multiple sub error codes offering additional information.

Enumerator
done_min 

boundary marker

done 

the operation has been completed

done_backlog 

the operation has been pushed into a backlog queue and can be considered as completed by users

done_max 

boundary marker

posted_min 

boundary marker

posted 

the operation is posted and the completion will be reported later

posted_backlog 

the operation has been pushed into a backlog queue and can be considered as posted by users

posted_max 

boundary marker

retry_min 

boundary marker

retry 

the operation temporarily failed and the user should retry the operation

retry_init 

the default value for the error code

retry_lock 

the operation temporarily failed due to lock contention

retry_nopacket 

the operation temporarily failed due to the lack of packets

retry_nomem 

the operation temporarily failed because the network queue is full

retry_backlog 

the operation temporarily failed because the backlog queue is not empty

retry_max 

boundary marker

fatal 

placeholder. Not used for now. All fatal error are reported through C++ std::runtime_error.

◆ matching_entry_type_t

enum class lci::matching_entry_type_t : unsigned
strong

The type of matching entry.

A matching entry can be an incoming send or a posted receive.

Enumerator
send 

incoming send

recv 

posted receive

◆ matching_policy_t

enum class lci::matching_policy_t : unsigned
strong

Enum class for matching policy.

Enumerator
none 

match any send with any receive

rank_only 

match by rank

tag_only 

match by tag

rank_tag 

match by rank and tag

max 

boundary marker

◆ net_opcode_t

enum class lci::net_opcode_t
strong

The Type of network communication operation codes.

Enumerator
SEND 

send

RECV 

receive

WRITE 

write

REMOTE_WRITE 

remote write

READ 

read

◆ reduce_scatter_algorithm_t

The type of reduce scatter algorithm.

Enumerator
none 

automatically select the best algorithm

direct 

direct algorithm

tree 

reduce followed by broadcast

ring 

ring algorithm

Function Documentation

◆ graph_add_node_op()

template<typename T>
graph_node_t lci::graph_add_node_op ( comp_t graph,
const T & op )

Add a functor as a node to the completion graph.

Template Parameters
TThe type of the functor.
Parameters
graphThe completion graph.
opThe functor to be added.
Returns
The node added to the completion graph.
Here is the call graph for this function:

Variable Documentation

◆ ANY_SOURCE

const int lci::ANY_SOURCE = -1

Special rank value for any-source receive.

◆ ANY_TAG

const tag_t lci::ANY_TAG = static_cast<tag_t>(-1)

Special tag value for any-tag receive.

◆ COMP_NULL

const comp_t lci::COMP_NULL = comp_t(reinterpret_cast<comp_impl_t*>(0x0))

Special completion object setting allow_posted to false.

◆ COMP_NULL_EXPECT_DONE

const comp_t lci::COMP_NULL_EXPECT_DONE
Initial value:
=
comp_t(reinterpret_cast<comp_impl_t*>(0x0))
Completion object implementation base type.
Definition lci.hpp:673
The actual implementation for RESOURCE comp.
Definition lci_binding_pre.hpp:128

Deprecated. Same as COMP_NULL.

◆ COMP_NULL_EXPECT_DONE_OR_RETRY

const comp_t lci::COMP_NULL_EXPECT_DONE_OR_RETRY
Initial value:
=
comp_t(reinterpret_cast<comp_impl_t*>(0x1))

Deprecated. Same as COMP_NULL_RETRY.

◆ COMP_NULL_RETRY

const comp_t lci::COMP_NULL_RETRY = comp_t(reinterpret_cast<comp_impl_t*>(0x1))

Special completion object setting allow_posted and allow_retry to false.

◆ GRAPH_NODE_DUMMY_CB

const graph_node_run_cb_t lci::GRAPH_NODE_DUMMY_CB = nullptr

A dummy callback function for a graph node.

This function can be used as a placeholder for a graph node that does not perform any operation.

◆ GRAPH_START

const graph_node_t lci::GRAPH_START = reinterpret_cast<graph_node_t>(0x1)

The start node of the completion graph.

◆ MR_DEVICE

const mr_t lci::MR_DEVICE = mr_t(reinterpret_cast<void*>(0x1))

A special mr_t value for device memory.

◆ MR_HOST

const mr_t lci::MR_HOST = mr_t()

A special mr_t value for host memory.

◆ MR_UNKNOWN

const mr_t lci::MR_UNKNOWN = mr_t(reinterpret_cast<void*>(0x2))

A special mr_t value for unknown memory. LCI will detect the memory type automatically.

◆ RMR_NULL

const rmr_t lci::RMR_NULL = rmr_t()

The NULL value of rkey_t.