LCI
|
Communication operations to send and receive messages across processes. More...
Classes | |
struct | LCI_lbuffer_t |
LCI long communication buffer. More... | |
struct | LCI_mbuffer_t |
LCI medium communication buffer. More... | |
union | LCI_short_t |
LCI short data. More... | |
struct | LCI_iovec_t |
LCI iovec, which is comprised of a piggyback buffer and multiple long buffers. More... | |
Macros | |
#define | LCI_SHORT_SIZE 32 |
The size of LCI short data. More... | |
Typedefs | |
typedef uint32_t | LCI_tag_t |
Tag type. More... | |
Enumerations | |
enum | LCI_match_t { LCI_MATCH_RANKTAG = 0, LCI_MATCH_TAG } |
LCI Match type. Define the matching rule between sends and receives. More... | |
Functions | |
LCI_API LCI_error_t | LCI_sends (LCI_endpoint_t ep, LCI_short_t src, int rank, LCI_tag_t tag) |
Send a short message (up to LCI_SHORT_SIZE bytes). The send buffer can be immediately reused. More... | |
LCI_API LCI_error_t | LCI_sendm (LCI_endpoint_t ep, LCI_mbuffer_t buffer, int rank, LCI_tag_t tag) |
Send a medium message with a user-provided buffer (up to LCI_MEDIUM_SIZE bytes). The send buffer can be immediately reused. More... | |
LCI_API LCI_error_t | LCI_sendmn (LCI_endpoint_t ep, LCI_mbuffer_t buffer, int rank, LCI_tag_t tag) |
Send a medium message with a LCI-provided buffer (allocated by LCI_mbuffer_alloc, up to LCI_MEDIUM_SIZE bytes). The send buffer will be directly returned to LCI if send succeeds so users should not use it anymore. More... | |
LCI_API LCI_error_t | LCI_sendl (LCI_endpoint_t ep, LCI_lbuffer_t buffer, int rank, LCI_tag_t tag, LCI_comp_t completion, void *user_context) |
Send a long message with a user-provided buffer. The send buffer cannot be reused until the associated completion object marks this operation as completed. More... | |
LCI_API LCI_error_t | LCI_recvs (LCI_endpoint_t ep, int rank, LCI_tag_t tag, LCI_comp_t completion, void *user_context) |
Receive a short message (up to LCI_SHORT_SIZE bytes). The received message will be delivered through the completion object. More... | |
LCI_API LCI_error_t | LCI_recvm (LCI_endpoint_t ep, LCI_mbuffer_t buffer, int rank, LCI_tag_t tag, LCI_comp_t completion, void *user_context) |
Receive a medium message (up to LCI_MEDIUM_SIZE bytes) into a user-provided buffer. More... | |
LCI_API LCI_error_t | LCI_recvmn (LCI_endpoint_t ep, int rank, LCI_tag_t tag, LCI_comp_t completion, void *user_context) |
Receive a medium message (up to LCI_MEDIUM_SIZE bytes) into a LCI-provided buffer. The receive buffer will be delivered to users through the completion object and should be returned to the runtime through LCI_mbuffer_free. More... | |
LCI_API LCI_error_t | LCI_recvl (LCI_endpoint_t ep, LCI_lbuffer_t buffer, int rank, LCI_tag_t tag, LCI_comp_t completion, void *user_context) |
Receive a long message into a user-provided buffer. More... | |
LCI_API LCI_error_t | LCI_puts (LCI_endpoint_t ep, LCI_short_t src, int rank, LCI_tag_t tag, uintptr_t remote_completion) |
Send a short message (up to LCI_SHORT_SIZE bytes). The send buffer can be immediately reused. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object. More... | |
LCI_API LCI_error_t | LCI_putma (LCI_endpoint_t ep, LCI_mbuffer_t buffer, int rank, LCI_tag_t tag, uintptr_t remote_completion) |
Send a medium message with a user-provided buffer (up to LCI_MEDIUM_SIZE bytes). The send buffer can be immediately reused. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object. More... | |
LCI_API LCI_error_t | LCI_putmna (LCI_endpoint_t ep, LCI_mbuffer_t buffer, int rank, LCI_tag_t tag, uintptr_t remote_completion) |
Send a medium message with a LCI-provided buffer (allocated by LCI_mbuffer_alloc, up to LCI_MEDIUM_SIZE bytes). The send buffer will be directly returned to LCI if send succeeds so users should not use it anymore. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object. More... | |
LCI_API LCI_error_t | LCI_putla (LCI_endpoint_t ep, LCI_lbuffer_t buffer, LCI_comp_t completion, int rank, LCI_tag_t tag, uintptr_t remote_completion, void *user_context) |
Send a long message with a user-provided buffer. The send buffer cannot be reused until the associated completion object marks this operation as completed. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object. More... | |
LCI_API LCI_error_t | LCI_putva (LCI_endpoint_t ep, LCI_iovec_t iovec, LCI_comp_t completion, int rank, LCI_tag_t tag, uintptr_t remote_completion, void *user_context) |
Send an iovec with user-provided buffers. The piggyback buffer can be immediately reused. The long buffers cannot be reused until the associated completion object marks this operation as completed. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object. More... | |
LCI_API size_t | LCI_get_iovec_piggy_back_size (int count) |
Return the maximum size of the piggyback buffer in an iovec with given number of long buffers. More... | |
Variables | |
int | LCI_MAX_TAG |
The largest allowed tag value. More... | |
int | LCI_MEDIUM_SIZE |
The maximum size (in byte) of a buffer that can be used in medium messages. More... | |
int | LCI_IOVEC_SIZE |
The maximum number of long buffers in an IO vector. More... | |
int | LCI_SEND_SLOW_DOWN_USEC |
Manually slow down LCI backend send function. More... | |
int | LCI_RECV_SLOW_DOWN_USEC |
Manually slow down LCI backend recv function. More... | |
Communication operations to send and receive messages across processes.
The LCI runtime offers users various communication operations for sending and receiving messages. According to the size and number, the messages can be divided into short, medium, long, and iovec messages. LCI provided different operations (with s, m, l, v as suffix) for those messages. LCI uses different protocols for these messages. According to who provides the send and receive buffers, the operations can be divided into 2sided and 1sided operations (send/recv v.s. put/get). For medium send/recv buffers and long recv buffers, the communication operations can either use user-allocated buffer or LCI-provided buffer. The later one can save one memory copy.
#define LCI_SHORT_SIZE 32 |
The size of LCI short data.
typedef uint32_t LCI_tag_t |
Tag type.
The largest tag allowed by the runtime is defined by LCI_MAX_TAG.
enum LCI_match_t |
LCI_API size_t LCI_get_iovec_piggy_back_size | ( | int | count | ) |
Return the maximum size of the piggyback buffer in an iovec with given number of long buffers.
[in] | count | The number of long buffers in this iovec. |
LCI_API LCI_error_t LCI_putla | ( | LCI_endpoint_t | ep, |
LCI_lbuffer_t | buffer, | ||
LCI_comp_t | completion, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
uintptr_t | remote_completion, | ||
void * | user_context | ||
) |
Send a long message with a user-provided buffer. The send buffer cannot be reused until the associated completion object marks this operation as completed. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object.
[in] | ep | The endpoint to post this send to. |
[in] | buffer | The buffer to send. |
[in] | completion | The completion object to be associated with. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | remote_completion | The completion object to signal on the receiver side. It has to be LCI_DEFAULT_COMP_REMOTE for now. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_putma | ( | LCI_endpoint_t | ep, |
LCI_mbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
uintptr_t | remote_completion | ||
) |
Send a medium message with a user-provided buffer (up to LCI_MEDIUM_SIZE bytes). The send buffer can be immediately reused. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object.
[in] | ep | The endpoint to post this receive to. |
[in] | buffer | The buffer to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | remote_completion | The completion object to signal on the receiver side. It has to be LCI_DEFAULT_COMP_REMOTE for now. |
LCI_API LCI_error_t LCI_putmna | ( | LCI_endpoint_t | ep, |
LCI_mbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
uintptr_t | remote_completion | ||
) |
Send a medium message with a LCI-provided buffer (allocated by LCI_mbuffer_alloc, up to LCI_MEDIUM_SIZE bytes). The send buffer will be directly returned to LCI if send succeeds so users should not use it anymore. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object.
[in] | ep | The endpoint to post this receive to. |
[in] | buffer | The buffer to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | remote_completion | The completion object to signal on the receiver side. It has to be LCI_DEFAULT_COMP_REMOTE for now. |
LCI_API LCI_error_t LCI_puts | ( | LCI_endpoint_t | ep, |
LCI_short_t | src, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
uintptr_t | remote_completion | ||
) |
Send a short message (up to LCI_SHORT_SIZE bytes). The send buffer can be immediately reused. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object.
[in] | ep | The endpoint to post this receive to. |
[in] | src | The data to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | remote_completion | The completion object to signal on the receiver side. It has to be LCI_DEFAULT_COMP_REMOTE for now. |
LCI_API LCI_error_t LCI_putva | ( | LCI_endpoint_t | ep, |
LCI_iovec_t | iovec, | ||
LCI_comp_t | completion, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
uintptr_t | remote_completion, | ||
void * | user_context | ||
) |
Send an iovec with user-provided buffers. The piggyback buffer can be immediately reused. The long buffers cannot be reused until the associated completion object marks this operation as completed. On the receive side, No receive needs to be posted and the data will be delivered through the remote completion object.
[in] | ep | The endpoint to post this send to. |
[in] | iovec | The iovec to send. |
[in] | completion | The completion object to be associated with. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | remote_completion | The completion object to signal on the receiver side. It has to be LCI_DEFAULT_COMP_REMOTE for now. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_recvl | ( | LCI_endpoint_t | ep, |
LCI_lbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
LCI_comp_t | completion, | ||
void * | user_context | ||
) |
Receive a long message into a user-provided buffer.
[in] | ep | The endpoint to post this receive to. |
[in] | buffer | The user-provided buffer to receive the message. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | completion | The completion object to be associated with. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_recvm | ( | LCI_endpoint_t | ep, |
LCI_mbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
LCI_comp_t | completion, | ||
void * | user_context | ||
) |
Receive a medium message (up to LCI_MEDIUM_SIZE bytes) into a user-provided buffer.
[in] | ep | The endpoint to post this receive to. |
[in] | buffer | The user-provided buffer to receive the message. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | completion | The completion object to be associated with. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_recvmn | ( | LCI_endpoint_t | ep, |
int | rank, | ||
LCI_tag_t | tag, | ||
LCI_comp_t | completion, | ||
void * | user_context | ||
) |
Receive a medium message (up to LCI_MEDIUM_SIZE bytes) into a LCI-provided buffer. The receive buffer will be delivered to users through the completion object and should be returned to the runtime through LCI_mbuffer_free.
[in] | ep | The endpoint to post this receive to. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | completion | The completion object to be associated with. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_recvs | ( | LCI_endpoint_t | ep, |
int | rank, | ||
LCI_tag_t | tag, | ||
LCI_comp_t | completion, | ||
void * | user_context | ||
) |
Receive a short message (up to LCI_SHORT_SIZE bytes). The received message will be delivered through the completion object.
[in] | ep | The endpoint to post this receive to. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | completion | The completion object to be associated with. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_sendl | ( | LCI_endpoint_t | ep, |
LCI_lbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag, | ||
LCI_comp_t | completion, | ||
void * | user_context | ||
) |
Send a long message with a user-provided buffer. The send buffer cannot be reused until the associated completion object marks this operation as completed.
[in] | ep | The endpoint to post this send to. |
[in] | buffer | The buffer to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
[in] | completion | The completion object to be associated with. |
[in] | user_context | Arbitrary data the user want to attach to this operation. It will be returned the user through the completion object. |
LCI_API LCI_error_t LCI_sendm | ( | LCI_endpoint_t | ep, |
LCI_mbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag | ||
) |
Send a medium message with a user-provided buffer (up to LCI_MEDIUM_SIZE bytes). The send buffer can be immediately reused.
[in] | ep | The endpoint to post this send to. |
[in] | buffer | The buffer to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
LCI_API LCI_error_t LCI_sendmn | ( | LCI_endpoint_t | ep, |
LCI_mbuffer_t | buffer, | ||
int | rank, | ||
LCI_tag_t | tag | ||
) |
Send a medium message with a LCI-provided buffer (allocated by LCI_mbuffer_alloc, up to LCI_MEDIUM_SIZE bytes). The send buffer will be directly returned to LCI if send succeeds so users should not use it anymore.
[in] | ep | The endpoint to post this send to. |
[in] | buffer | The buffer to send. The buffer should be allocated by LCI_mbuffer_alloc. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
LCI_API LCI_error_t LCI_sends | ( | LCI_endpoint_t | ep, |
LCI_short_t | src, | ||
int | rank, | ||
LCI_tag_t | tag | ||
) |
Send a short message (up to LCI_SHORT_SIZE bytes). The send buffer can be immediately reused.
[in] | ep | The endpoint to post this send to. |
[in] | src | The data to send. |
[in] | rank | The rank of the destination process. |
[in] | tag | The tag of this message. |
int LCI_IOVEC_SIZE |
The maximum number of long buffers in an IO vector.
int LCI_MAX_TAG |
The largest allowed tag value.
int LCI_MEDIUM_SIZE |
The maximum size (in byte) of a buffer that can be used in medium messages.
int LCI_RECV_SLOW_DOWN_USEC |
Manually slow down LCI backend recv function.
int LCI_SEND_SLOW_DOWN_USEC |
Manually slow down LCI backend send function.