UCX  1.8
Unified Communication X
ucp.h
1 /*
2 * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
3 * Copyright (C) UT-Battelle, LLC. 2014-2017. ALL RIGHTS RESERVED.
4 * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED.
5 * Copyright (C) Los Alamos National Security, LLC. 2018 ALL RIGHTS RESERVED.
6 * See file LICENSE for terms.
7 */
8 
9 #ifndef UCP_H_
10 #define UCP_H_
11 
12 #include <ucp/api/ucp_def.h>
13 #include <ucp/api/ucp_compat.h>
14 #include <ucp/api/ucp_version.h>
15 #include <ucs/type/thread_mode.h>
16 #include <ucs/type/cpu_set.h>
17 #include <ucs/config/types.h>
18 #include <ucs/sys/compiler_def.h>
19 #include <stdio.h>
20 #include <sys/types.h>
21 
22 BEGIN_C_DECLS
23 
127 };
128 
129 
139  UCP_FEATURE_TAG = UCS_BIT(0),
141  UCP_FEATURE_RMA = UCS_BIT(1),
143  UCP_FEATURE_AMO32 = UCS_BIT(2),
145  UCP_FEATURE_AMO64 = UCS_BIT(3),
147  UCP_FEATURE_WAKEUP = UCS_BIT(4),
149  UCP_FEATURE_STREAM = UCS_BIT(5),
150  UCP_FEATURE_AM = UCS_BIT(6)
152 };
153 
154 
169 };
170 
171 
184 
189 
193 };
194 
195 
204 typedef enum {
205 
211 
212 
231 };
232 
233 
259 };
260 
261 
285 };
286 
287 
304 };
305 
317 };
318 
319 
330 };
331 
332 
344 };
345 
346 
356 };
357 
358 
375 };
376 
377 
385 enum {
386  UCP_MEM_MAP_NONBLOCK = UCS_BIT(0),
391  UCP_MEM_MAP_ALLOCATE = UCS_BIT(1),
395  UCP_MEM_MAP_FIXED = UCS_BIT(2)
399 };
400 
401 
413 };
414 
415 
426  UCP_AM_SEND_REPLY = UCS_BIT(0)
427 };
428 
429 
442 };
443 
444 
453 typedef enum {
460 
461 
470 typedef enum {
479 
480 
487 typedef enum {
495 
496 
511 #define ucp_dt_make_contig(_elem_size) \
512  (((ucp_datatype_t)(_elem_size) << UCP_DATATYPE_SHIFT) | UCP_DATATYPE_CONTIG)
513 
514 
527 #define ucp_dt_make_iov() (UCP_DATATYPE_IOV)
528 
529 
540 typedef struct ucp_dt_iov {
541  void *buffer;
542  size_t length;
543 } ucp_dt_iov_t;
544 
545 
559 typedef struct ucp_generic_dt_ops {
560 
575  void* (*start_pack)(void *context, const void *buffer, size_t count);
576 
591  void* (*start_unpack)(void *context, void *buffer, size_t count);
592 
606  size_t (*packed_size)(void *state);
607 
624  size_t (*pack) (void *state, size_t offset, void *dest, size_t max_length);
625 
641  ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t length);
642 
657  void (*finish)(void *state);
659 
660 
674 typedef struct ucp_params {
680  uint64_t field_mask;
681 
688  uint64_t features;
689 
698  size_t request_size;
699 
711 
722 
728  uint64_t tag_sender_mask;
729 
745 
756 
766 } ucp_params_t;
767 
768 
776 typedef struct ucp_context_attr {
783  uint64_t field_mask;
784 
790  size_t request_size;
791 
798 
799 
807 typedef struct ucp_worker_attr {
814  uint64_t field_mask;
815 
820 
827  uint32_t address_flags;
828 
837 
843 
844 
852 typedef struct ucp_worker_params {
858  uint64_t field_mask;
859 
873 
881  ucs_cpu_set_t cpu_mask;
882 
890  unsigned events;
891 
898  void *user_data;
899 
915  int event_fd;
916 
918 
919 
927 typedef struct ucp_listener_attr {
934  uint64_t field_mask;
935 
940  struct sockaddr_storage sockaddr;
942 
943 
951 typedef struct ucp_listener_params {
958  uint64_t field_mask;
959 
968 
976 
985 
986 
993 typedef struct ucp_stream_poll_ep {
998 
1003  void *user_data;
1004 
1008  unsigned flags;
1009 
1013  uint8_t reserved[16];
1015 
1016 
1024 typedef struct ucp_mem_map_params {
1031  uint64_t field_mask;
1032 
1043  void *address;
1044 
1052  size_t length;
1053 
1061  unsigned flags;
1063 
1064 
1078  size_t length;
1079 };
1080 
1081 
1108 ucs_status_t ucp_config_read(const char *env_prefix, const char *filename,
1109  ucp_config_t **config_p);
1110 
1111 
1122 void ucp_config_release(ucp_config_t *config);
1123 
1124 
1138 ucs_status_t ucp_config_modify(ucp_config_t *config, const char *name,
1139  const char *value);
1140 
1141 
1157 void ucp_config_print(const ucp_config_t *config, FILE *stream,
1158  const char *title, ucs_config_print_flags_t print_flags);
1159 
1160 
1171 void ucp_get_version(unsigned *major_version, unsigned *minor_version,
1172  unsigned *release_number);
1173 
1174 
1182 const char *ucp_get_version_string(void);
1183 
1184 
1193 ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_version,
1194  const ucp_params_t *params, const ucp_config_t *config,
1195  ucp_context_h *context_p);
1234 static inline ucs_status_t ucp_init(const ucp_params_t *params,
1235  const ucp_config_t *config,
1236  ucp_context_h *context_p)
1237 {
1238  return ucp_init_version(UCP_API_MAJOR, UCP_API_MINOR, params, config,
1239  context_p);
1240 }
1241 
1242 
1260 void ucp_cleanup(ucp_context_h context_p);
1261 
1262 
1277  ucp_context_attr_t *attr);
1278 
1279 
1291 void ucp_context_print_info(const ucp_context_h context, FILE *stream);
1292 
1293 
1318  const ucp_worker_params_t *params,
1319  ucp_worker_h *worker_p);
1320 
1321 
1337 void ucp_worker_destroy(ucp_worker_h worker);
1338 
1339 
1352  ucp_worker_attr_t *attr);
1353 
1354 
1365 void ucp_worker_print_info(ucp_worker_h worker, FILE *stream);
1366 
1367 
1385  ucp_address_t **address_p,
1386  size_t *address_length_p);
1387 
1388 
1409 
1410 
1430 unsigned ucp_worker_progress(ucp_worker_h worker);
1431 
1432 
1453 ssize_t ucp_stream_worker_poll(ucp_worker_h worker,
1454  ucp_stream_poll_ep_t *poll_eps, size_t max_eps,
1455  unsigned flags);
1456 
1457 
1489 
1490 
1520 
1521 
1545 void ucp_worker_wait_mem(ucp_worker_h worker, void *address);
1546 
1547 
1618 
1619 
1639 
1640 
1661  const ucp_listener_params_t *params,
1662  ucp_listener_h *listener_p);
1663 
1664 
1674 void ucp_listener_destroy(ucp_listener_h listener);
1675 
1676 
1689 
1690 
1724  ucp_ep_h *ep_p);
1725 
1726 
1753 ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode);
1754 
1755 
1773  ucp_conn_request_h conn_request);
1774 
1775 
1786 void ucp_ep_print_info(ucp_ep_h ep, FILE *stream);
1787 
1788 
1842 ucs_status_ptr_t ucp_ep_flush_nb(ucp_ep_h ep, unsigned flags,
1843  ucp_send_callback_t cb);
1844 
1845 
1921  ucp_mem_h *memh_p);
1922 
1923 
1952 
1953 
1968 
1969 
1982 void ucp_mem_print_info(const char *mem_size, ucp_context_h context, FILE *stream);
1983 
1984 
1992 typedef enum ucp_mem_advice {
1999 
2000 
2009 typedef struct ucp_mem_advise_params {
2015  uint64_t field_mask;
2016 
2020  void *address;
2021 
2025  size_t length;
2026 
2032 
2033 
2054  ucp_mem_advise_params_t *params);
2055 
2056 
2088  void **rkey_buffer_p, size_t *size_p);
2089 
2090 
2107 void ucp_rkey_buffer_release(void *rkey_buffer);
2108 
2109 
2132 ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer,
2133  ucp_rkey_h *rkey_p);
2134 
2135 
2155 ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p);
2156 
2157 
2179 void ucp_rkey_destroy(ucp_rkey_h rkey);
2180 
2181 
2208  ucp_am_callback_t cb, void *arg,
2209  uint32_t flags);
2210 
2211 
2235 ucs_status_ptr_t ucp_am_send_nb(ucp_ep_h ep, uint16_t id,
2236  const void *buffer, size_t count,
2237  ucp_datatype_t datatype,
2238  ucp_send_callback_t cb, unsigned flags);
2239 
2240 
2253 void ucp_am_data_release(ucp_worker_h worker, void *data);
2254 
2255 
2294 ucs_status_ptr_t ucp_stream_send_nb(ucp_ep_h ep, const void *buffer, size_t count,
2295  ucp_datatype_t datatype, ucp_send_callback_t cb,
2296  unsigned flags);
2297 
2298 
2339 ucs_status_ptr_t ucp_tag_send_nb(ucp_ep_h ep, const void *buffer, size_t count,
2340  ucp_datatype_t datatype, ucp_tag_t tag,
2341  ucp_send_callback_t cb);
2342 
2421 ucs_status_t ucp_tag_send_nbr(ucp_ep_h ep, const void *buffer, size_t count,
2422  ucp_datatype_t datatype, ucp_tag_t tag, void *req);
2423 
2455 ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t count,
2456  ucp_datatype_t datatype, ucp_tag_t tag,
2457  ucp_send_callback_t cb);
2458 
2459 
2501 ucs_status_ptr_t ucp_stream_recv_nb(ucp_ep_h ep, void *buffer, size_t count,
2502  ucp_datatype_t datatype,
2504  size_t *length, unsigned flags);
2505 
2506 
2540 
2541 
2580 ucs_status_ptr_t ucp_tag_recv_nb(ucp_worker_h worker, void *buffer, size_t count,
2581  ucp_datatype_t datatype, ucp_tag_t tag,
2582  ucp_tag_t tag_mask, ucp_tag_recv_callback_t cb);
2583 
2584 
2614 ucs_status_t ucp_tag_recv_nbr(ucp_worker_h worker, void *buffer, size_t count,
2615  ucp_datatype_t datatype, ucp_tag_t tag,
2616  ucp_tag_t tag_mask, void *req);
2617 
2618 
2660  ucp_tag_t tag_mask, int remove,
2661  ucp_tag_recv_info_t *info);
2662 
2663 
2698  size_t count, ucp_datatype_t datatype,
2699  ucp_tag_message_h message,
2701 
2702 
2729 ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length,
2730  uint64_t remote_addr, ucp_rkey_h rkey);
2731 
2775 ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length,
2776  uint64_t remote_addr, ucp_rkey_h rkey,
2777  ucp_send_callback_t cb);
2778 
2779 
2805 ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length,
2806  uint64_t remote_addr, ucp_rkey_h rkey);
2807 
2850 ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length,
2851  uint64_t remote_addr, ucp_rkey_h rkey,
2852  ucp_send_callback_t cb);
2853 
2875 ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value,
2876  size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey);
2877 
2878 
2927  uint64_t value, void *result, size_t op_size,
2928  uint64_t remote_addr, ucp_rkey_h rkey,
2929  ucp_send_callback_t cb);
2930 
2931 
2944 ucs_status_t ucp_request_check_status(void *request);
2945 
2946 
2964 
2965 
2983 ucs_status_t ucp_stream_recv_request_test(void *request, size_t *length_p);
2984 
3004 void ucp_request_cancel(ucp_worker_h worker, void *request);
3005 
3006 
3019 void ucp_stream_data_release(ucp_ep_h ep, void *data);
3020 
3021 
3033 void ucp_request_free(void *request);
3034 
3035 
3058 ucs_status_t ucp_dt_create_generic(const ucp_generic_dt_ops_t *ops, void *context,
3059  ucp_datatype_t *datatype_p);
3060 
3061 
3077 void ucp_dt_destroy(ucp_datatype_t datatype);
3078 
3079 
3103 
3104 
3134 ucs_status_ptr_t ucp_worker_flush_nb(ucp_worker_h worker, unsigned flags,
3135  ucp_send_callback_t cb);
3136 
3137 
3143 END_C_DECLS
3144 
3145 #endif
ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, ucp_rkey_h *rkey_p)
Create remote access key from packed buffer.
void ucp_context_print_info(const ucp_context_h context, FILE *stream)
Print context information.
ucp_listener_params_field
UCP listener parameters field mask.
Definition: ucp.h:179
size_t estimated_num_eps
Definition: ucp.h:755
Definition: ucp.h:121
Definition: ucp.h:299
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:516
Definition: ucp.h:366
void ucp_rkey_buffer_release(void *rkey_buffer)
Release packed remote key buffer.
ucs_status_t ucp_context_query(ucp_context_h context_p, ucp_context_attr_t *attr)
Get attributes specific to a particular context.
ucp_mem_map_params_field
UCP memory mapping parameters field mask.
Definition: ucp.h:295
UCP receive information descriptor.
Definition: ucp.h:1074
uint64_t field_mask
Definition: ucp.h:2015
struct ucp_mem * ucp_mem_h
UCP Memory handle.
Definition: ucp_def.h:158
ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey)
Non-blocking implicit remote memory put operation.
ucp_am_cb_flags
Flags for a UCP Active Message callback.
Definition: ucp.h:411
Definition: ucp.h:164
Definition: ucp.h:386
ucs_status_t ucp_worker_get_address(ucp_worker_h worker, ucp_address_t **address_p, size_t *address_length_p)
Get the address of the worker object.
ucs_status_t ucp_dt_create_generic(const ucp_generic_dt_ops_t *ops, void *context, ucp_datatype_t *datatype_p)
Create a generic datatype.
void(* ucp_tag_recv_callback_t)(void *request, ucs_status_t status, ucp_tag_recv_info_t *info)
Completion callback for non-blocking tag receives.
Definition: ucp_def.h:434
ucs_status_t ucp_mem_unmap(ucp_context_h context, ucp_mem_h memh)
Unmap memory segment.
uint64_t ucp_datatype_t
UCP Datatype Identifier.
Definition: ucp_def.h:263
uint64_t field_mask
Definition: ucp.h:934
Definition: ucp.h:371
void(* ucp_stream_recv_callback_t)(void *request, ucs_status_t status, size_t length)
Completion callback for non-blocking stream oriented receives.
Definition: ucp_def.h:411
Definition: ucp.h:228
Definition: ucp.h:139
ucp_request_cleanup_callback_t request_cleanup
Definition: ucp.h:721
Tuning parameters for the UCP worker.
Definition: ucp.h:852
Definition: ucp.h:123
Definition: ucp.h:395
ucp_tag_t sender_tag
Definition: ucp.h:1076
ucs_status_t ucp_mem_map(ucp_context_h context, const ucp_mem_map_params_t *params, ucp_mem_h *memh_p)
Map or allocate memory for zero-copy operations.
Definition: ucp.h:457
ssize_t ucp_stream_worker_poll(ucp_worker_h worker, ucp_stream_poll_ep_t *poll_eps, size_t max_eps, unsigned flags)
Poll for endpoints that are ready to consume streaming data.
ucp_listener_conn_handler_t conn_handler
Definition: ucp.h:983
ucs_status_ptr_t ucp_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, uint64_t value, void *result, size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey, ucp_send_callback_t cb)
Post an atomic fetch operation.
Definition: ucp.h:367
Definition: ucp.h:368
ucp_tag_message_h ucp_tag_probe_nb(ucp_worker_h worker, ucp_tag_t tag, ucp_tag_t tag_mask, int remove, ucp_tag_recv_info_t *info)
Non-blocking probe and return a message.
struct ucp_context * ucp_context_h
UCP Application Context.
Definition: ucp_def.h:51
ucp_params_field
UCP context parameters field mask.
Definition: ucp.h:118
ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p)
Get a local pointer to remote memory.
uint64_t field_mask
Definition: ucp.h:680
Definition: ucp.h:269
ucs_status_t ucp_worker_arm(ucp_worker_h worker)
Turn on event notification for the next event.
struct ucp_listener_params ucp_listener_params_t
Parameters for a UCP listener object.
struct ucp_conn_request * ucp_conn_request_h
UCP connection request.
Definition: ucp_def.h:93
void ucp_dt_destroy(ucp_datatype_t datatype)
Destroy a datatype and release its resources.
Definition: ucp.h:471
uint8_t reserved[16]
Definition: ucp.h:1013
Definition: ucp.h:476
Definition: ucp.h:167
struct ucp_dt_iov ucp_dt_iov_t
Structure for scatter-gather I/O.
struct ucp_listener * ucp_listener_h
UCP listen handle.
Definition: ucp_def.h:168
ucs_thread_mode_t thread_mode
Definition: ucp.h:819
void(* ucp_request_cleanup_callback_t)(void *request)
Request cleanup callback.
Definition: ucp_def.h:286
Tuning parameters for the UCP memory mapping.
Definition: ucp.h:1024
unsigned flags
Definition: ucp.h:1008
ucp_atomic_fetch_op_t
Atomic operation requested for ucp_atomic_fetch.
Definition: ucp.h:470
ucs_status_t ucp_mem_query(const ucp_mem_h memh, ucp_mem_attr_t *attr)
query mapped memory segment
Definition: ucp.h:472
void ucp_worker_wait_mem(ucp_worker_h worker, void *address)
Wait for memory update on the address.
Definition: ucp.h:456
void ucp_listener_destroy(ucp_listener_h listener)
Stop accepting connections on a local address of the worker object.
ucp_address_t * address
Definition: ucp.h:836
void ucp_mem_print_info(const char *mem_size, ucp_context_h context, FILE *stream)
Print memory mapping information.
void ucp_cleanup(ucp_context_h context_p)
Release UCP application context.
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
Definition: ucp_def.h:176
ucp_worker_params_field
UCP worker parameters field mask.
Definition: ucp.h:162
ucs_status_ptr_t ucp_tag_msg_recv_nb(ucp_worker_h worker, void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_message_h message, ucp_tag_recv_callback_t cb)
Non-blocking receive operation for a probed message.
unsigned events
Definition: ucp.h:890
unsigned flags
Definition: ucp.h:1061
Definition: ucp.h:149
ucp_context_attr_field
UCP context attributes field mask.
Definition: ucp.h:327
size_t estimated_num_ppn
Definition: ucp.h:765
void ucp_worker_release_address(ucp_worker_h worker, ucp_address_t *address)
Release an address of the worker object.
ucs_thread_mode_t
Thread sharing mode.
Definition: thread_mode.h:19
Definition: ucp.h:1993
void ucp_ep_print_info(ucp_ep_h ep, FILE *stream)
Print endpoint information.
ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, ucp_ep_h *ep_p)
Create and connect an endpoint.
ucp_listener_attr_field
UCP listener attributes field mask.
Definition: ucp.h:354
void ucp_request_cancel(ucp_worker_h worker, void *request)
Cancel an outstanding communications request.
ucs_status_t ucp_worker_wait(ucp_worker_h worker)
Wait for an event of the worker.
Definition: ucp_compat.h:23
size_t length
Definition: ucp.h:542
void * address
Definition: ucp.h:1043
ucs_status_t ucp_config_read(const char *env_prefix, const char *filename, ucp_config_t **config_p)
Read UCP configuration descriptor.
uint64_t features
Definition: ucp.h:688
uint64_t field_mask
Definition: ucp.h:958
void(* ucp_request_init_callback_t)(void *request)
Request initialization callback.
Definition: ucp_def.h:274
size_t(* packed_size)(void *state)
Get the total size of packed data.
Definition: ucp.h:606
Definition: ucp.h:303
Definition: ucp.h:488
ucp_ep_h ep
Definition: ucp.h:997
ucs_status_t ucp_stream_recv_request_test(void *request, size_t *length_p)
Check the status and currently available state of non-blocking request returned from ucp_stream_recv_...
Definition: ucp.h:373
ucs_status_t ucp_tag_send_nbr(ucp_ep_h ep, const void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_t tag, void *req)
Non-blocking tagged-send operations with user provided request.
size_t address_length
Definition: ucp.h:841
ucs_status_t
Status codes.
Definition: status.h:45
ucp_mem_advise_params_field
UCP memory advice parameters field mask.
Definition: ucp.h:313
ucs_status_ptr_t ucp_am_send_nb(ucp_ep_h ep, uint16_t id, const void *buffer, size_t count, ucp_datatype_t datatype, ucp_send_callback_t cb, unsigned flags)
Send Active Message.
Definition: ucp.h:150
struct ucp_address ucp_address_t
UCP worker address.
Definition: ucp_def.h:103
struct ucp_params ucp_params_t
Tuning parameters for UCP library.
Output parameter of ucp_stream_worker_poll function.
Definition: ucp.h:993
void(* ucp_send_callback_t)(void *request, ucs_status_t status)
Completion callback for non-blocking sends.
Definition: ucp_def.h:304
void ucp_worker_destroy(ucp_worker_h worker)
Destroy a worker object.
struct ucp_worker_params ucp_worker_params_t
Tuning parameters for the UCP worker.
Definition: ucp.h:329
size_t length
Definition: ucp.h:1078
ucs_status_ptr_t ucp_worker_flush_nb(ucp_worker_h worker, unsigned flags, ucp_send_callback_t cb)
Flush outstanding AMO and RMA operations on the worker.
ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey)
Non-blocking implicit remote memory get operation.
ucs_status_t ucp_request_check_status(void *request)
Check the status of non-blocking request.
ucs_status_ptr_t ucp_stream_recv_data_nb(ucp_ep_h ep, size_t *length)
Non-blocking stream receive operation of unstructured data into a UCP-supplied buffer.
unsigned ucp_worker_progress(ucp_worker_h worker)
Progress all communications on a specific worker.
Definition: ucp.h:119
ucs_status_t ucp_worker_fence(ucp_worker_h worker)
Assures ordering between non-blocking operations.
ucp_request_init_callback_t request_init
Definition: ucp.h:710
ucp_atomic_post_op_t
Atomic operation requested for ucp_atomic_post.
Definition: ucp.h:453
Definition: ucp.h:143
UCP generic data type descriptor.
Definition: ucp.h:559
void ucp_get_version(unsigned *major_version, unsigned *minor_version, unsigned *release_number)
Get UCP library version.
ucp_cb_param_flags
Descriptor flags for Active Message callback.
Definition: ucp.h:440
struct ucp_config ucp_config_t
UCP configuration descriptor.
Definition: ucp_def.h:68
Definition: ucp.h:441
size_t length
Definition: ucp.h:1052
ucs_status_ptr_t ucp_tag_send_nb(ucp_ep_h ep, const void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_t tag, ucp_send_callback_t cb)
Non-blocking tagged-send operations.
void ucp_stream_data_release(ucp_ep_h ep, void *data)
Release UCP data buffer returned by ucp_stream_recv_data_nb.
Definition: ucp.h:342
void ucp_request_free(void *request)
Release a communications request.
struct ucp_recv_desc * ucp_tag_message_h
UCP Message descriptor.
Definition: ucp_def.h:253
ucp_mem_advice_t advice
Definition: ucp.h:2030
ucp_ep_params_field
UCP endpoint parameters field mask.
Definition: ucp.h:220
ucp_stream_recv_flags_t
Flags to define behavior of ucp_stream_recv_nb function.
Definition: ucp.h:487
Definition: ucp.h:296
Definition: ucp.h:165
enum ucp_mem_advice ucp_mem_advice_t
list of UCP memory use advice.
ucp_ep_close_mode
Close UCP endpoint modes.
Definition: ucp.h:268
uint64_t tag_sender_mask
Definition: ucp.h:728
Definition: ucp.h:230
ucs_status_t(* unpack)(void *state, size_t offset, const void *src, size_t length)
Unpack data.
Definition: ucp.h:641
void ucp_config_release(ucp_config_t *config)
Release configuration descriptor.
ucs_status_t ucp_listener_reject(ucp_listener_h listener, ucp_conn_request_h conn_request)
Reject an incoming connection request.
uint64_t field_mask
Definition: ucp.h:858
ucs_status_t ucp_mem_advise(ucp_context_h context, ucp_mem_h memh, ucp_mem_advise_params_t *params)
give advice about the use of memory
struct ucp_stream_poll_ep ucp_stream_poll_ep_t
Output parameter of ucp_stream_worker_poll function.
Definition: ucp.h:229
ucs_status_ptr_t ucp_stream_send_nb(ucp_ep_h ep, const void *buffer, size_t count, ucp_datatype_t datatype, ucp_send_callback_t cb, unsigned flags)
Non-blocking stream send operation.
Definition: ucp.h:426
void(* finish)(void *state)
Finish packing/unpacking.
Definition: ucp.h:657
ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value, size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey)
Post an atomic memory operation.
Definition: ucp.h:412
ucp_feature
UCP configuration features.
Definition: ucp.h:138
Definition: ucp.h:455
Structure for scatter-gather I/O.
Definition: ucp.h:540
struct sockaddr_storage sockaddr
Definition: ucp.h:940
Context attributes.
Definition: ucp.h:776
Definition: ucp.h:474
Definition: ucp.h:369
const char * ucp_get_version_string(void)
Get UCP library version as a string.
ucs_status_t ucp_tag_recv_nbr(ucp_worker_h worker, void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_t tag, ucp_tag_t tag_mask, void *req)
Non-blocking tagged-receive operation.
Definition: ucp.h:454
Definition: ucp.h:328
ucs_status_t ucp_worker_query(ucp_worker_h worker, ucp_worker_attr_t *attr)
Get attributes specific to a particular worker.
ucp_send_am_flags
Flags for sending a UCP Active Message.
Definition: ucp.h:425
Definition: ucp.h:227
void * ucs_status_ptr_t
Status pointer.
Definition: status.h:106
static ucs_status_t ucp_init(const ucp_params_t *params, const ucp_config_t *config, ucp_context_h *context_p)
UCP context initialization.
Definition: ucp.h:1234
uint64_t ucp_tag_t
UCP Tag Identifier.
Definition: ucp_def.h:242
Definition: ucp.h:458
UCP listener attributes.
Definition: ucp.h:927
uint64_t field_mask
Definition: ucp.h:1031
Definition: ucp.h:475
ucs_status_t ucp_config_modify(ucp_config_t *config, const char *name, const char *value)
Modify context configuration.
UCP worker attributes.
Definition: ucp.h:807
Definition: ucp.h:473
struct ucp_mem_advise_params ucp_mem_advise_params_t
Tuning parameters for the UCP memory advice.
void ucp_config_print(const ucp_config_t *config, FILE *stream, const char *title, ucs_config_print_flags_t print_flags)
Print configuration information.
Tuning parameters for UCP library.
Definition: ucp.h:674
Definition: ucp.h:145
struct ucp_worker * ucp_worker_h
UCP Worker.
Definition: ucp_def.h:231
ucp_worker_address_flags_t
UCP worker address flags.
Definition: ucp.h:204
ucs_status_t ucp_tag_recv_request_test(void *request, ucp_tag_recv_info_t *info)
Check the status and currently available state of non-blocking request returned from ucp_tag_recv_nb ...
Tuning parameters for the UCP memory advice.
Definition: ucp.h:2009
Definition: ucp.h:147
void ucp_worker_print_info(ucp_worker_h worker, FILE *stream)
Print information about the worker.
uint64_t field_mask
Definition: ucp.h:814
Parameters for a UCP listener object.
Definition: ucp.h:951
struct ucp_context_attr ucp_context_attr_t
Context attributes.
ucs_status_ptr_t ucp_tag_recv_nb(ucp_worker_h worker, void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_t tag, ucp_tag_t tag_mask, ucp_tag_recv_callback_t cb)
Non-blocking tagged-receive operation.
ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode)
Non-blocking endpoint closure.
int mt_workers_shared
Definition: ucp.h:744
ucs_status_t ucp_worker_set_am_handler(ucp_worker_h worker, uint16_t id, ucp_am_callback_t cb, void *arg, uint32_t flags)
Add user defined callback for Active Message.
Definition: ucp.h:122
ucp_worker_attr_field
UCP worker attributes field mask.
Definition: ucp.h:340
ucp_listener_accept_handler_t accept_handler
Definition: ucp.h:975
size_t(* pack)(void *state, size_t offset, void *dest, size_t max_length)
Pack data.
Definition: ucp.h:624
size_t length
Definition: ucp.h:2025
void ucp_am_data_release(ucp_worker_h worker, void *data)
Releases Active Message data.
ucs_status_t ucp_rkey_pack(ucp_context_h context, ucp_mem_h memh, void **rkey_buffer_p, size_t *size_p)
Pack memory region remote access key.
Definition: ucp.h:250
Definition: types.h:116
ucs_status_t ucp_worker_create(ucp_context_h context, const ucp_worker_params_t *params, ucp_worker_h *worker_p)
Create a worker object.
struct ucp_ep * ucp_ep_h
UCP Endpoint.
Definition: ucp_def.h:83
struct ucp_mem_map_params ucp_mem_map_params_t
Tuning parameters for the UCP memory mapping.
void * address
Definition: ucp.h:2020
ucs_status_t ucp_listener_create(ucp_worker_h worker, const ucp_listener_params_t *params, ucp_listener_h *listener_p)
Accept connections on a local address of the worker object.
ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t count, ucp_datatype_t datatype, ucp_tag_t tag, ucp_send_callback_t cb)
Non-blocking synchronous tagged-send operation.
ucs_status_t ucp_worker_get_efd(ucp_worker_h worker, int *fd)
Obtain an event file descriptor for event notification.
Definition: ucp.h:477
UCP callback to handle the connection request in a client-server connection establishment flow.
Definition: ucp_def.h:389
Definition: ucp.h:120
ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey, ucp_send_callback_t cb)
Non-blocking remote memory get operation.
uint32_t address_flags
Definition: ucp.h:827
Definition: ucp.h:391
Definition: ucp.h:282
size_t request_size
Definition: ucp.h:790
ucs_thread_mode_t thread_mode
Definition: ucp.h:796
ucs_cpu_set_t cpu_mask
Definition: ucp.h:881
ucs_thread_mode_t thread_mode
Definition: ucp.h:872
struct ucp_rkey * ucp_rkey_h
UCP Remote memory handle.
Definition: ucp_def.h:143
ucp_mem_advice
list of UCP memory use advice.
Definition: ucp.h:1992
void * user_data
Definition: ucp.h:898
ucs_status_t(* ucp_am_callback_t)(void *arg, void *data, size_t length, ucp_ep_h reply_ep, unsigned flags)
Callback to process incoming Active Message.
Definition: ucp_def.h:505
struct ucp_worker_attr ucp_worker_attr_t
UCP worker attributes.
Definition: ucp.h:1994
void ucp_rkey_destroy(ucp_rkey_h rkey)
Destroy the remote key.
ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey, ucp_send_callback_t cb)
Non-blocking remote memory put operation.
ucp_dt_type
UCP data type classification.
Definition: ucp.h:365
struct ucp_generic_dt_ops ucp_generic_dt_ops_t
UCP generic data type descriptor.
Definition: ucp.h:141
ucs_status_ptr_t ucp_stream_recv_nb(ucp_ep_h ep, void *buffer, size_t count, ucp_datatype_t datatype, ucp_stream_recv_callback_t cb, size_t *length, unsigned flags)
Non-blocking stream receive operation of structured data into a user-supplied buffer.
ucs_status_t ucp_listener_query(ucp_listener_h listener, ucp_listener_attr_t *attr)
Get attributes specific to a particular listener.
size_t request_size
Definition: ucp.h:698
Definition: ucp.h:225
uint64_t field_mask
Definition: ucp.h:783
ucp_ep_params_flags_field
UCP endpoint parameters flags.
Definition: ucp.h:241
ucs_status_t ucp_worker_signal(ucp_worker_h worker)
Cause an event of the worker.
int event_fd
Definition: ucp.h:915
void * buffer
Definition: ucp.h:541
struct ucp_listener_attr ucp_listener_attr_t
UCP listener attributes.
void * user_data
Definition: ucp.h:1003
ucs_status_ptr_t ucp_ep_flush_nb(ucp_ep_h ep, unsigned flags, ucp_send_callback_t cb)
Non-blocking flush of outstanding AMO and RMA operations on the endpoint.
ucs_sock_addr_t sockaddr
Definition: ucp.h:967