Go to the documentation of this file.
16 #include "lci_config.h"
172 #define LCI_API __attribute__((visibility("default")))
174 #define LCI_DEFAULT_COMP_REMOTE 0
177 #define LCI_SEGMENT_ALL NULL
178 #define LCI_RANK_ANY (-1)
294 #define LCI_SHORT_SIZE 32
302 uint8_t u8 __attribute__((vector_size(32)));
303 uint16_t u16 __attribute__((vector_size(32)));
304 uint32_t u32 __attribute__((vector_size(32)));
305 uint64_t u64 __attribute__((vector_size(32)));
306 int8_t s8 __attribute__((vector_size(32)));
307 int16_t s16 __attribute__((vector_size(32)));
308 int32_t s32 __attribute__((vector_size(32)));
309 int64_t s64 __attribute__((vector_size(32)));
310 double dbl __attribute__((vector_size(32)));
311 float flt __attribute__((vector_size(32)));
368 struct LCI_endpoint_s;
882 LCI_tag_t tag, uintptr_t remote_completion);
901 LCI_tag_t tag, uintptr_t remote_completion);
921 LCI_tag_t tag, uintptr_t remote_completion);
944 uintptr_t remote_completion,
void* user_context);
968 uintptr_t remote_completion,
void* user_context);
1042 size_t* return_count);
int LCI_SERVER_MAX_SENDS
Server's send queue length.
LCI_API LCI_error_t LCI_sync_wait(LCI_comp_t completion, LCI_request_t request[])
Wait for a synchronizer to be triggered. A synchronizer will be triggered if all the associated opera...
@ LCI_PORT_MESSAGE
Definition: lci.h:211
LCI_API LCI_error_t LCI_queue_pop_multiple(LCI_comp_t cq, size_t request_count, LCI_request_t *requests, size_t *return_count)
Pop multiple entry from the completion queue. This call is nonblocking.
void(* LCI_handler_t)(LCI_request_t request)
The active message handler type.
Definition: lci.h:386
int rank
Definition: lci.h:354
LCI_API LCI_error_t LCI_device_free(LCI_device_t *device_ptr)
Initialize a device.
Request object. Completion mechanisms will write completion information to it.
Definition: lci.h:351
int LCI_SERVER_NUM_PKTS
Total number of packets.
uint32_t LCI_tag_t
Tag type.
Definition: lci.h:245
LCI_API LCI_error_t LCI_plist_set_comp_type(LCI_plist_t plist, LCI_port_t port, LCI_comp_type_t comp_type)
Set the completion mechanism of the property list.
int LCI_DEFAULT_TABLE_LENGTH
Initial number of entries in a default matching table.
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_SI...
@ LCI_PORT_COMMAND
Definition: lci.h:210
LCI_device_t LCI_UR_DEVICE
Default device initialized by LCI_initialize. Just for convenience.
@ LCI_OK
Definition: lci.h:185
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.
@ LCI_ERR_FATAL
Definition: lci.h:192
int LCI_PACKET_SIZE
Size of each packet.
LCI_iovec_t iovec
Definition: lci.h:343
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....
LCI_API LCI_error_t LCI_lbuffer_memalign(LCI_device_t device, size_t size, size_t alignment, LCI_lbuffer_t *lbuffer)
Allocate a memory buffer of arbitrary size with a specific alignment and register it.
LCI_comp_t LCI_UR_CQ
Default completion queue initialized by LCI_initialize. Just for convenience.
size_t length
Definition: lci.h:274
int LCI_SERVER_MAX_CQES
Server's completion queue length.
@ LCI_COMPLETION_NONE
Definition: lci.h:219
LCI long communication buffer.
Definition: lci.h:271
int LCI_MAX_QUEUE_LENGTH
Maximum number of entries in a completion queue.
LCI_API LCI_error_t LCI_plist_set_match_type(LCI_plist_t plist, LCI_match_t match_type)
Set the tag matching rule of the property list.
LCI_API LCI_error_t LCI_queue_free(LCI_comp_t *cq)
Free a completion queue.
int LCI_MEDIUM_SIZE
The maximum size (in byte) of a buffer that can be used in medium messages.
@ LCI_ERR_FEATURE_NA
Definition: lci.h:191
LCI_API LCI_error_t LCI_queue_wait(LCI_comp_t cq, LCI_request_t *request)
Pop one entry from the completion queue. This call will block the calling thread until there is an en...
@ LCI_ERR_RETRY_NOMEM
Definition: lci.h:189
LCI_API LCI_error_t LCI_queue_pop(LCI_comp_t cq, LCI_request_t *request)
Pop one entry from the completion queue. This call is nonblocking.
void * address
Definition: lci.h:285
LCI short data.
Definition: lci.h:300
LCI_mbuffer_t mbuffer
Definition: lci.h:341
LCI_API LCI_error_t LCI_device_init(LCI_device_t *device_ptr)
Initialize a device.
@ LCI_IMMEDIATE
Definition: lci.h:230
LCI_API LCI_error_t LCI_mbuffer_alloc(LCI_device_t device, LCI_mbuffer_t *mbuffer)
Get a pre-registered memory buffer of size LCI_MEDIUM_SIZE.
LCI medium communication buffer.
Definition: lci.h:284
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 ...
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 ...
LCI_API LCI_error_t LCI_initialized(int *flag)
Check whether the LCI runtime has been initialized.
LCI_API LCI_error_t LCI_sync_test(LCI_comp_t completion, LCI_request_t request[])
Test whether a synchronizer has been triggered. A synchronizer will be triggered if all the associate...
LCI_API LCI_error_t LCI_lbuffer_alloc(LCI_device_t device, size_t size, LCI_lbuffer_t *lbuffer)
Allocate a memory buffer of arbitrary size and register it.
LCI_API LCI_error_t LCI_memory_deregister(LCI_segment_t *segment)
Deregister a memory region.
int LCI_SINGLE_THREAD_PROGRESS
LCI_progress on the same device will not be called by multiple threads simultaneously.
LCI_API LCI_error_t LCI_endpoint_free(LCI_endpoint_t *ep_ptr)
Free an endpoint.
size_t length
Definition: lci.h:286
@ LCI_ERR_RETRY_LOCK
Definition: lci.h:187
LCI_API LCI_error_t LCI_queue_wait_multiple(LCI_comp_t cq, size_t request_count, LCI_request_t *requests)
Pop multiple entry from the completion queue.This call will block the calling thread until request_co...
int LCI_SEND_SLOW_DOWN_USEC
Manually slow down LCI backend send function.
LCI_API LCI_error_t LCI_memory_register(LCI_device_t device, void *address, size_t length, LCI_segment_t *segment)
Register a memory region to a device.
int LCI_TOUCH_LBUFFER
Whether touch every page of lbuffers allocated by LCI_lbuffer_alloc.
LCI_API LCI_error_t LCI_finalize()
Finalize the LCI runtime. No LCI calls are allowed to be called after LCI_finalize except LCI_initial...
LCI_segment_t segment
Definition: lci.h:272
struct LCII_mr_t * LCI_segment_t
LCI memory segment.
Definition: lci.h:261
int LCI_IBV_USE_PREFETCH
Whether or what to use IBV prefetch.
struct LCI_endpoint_s * LCI_endpoint_t
The endpoint type.
Definition: lci.h:373
@ LCI_MATCH_TAG
Definition: lci.h:202
LCI_API LCI_error_t LCI_plist_set_default_comp(LCI_plist_t plist, LCI_comp_t comp)
Set the default completion mechanism of the property list. The default completion mechanism will be t...
void * LCI_comp_t
LCI generic completion type.
Definition: lci.h:251
LCI_API LCI_error_t LCI_endpoint_init(LCI_endpoint_t *ep_ptr, LCI_device_t device, LCI_plist_t plist)
Create an endpoint according to a property list.
LCI_data_type_t
LCI data type.
Definition: lci.h:229
int LCI_NUM_PROCESSES
The number of processes in this job.
LCI_error_t flag
Definition: lci.h:353
@ LCI_IOVEC
Definition: lci.h:235
LCI_port_t
LCI Port type.
Definition: lci.h:209
@ LCI_MEDIUM
Definition: lci.h:232
int LCI_RECV_SLOW_DOWN_USEC
Manually slow down LCI backend recv function.
LCI_mbuffer_t piggy_back
Definition: lci.h:329
#define LCI_API
Definition: lci.h:172
LCI_comp_type_t
LCI completion enumeration type.
Definition: lci.h:218
LCI_lbuffer_t * lbuffers
Definition: lci.h:330
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....
LCI_lbuffer_t lbuffer
Definition: lci.h:342
int LCI_MAX_TABLE_LENGTH
Maximum number of entries in a matching table.
LCI_API LCI_error_t LCI_sync_create(LCI_device_t device, int threshold, LCI_comp_t *completion)
Create a synchronizer.
LCI_API LCI_error_t LCI_queue_create(LCI_device_t device, LCI_comp_t *cq)
Create a completion queue.
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 ...
LCI_match_t
LCI Match type. Define the matching rule between sends and receives.
Definition: lci.h:199
#define LCI_SHORT_SIZE
The size of LCI short data.
Definition: lci.h:294
LCI_API LCI_error_t LCI_progress(LCI_device_t device)
Make progress on the background works of a device. This function is not thread-safe.
int LCI_MAX_TAG
The largest allowed tag value.
int LCI_RANK
The rank of the current process w.r.t the job.
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.
bool LCI_IBV_ENABLE_EVENT_POLLING_THREAD
whether to enable ibv's event polling thread.
@ LCI_COMPLETION_SYNC
Definition: lci.h:222
LCI_API LCI_error_t LCI_sync_signal(LCI_comp_t completion, LCI_request_t request)
Signal a synchronizer once. A synchronizer needs to be signaled threshold time to be considered trigg...
@ LCI_ERR_RETRY
Definition: lci.h:186
int LCI_DEFAULT_QUEUE_LENGTH
Initial number of entries in a default completion queue.
@ LCI_COMPLETION_HANDLER
Definition: lci.h:221
@ LCI_MATCH_RANKTAG
Definition: lci.h:200
struct LCI_device_s * LCI_device_t
The device type.
Definition: lci.h:366
LCI_API LCI_error_t LCI_queue_len(LCI_comp_t cq, size_t *len)
Query the number of entries in a completion queue.
LCI_API LCI_error_t LCI_mbuffer_free(LCI_mbuffer_t mbuffer)
Return a pre-registered memory buffer to the LCI runtime.
LCI_data_t data
Definition: lci.h:357
LCI_short_t immediate
Definition: lci.h:340
LCI_API LCI_error_t LCI_barrier()
Invoke a barrier across all LCI processes in the same job. The call will block the calling thread unt...
@ LCI_COMPLETION_QUEUE
Definition: lci.h:220
LCI_API LCI_error_t LCI_lbuffer_free(LCI_lbuffer_t lbuffer)
Deregister and free a memory buffer.
int LCI_PACKET_RETURN_THRESHOLD
The packet returning threshold.
LCI_API LCI_error_t LCI_plist_create(LCI_plist_t *plist_ptr)
Create a property list.
LCI_API LCI_error_t LCI_sync_free(LCI_comp_t *completion)
Free a synchronizer.
LCI_endpoint_t LCI_UR_ENDPOINT
Default endpoint initialized by LCI_initialize. Just for convenience.
LCI iovec, which is comprised of a piggyback buffer and multiple long buffers.
Definition: lci.h:328
int LCI_MAX_ENDPOINTS
The maximum number of endpoints that can be created.
LCI_error_t
LCI Error type.
Definition: lci.h:184
int LCI_IBV_USE_ODP
Whether or what to use IBV on-demand paging.
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 associate...
LCI_API LCI_error_t LCI_plist_decode(LCI_plist_t plist, char *string)
Decode a property list into a string.
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.
int LCI_USE_DREG
Whether or what to use LCI-provided registration cache.
A generic type for communication buffers.
Definition: lci.h:339
void * user_context
Definition: lci.h:358
struct LCI_plist_s * LCI_plist_t
The property list type.
Definition: lci.h:380
LCI_API LCI_error_t LCI_handler_create(LCI_device_t device, LCI_handler_t handler, LCI_comp_t *completion)
Create an active message handler.
LCI_API LCI_error_t LCI_initialize()
Initialize the LCI runtime. No LCI calls are allowed to be called before LCI_initialize except LCI_in...
LCI_API LCI_error_t LCI_plist_get(LCI_endpoint_t ep, LCI_plist_t *plist_ptr)
Query the property list of an endpoint.
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.
int LCI_SERVER_MAX_RECVS
Server's recv queue length.
@ LCI_LONG
Definition: lci.h:234
int count
Definition: lci.h:331
int LCI_IOVEC_SIZE
The maximum number of long buffers in an IO vector.
int LCI_MAX_SYNC_LENGTH
Maximum number of request a synchronizer may be waiting for.
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 associate...
void * address
Definition: lci.h:273
LCI_tag_t tag
Definition: lci.h:355
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_SI...
LCI_data_type_t type
Definition: lci.h:356
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....
LCI_API LCI_error_t LCI_plist_free(LCI_plist_t *plist_ptr)
Free a property list.