UCX  1.10
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 <ucs/memory/memory_type.h>
20 #include <stdio.h>
21 #include <sys/types.h>
22 
23 BEGIN_C_DECLS
24 
128 };
129 
130 
140  UCP_FEATURE_TAG = UCS_BIT(0),
142  UCP_FEATURE_RMA = UCS_BIT(1),
144  UCP_FEATURE_AMO32 = UCS_BIT(2),
146  UCP_FEATURE_AMO64 = UCS_BIT(3),
148  UCP_FEATURE_WAKEUP = UCS_BIT(4),
150  UCP_FEATURE_STREAM = UCS_BIT(5),
151  UCP_FEATURE_AM = UCS_BIT(6)
153 };
154 
155 
170 };
171 
172 
185 
190 
194 };
195 
196 
205 typedef enum {
206 
212 
213 
232 };
233 
234 
260 };
261 
262 
269 typedef enum {
288 
289 
313 };
314 
315 
334 };
335 
347 };
348 
349 
361 };
362 
363 
377 };
378 
379 
389 };
390 
391 
401 };
402 
403 
420 };
421 
422 
430 enum {
431  UCP_MEM_MAP_NONBLOCK = UCS_BIT(0),
436  UCP_MEM_MAP_ALLOCATE = UCS_BIT(1),
440  UCP_MEM_MAP_FIXED = UCS_BIT(2)
444 };
445 
446 
454 enum {
459 };
460 
461 
473 };
474 
475 
484  UCP_AM_SEND_FLAG_REPLY = UCS_BIT(0),
488  UCP_AM_SEND_FLAG_EAGER = UCS_BIT(1),
490  UCP_AM_SEND_FLAG_RNDV = UCS_BIT(2),
494 };
495 
496 
509 };
510 
511 
520 typedef enum {
527 
528 
537 typedef enum {
546 
547 
555 typedef enum {
564 
565 
572 typedef enum {
580 
581 
590 typedef enum {
595  UCP_OP_ATTR_FIELD_FLAGS = UCS_BIT(4),
615 } ucp_op_attr_t;
616 
617 
626 typedef enum {
637 
647 
648 
673 };
674 
675 
690 #define ucp_dt_make_contig(_elem_size) \
691  (((ucp_datatype_t)(_elem_size) << UCP_DATATYPE_SHIFT) | UCP_DATATYPE_CONTIG)
692 
693 
707 #define ucp_dt_make_iov() ((ucp_datatype_t)UCP_DATATYPE_IOV)
708 
709 
720 typedef struct ucp_dt_iov {
721  void *buffer;
722  size_t length;
723 } ucp_dt_iov_t;
724 
725 
739 typedef struct ucp_generic_dt_ops {
740 
755  void* (*start_pack)(void *context, const void *buffer, size_t count);
756 
771  void* (*start_unpack)(void *context, void *buffer, size_t count);
772 
786  size_t (*packed_size)(void *state);
787 
804  size_t (*pack) (void *state, size_t offset, void *dest, size_t max_length);
805 
821  ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t length);
822 
837  void (*finish)(void *state);
839 
840 
854 typedef struct ucp_params {
860  uint64_t field_mask;
861 
868  uint64_t features;
869 
878  size_t request_size;
879 
891 
902 
908  uint64_t tag_sender_mask;
909 
925 
936 
946 } ucp_params_t;
947 
948 
956 typedef struct ucp_context_attr {
963  uint64_t field_mask;
964 
970  size_t request_size;
971 
977 
982  uint64_t memory_types;
984 
985 
993 typedef struct ucp_worker_attr {
1000  uint64_t field_mask;
1001 
1006 
1013  uint32_t address_flags;
1014 
1023 
1028 
1034 
1035 
1043 typedef struct ucp_worker_params {
1049  uint64_t field_mask;
1050 
1064 
1072  ucs_cpu_set_t cpu_mask;
1073 
1081  unsigned events;
1082 
1089  void *user_data;
1090 
1107 
1109 
1110 
1118 typedef struct ucp_listener_attr {
1125  uint64_t field_mask;
1126 
1131  struct sockaddr_storage sockaddr;
1133 
1134 
1142 typedef struct ucp_conn_request_attr {
1149  uint64_t field_mask;
1150 
1155  struct sockaddr_storage client_address;
1157 
1158 
1166 typedef struct ucp_listener_params {
1173  uint64_t field_mask;
1174 
1183 
1191 
1200 
1201 
1208 typedef struct ucp_stream_poll_ep {
1213 
1218  void *user_data;
1219 
1223  unsigned flags;
1224 
1228  uint8_t reserved[16];
1230 
1231 
1239 typedef struct ucp_mem_map_params {
1246  uint64_t field_mask;
1247 
1258  void *address;
1259 
1267  size_t length;
1268 
1276  unsigned flags;
1277 
1285  unsigned prot;
1286 
1287  /*
1288  * Memory type (for possible memory types see @ref ucs_memory_type_t)
1289  * It is an optimization hint to avoid memory type detection for map buffer.
1290  * The meaning of this field depends on the operation type.
1291  *
1292  * - Memory allocation: (@ref UCP_MEM_MAP_ALLOCATE flag is set) This field
1293  * specifies the type of memory to allocate. If it's not set (along with its
1294  * corresponding bit in the field_mask - @ref UCP_MEM_MAP_PARAM_FIELD_MEMORY_TYPE),
1295  * @ref UCS_MEMORY_TYPE_HOST will be assumed by default.
1296  *
1297  * - Memory registration: This field specifies the type of memory which is
1298  * pointed by @ref ucp_mem_map_params.address. If it's not set (along with its
1299  * corresponding bit in the field_mask - @ref UCP_MEM_MAP_PARAM_FIELD_MEMORY_TYPE),
1300  * or set to @ref UCS_MEMORY_TYPE_UNKNOWN, the memory type will be dectected
1301  * internally.
1302  */
1305 
1306 
1320  size_t length;
1321 };
1322 
1323 
1364 typedef struct {
1370  uint32_t op_attr_mask;
1371 
1372  /* Operation specific flags. */
1373  uint32_t flags;
1374 
1381  void *request;
1382 
1387  union {
1390  ucp_stream_recv_nbx_callback_t recv_stream;
1392  } cb;
1393 
1400 
1404  void *user_data;
1405 
1411 
1420 
1427  union {
1428  size_t *length; /* Length of received message in bytes.
1429  Relevant for non-tagged receive
1430  operations. */
1431  ucp_tag_recv_info_t *tag_info; /* Information about received message.
1432  Relevant for @a ucp_tag_recv_nbx
1433  function. */
1434  } recv_info;
1436 
1437 
1443 typedef struct ucp_am_handler_param {
1449  uint64_t field_mask;
1450 
1454  unsigned id;
1455 
1459  uint32_t flags;
1460 
1466 
1471  void *arg;
1473 
1474 
1485  uint64_t recv_attr;
1486 
1491 };
1492 
1493 
1520 ucs_status_t ucp_config_read(const char *env_prefix, const char *filename,
1521  ucp_config_t **config_p);
1522 
1523 
1534 void ucp_config_release(ucp_config_t *config);
1535 
1536 
1550 ucs_status_t ucp_config_modify(ucp_config_t *config, const char *name,
1551  const char *value);
1552 
1553 
1569 void ucp_config_print(const ucp_config_t *config, FILE *stream,
1570  const char *title, ucs_config_print_flags_t print_flags);
1571 
1572 
1583 void ucp_get_version(unsigned *major_version, unsigned *minor_version,
1584  unsigned *release_number);
1585 
1586 
1594 const char *ucp_get_version_string(void);
1595 
1596 
1605 ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_version,
1606  const ucp_params_t *params, const ucp_config_t *config,
1607  ucp_context_h *context_p);
1646 static inline ucs_status_t ucp_init(const ucp_params_t *params,
1647  const ucp_config_t *config,
1648  ucp_context_h *context_p)
1649 {
1650  return ucp_init_version(UCP_API_MAJOR, UCP_API_MINOR, params, config,
1651  context_p);
1652 }
1653 
1654 
1672 void ucp_cleanup(ucp_context_h context_p);
1673 
1674 
1689  ucp_context_attr_t *attr);
1690 
1691 
1703 void ucp_context_print_info(const ucp_context_h context, FILE *stream);
1704 
1705 
1730  const ucp_worker_params_t *params,
1731  ucp_worker_h *worker_p);
1732 
1733 
1749 void ucp_worker_destroy(ucp_worker_h worker);
1750 
1751 
1764  ucp_worker_attr_t *attr);
1765 
1766 
1777 void ucp_worker_print_info(ucp_worker_h worker, FILE *stream);
1778 
1779 
1797  ucp_address_t **address_p,
1798  size_t *address_length_p);
1799 
1800 
1821 
1822 
1842 unsigned ucp_worker_progress(ucp_worker_h worker);
1843 
1844 
1865 ssize_t ucp_stream_worker_poll(ucp_worker_h worker,
1866  ucp_stream_poll_ep_t *poll_eps, size_t max_eps,
1867  unsigned flags);
1868 
1869 
1901 
1902 
1932 
1933 
1957 void ucp_worker_wait_mem(ucp_worker_h worker, void *address);
1958 
1959 
2030 
2031 
2051 
2052 
2073  const ucp_listener_params_t *params,
2074  ucp_listener_h *listener_p);
2075 
2076 
2086 void ucp_listener_destroy(ucp_listener_h listener);
2087 
2088 
2101 
2102 
2116  ucp_conn_request_attr_t *attr);
2117 
2118 
2152  ucp_ep_h *ep_p);
2153 
2154 
2181 ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode);
2182 
2183 
2207  const ucp_request_param_t *param);
2208 
2209 
2227  ucp_conn_request_h conn_request);
2228 
2229 
2240 void ucp_ep_print_info(ucp_ep_h ep, FILE *stream);
2241 
2242 
2296 ucs_status_ptr_t ucp_ep_flush_nb(ucp_ep_h ep, unsigned flags,
2297  ucp_send_callback_t cb);
2298 
2299 
2322 
2323 
2399  ucp_mem_h *memh_p);
2400 
2401 
2430 
2431 
2446 
2447 
2460 void ucp_mem_print_info(const char *mem_size, ucp_context_h context, FILE *stream);
2461 
2462 
2470 typedef enum ucp_mem_advice {
2477 
2478 
2487 typedef struct ucp_mem_advise_params {
2493  uint64_t field_mask;
2494 
2498  void *address;
2499 
2503  size_t length;
2504 
2510 
2511 
2532  ucp_mem_advise_params_t *params);
2533 
2534 
2566  void **rkey_buffer_p, size_t *size_p);
2567 
2568 
2585 void ucp_rkey_buffer_release(void *rkey_buffer);
2586 
2587 
2610 ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer,
2611  ucp_rkey_h *rkey_p);
2612 
2613 
2633 ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p);
2634 
2635 
2657 void ucp_rkey_destroy(ucp_rkey_h rkey);
2658 
2659 
2686  ucp_am_callback_t cb, void *arg,
2687  uint32_t flags);
2688 
2689 
2711  const ucp_am_handler_param_t *param);
2712 
2713 
2737 ucs_status_ptr_t ucp_am_send_nb(ucp_ep_h ep, uint16_t id,
2738  const void *buffer, size_t count,
2739  ucp_datatype_t datatype,
2740  ucp_send_callback_t cb, unsigned flags);
2741 
2742 
2792 ucs_status_ptr_t ucp_am_send_nbx(ucp_ep_h ep, unsigned id,
2793  const void *header, size_t header_length,
2794  const void *buffer, size_t count,
2795  const ucp_request_param_t *param);
2796 
2797 
2838 ucs_status_ptr_t ucp_am_recv_data_nbx(ucp_worker_h worker, void *data_desc,
2839  void *buffer, size_t count,
2840  const ucp_request_param_t *param);
2841 
2842 
2855 void ucp_am_data_release(ucp_worker_h worker, void *data);
2856 
2857 
2896 ucs_status_ptr_t ucp_stream_send_nb(ucp_ep_h ep, const void *buffer, size_t count,
2897  ucp_datatype_t datatype, ucp_send_callback_t cb,
2898  unsigned flags);
2899 
2900 
2927 ucs_status_ptr_t ucp_stream_send_nbx(ucp_ep_h ep, const void *buffer, size_t count,
2928  const ucp_request_param_t *param);
2929 
2930 
2971 ucs_status_ptr_t ucp_tag_send_nb(ucp_ep_h ep, const void *buffer, size_t count,
2972  ucp_datatype_t datatype, ucp_tag_t tag,
2973  ucp_send_callback_t cb);
2974 
3053 ucs_status_t ucp_tag_send_nbr(ucp_ep_h ep, const void *buffer, size_t count,
3054  ucp_datatype_t datatype, ucp_tag_t tag, void *req);
3055 
3087 ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t count,
3088  ucp_datatype_t datatype, ucp_tag_t tag,
3089  ucp_send_callback_t cb);
3090 
3091 
3130 ucs_status_ptr_t ucp_tag_send_nbx(ucp_ep_h ep, const void *buffer, size_t count,
3131  ucp_tag_t tag, const ucp_request_param_t *param);
3132 
3133 
3162 ucs_status_ptr_t ucp_tag_send_sync_nbx(ucp_ep_h ep, const void *buffer,
3163  size_t count, ucp_tag_t tag,
3164  const ucp_request_param_t *param);
3165 
3166 
3208 ucs_status_ptr_t ucp_stream_recv_nb(ucp_ep_h ep, void *buffer, size_t count,
3209  ucp_datatype_t datatype,
3211  size_t *length, unsigned flags);
3212 
3213 
3249 ucs_status_ptr_t ucp_stream_recv_nbx(ucp_ep_h ep, void *buffer, size_t count,
3250  size_t *length,
3251  const ucp_request_param_t *param);
3252 
3253 
3287 
3288 
3327 ucs_status_ptr_t ucp_tag_recv_nb(ucp_worker_h worker, void *buffer, size_t count,
3328  ucp_datatype_t datatype, ucp_tag_t tag,
3329  ucp_tag_t tag_mask, ucp_tag_recv_callback_t cb);
3330 
3331 
3361 ucs_status_t ucp_tag_recv_nbr(ucp_worker_h worker, void *buffer, size_t count,
3362  ucp_datatype_t datatype, ucp_tag_t tag,
3363  ucp_tag_t tag_mask, void *req);
3364 
3365 
3403 ucs_status_ptr_t ucp_tag_recv_nbx(ucp_worker_h worker, void *buffer, size_t count,
3404  ucp_tag_t tag, ucp_tag_t tag_mask,
3405  const ucp_request_param_t *param);
3406 
3407 
3449  ucp_tag_t tag_mask, int remove,
3450  ucp_tag_recv_info_t *info);
3451 
3452 
3487  size_t count, ucp_datatype_t datatype,
3488  ucp_tag_message_h message,
3490 
3491 
3523  size_t count, ucp_tag_message_h message,
3524  const ucp_request_param_t *param);
3525 
3552 ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length,
3553  uint64_t remote_addr, ucp_rkey_h rkey);
3554 
3598 ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length,
3599  uint64_t remote_addr, ucp_rkey_h rkey,
3600  ucp_send_callback_t cb);
3601 
3602 
3653 ucs_status_ptr_t ucp_put_nbx(ucp_ep_h ep, const void *buffer, size_t count,
3654  uint64_t remote_addr, ucp_rkey_h rkey,
3655  const ucp_request_param_t *param);
3656 
3657 
3683 ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length,
3684  uint64_t remote_addr, ucp_rkey_h rkey);
3685 
3728 ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length,
3729  uint64_t remote_addr, ucp_rkey_h rkey,
3730  ucp_send_callback_t cb);
3731 
3732 
3779 ucs_status_ptr_t ucp_get_nbx(ucp_ep_h ep, void *buffer, size_t count,
3780  uint64_t remote_addr, ucp_rkey_h rkey,
3781  const ucp_request_param_t *param);
3782 
3783 
3805 ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value,
3806  size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey);
3807 
3808 
3857  uint64_t value, void *result, size_t op_size,
3858  uint64_t remote_addr, ucp_rkey_h rkey,
3859  ucp_send_callback_t cb);
3860 
3861 
3929 ucp_atomic_op_nbx(ucp_ep_h ep, ucp_atomic_op_t opcode, const void *buffer,
3930  size_t count, uint64_t remote_addr, ucp_rkey_h rkey,
3931  const ucp_request_param_t *param);
3932 
3933 
3946 ucs_status_t ucp_request_check_status(void *request);
3947 
3948 
3966 
3967 
3985 ucs_status_t ucp_stream_recv_request_test(void *request, size_t *length_p);
3986 
4006 void ucp_request_cancel(ucp_worker_h worker, void *request);
4007 
4008 
4021 void ucp_stream_data_release(ucp_ep_h ep, void *data);
4022 
4023 
4035 void ucp_request_free(void *request);
4036 
4037 
4051 void *ucp_request_alloc(ucp_worker_h worker);
4052 
4053 
4076 ucs_status_t ucp_dt_create_generic(const ucp_generic_dt_ops_t *ops, void *context,
4077  ucp_datatype_t *datatype_p);
4078 
4079 
4095 void ucp_dt_destroy(ucp_datatype_t datatype);
4096 
4097 
4121 
4122 
4152 ucs_status_ptr_t ucp_worker_flush_nb(ucp_worker_h worker, unsigned flags,
4153  ucp_send_callback_t cb);
4154 
4155 
4182  const ucp_request_param_t *param);
4183 
4184 
4193 END_C_DECLS
4194 
4195 #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:180
size_t estimated_num_eps
Definition: ucp.h:935
Definition: ucp.h:122
Definition: ucp.h:327
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:673
Definition: ucp.h:411
uint32_t flags
Definition: ucp.h:1459
Definition: ucp.h:561
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.
ucs_status_ptr_t ucp_tag_send_nbx(ucp_ep_h ep, const void *buffer, size_t count, ucp_tag_t tag, const ucp_request_param_t *param)
Non-blocking tagged-send operation.
Definition: ucp.h:455
ucp_mem_map_params_field
UCP memory mapping parameters field mask.
Definition: ucp.h:323
UCP receive information descriptor.
Definition: ucp.h:1316
uint64_t field_mask
Definition: ucp.h:2493
struct ucp_mem * ucp_mem_h
UCP Memory handle.
Definition: ucp_def.h:165
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:471
Definition: ucp.h:165
Definition: ucp.h:431
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:484
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:270
Definition: ucp.h:490
uint64_t field_mask
Definition: ucp.h:1125
Definition: ucp.h:601
Definition: ucp.h:416
Definition: ucp.h:597
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:439
Definition: ucp.h:229
Definition: ucp.h:140
ucs_status_ptr_t ucp_tag_send_sync_nbx(ucp_ep_h ep, const void *buffer, size_t count, ucp_tag_t tag, const ucp_request_param_t *param)
Non-blocking synchronous tagged-send operation.
ucp_request_cleanup_callback_t request_cleanup
Definition: ucp.h:901
uint32_t op_attr_mask
Definition: ucp.h:1370
Tuning parameters for the UCP worker.
Definition: ucp.h:1043
Definition: ucp.h:124
Definition: ucp.h:440
ucp_am_recv_attr_t
UCP AM receive data parameter fields and flags.
Definition: ucp.h:626
ucp_tag_t sender_tag
Definition: ucp.h:1318
Definition: ucp.h:557
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:524
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:1198
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:593
Definition: ucp.h:412
Definition: ucp.h:413
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:58
ucp_params_field
UCP context parameters field mask.
Definition: ucp.h:119
Definition: ucp.h:458
ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p)
Get a local pointer to remote memory.
Definition: ucp.h:598
void * ucp_request_alloc(ucp_worker_h worker)
Create an empty communications request.
uint64_t field_mask
Definition: ucp.h:860
Definition: ucp.h:297
ucs_status_ptr_t ucp_ep_flush_nbx(ucp_ep_h ep, const ucp_request_param_t *param)
Non-blocking flush of outstanding AMO and RMA operations on the endpoint.
void(* ucp_tag_recv_nbx_callback_t)(void *request, ucs_status_t status, const ucp_tag_recv_info_t *tag_info, void *user_data)
Completion callback for non-blocking tag receives ucp_tag_recv_nbx call.
Definition: ucp_def.h:509
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:100
void ucp_dt_destroy(ucp_datatype_t datatype)
Destroy a datatype and release its resources.
Definition: ucp.h:538
void * request
Definition: ucp.h:1381
uint8_t reserved[16]
Definition: ucp.h:1228
Definition: ucp.h:543
Definition: ucp.h:168
struct ucp_dt_iov ucp_dt_iov_t
Structure for scatter-gather I/O.
Definition: ucp.h:627
struct ucp_listener * ucp_listener_h
UCP listen handle.
Definition: ucp_def.h:175
ucs_thread_mode_t thread_mode
Definition: ucp.h:1005
void(* ucp_request_cleanup_callback_t)(void *request)
Request cleanup callback.
Definition: ucp_def.h:293
uint32_t flags
Definition: ucp.h:1373
Tuning parameters for the UCP memory mapping.
Definition: ucp.h:1239
ucs_status_ptr_t ucp_am_send_nbx(ucp_ep_h ep, unsigned id, const void *header, size_t header_length, const void *buffer, size_t count, const ucp_request_param_t *param)
Send Active Message.
unsigned flags
Definition: ucp.h:1223
ucp_atomic_fetch_op_t
Atomic operation requested for ucp_atomic_fetch.
Definition: ucp.h:537
Definition: ucp.h:672
ucs_status_t ucp_mem_query(const ucp_mem_h memh, ucp_mem_attr_t *attr)
query mapped memory segment
Definition: ucp.h:539
ucs_status_ptr_t ucp_stream_send_nbx(ucp_ep_h ep, const void *buffer, size_t count, const ucp_request_param_t *param)
Non-blocking stream send operation.
Definition: ucp.h:645
void ucp_worker_wait_mem(ucp_worker_h worker, void *address)
Wait for memory update on the address.
Definition: ucp.h:523
ucs_status_ptr_t ucp_stream_recv_nbx(ucp_ep_h ep, void *buffer, size_t count, size_t *length, const ucp_request_param_t *param)
Non-blocking stream receive operation of structured data into a user-supplied buffer.
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:1022
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.
Definition: ucp.h:456
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
Definition: ucp_def.h:183
ucp_worker_params_field
UCP worker parameters field mask.
Definition: ucp.h:163
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:1081
struct ucp_am_handler_param ucp_am_handler_param_t
Active Message handler parameters passed to ucp_worker_set_am_recv_handler routine.
unsigned flags
Definition: ucp.h:1276
Definition: ucp.h:150
Definition: ucp.h:660
ucp_context_attr_field
UCP context attributes field mask.
Definition: ucp.h:357
size_t estimated_num_ppn
Definition: ucp.h:945
ucp_ep_h reply_ep
Definition: ucp.h:1490
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:2471
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:387
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
unsigned id
Definition: ucp.h:1454
size_t length
Definition: ucp.h:722
void(* ucp_send_nbx_callback_t)(void *request, ucs_status_t status, void *user_data)
Completion callback for non-blocking sends ucp_tag_send_nbx call.
Definition: ucp_def.h:331
void * address
Definition: ucp.h:1258
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:868
uint64_t field_mask
Definition: ucp.h:1173
void(* ucp_request_init_callback_t)(void *request)
Request initialization callback.
Definition: ucp_def.h:281
size_t(* packed_size)(void *state)
Get the total size of packed data.
Definition: ucp.h:786
Definition: ucp.h:331
Definition: ucp.h:484
Definition: ucp.h:573
unsigned prot
Definition: ucp.h:1285
ucs_status_ptr_t ucp_tag_recv_nbx(ucp_worker_h worker, void *buffer, size_t count, ucp_tag_t tag, ucp_tag_t tag_mask, const ucp_request_param_t *param)
Non-blocking tagged-receive operation.
ucp_ep_h ep
Definition: ucp.h:1212
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:418
Definition: ucp.h:636
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.
struct ucp_conn_request_attr ucp_conn_request_attr_t
UCP listener's connection request attributes.
size_t max_am_header
Definition: ucp.h:1032
size_t address_length
Definition: ucp.h:1027
ucs_status_t
Status codes.
Definition: status.h:45
ucp_mem_advise_params_field
UCP memory advice parameters field mask.
Definition: ucp.h:343
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:151
Definition: ucp.h:360
struct ucp_address ucp_address_t
UCP worker address.
Definition: ucp_def.h:110
struct ucp_params ucp_params_t
Tuning parameters for UCP library.
Output parameter of ucp_stream_worker_poll function.
Definition: ucp.h:1208
void(* ucp_stream_recv_nbx_callback_t)(void *request, ucs_status_t status, size_t length, void *user_data)
Completion callback for non-blocking stream receives ucp_stream_recv_nbx call.
Definition: ucp_def.h:461
void(* ucp_send_callback_t)(void *request, ucs_status_t status)
Completion callback for non-blocking sends.
Definition: ucp_def.h:311
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:359
size_t length
Definition: ucp.h:1320
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:120
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:890
Definition: ucp.h:596
ucs_status_t(* ucp_am_recv_callback_t)(void *arg, const void *header, size_t header_length, void *data, size_t length, const ucp_am_recv_param_t *param)
Callback to process incoming Active Message sent by ucp_am_send_nbx routine.
Definition: ucp_def.h:660
ucp_atomic_post_op_t
Atomic operation requested for ucp_atomic_post.
Definition: ucp.h:520
Definition: ucp.h:144
uint64_t memory_types
Definition: ucp.h:982
uint64_t field_mask
Definition: ucp.h:1149
UCP generic data type descriptor.
Definition: ucp.h:739
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:507
struct ucp_config ucp_config_t
UCP configuration descriptor.
Definition: ucp_def.h:75
Definition: ucp.h:508
size_t length
Definition: ucp.h:1267
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:373
Operation parameters provided in ucp_am_recv_callback_t callback.
Definition: ucp.h:1479
ucs_status_ptr_t ucp_ep_close_nbx(ucp_ep_h ep, const ucp_request_param_t *param)
Non-blocking endpoint closure.
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:260
ucp_mem_advice_t advice
Definition: ucp.h:2508
Definition: ucp.h:594
Definition: ucp.h:560
ucp_ep_params_field
UCP endpoint parameters field mask.
Definition: ucp.h:221
ucp_stream_recv_flags_t
Flags to define behavior of ucp_stream_recv_nb function.
Definition: ucp.h:572
Definition: ucp.h:595
Definition: ucp.h:324
Definition: ucp.h:332
Definition: ucp.h:166
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:296
uint64_t recv_attr
Definition: ucp.h:1485
uint64_t tag_sender_mask
Definition: ucp.h:908
void * arg
Definition: ucp.h:1471
ucs_status_ptr_t ucp_get_nbx(ucp_ep_h ep, void *buffer, size_t count, uint64_t remote_addr, ucp_rkey_h rkey, const ucp_request_param_t *param)
Non-blocking remote memory get operation.
Definition: ucp.h:231
UCP listener's connection request attributes.
Definition: ucp.h:1142
Definition: ucp.h:592
ucs_status_t(* unpack)(void *state, size_t offset, const void *src, size_t length)
Unpack data.
Definition: ucp.h:821
void ucp_config_release(ucp_config_t *config)
Release configuration descriptor.
Definition: ucp.h:591
ucs_status_t ucp_listener_reject(ucp_listener_h listener, ucp_conn_request_h conn_request)
Reject an incoming connection request.
ucp_am_handler_param_field
UCP AM receive data parameters fields and flags.
Definition: ucp.h:656
ucs_status_ptr_t ucp_tag_msg_recv_nbx(ucp_worker_h worker, void *buffer, size_t count, ucp_tag_message_h message, const ucp_request_param_t *param)
Non-blocking receive operation for a probed message.
uint64_t field_mask
Definition: ucp.h:1049
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
ucp_atomic_op_t
Atomic operation requested for ucp_atomic_op_nbx.
Definition: ucp.h:555
struct ucp_stream_poll_ep ucp_stream_poll_ep_t
Output parameter of ucp_stream_worker_poll function.
Definition: ucp.h:230
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:493
void(* finish)(void *state)
Finish packing/unpacking.
Definition: ucp.h:837
enum ucs_memory_type ucs_memory_type_t
Memory types.
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.
uint64_t field_mask
Definition: ucp.h:1449
Definition: ucp.h:472
ucp_feature
UCP configuration features.
Definition: ucp.h:139
Definition: ucp.h:522
Structure for scatter-gather I/O.
Definition: ucp.h:720
struct sockaddr_storage sockaddr
Definition: ucp.h:1131
Context attributes.
Definition: ucp.h:956
Definition: ucp.h:541
Definition: ucp.h:414
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:521
Definition: ucp.h:358
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:483
Definition: ucp.h:228
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:1646
ucp_am_recv_callback_t cb
Definition: ucp.h:1465
uint64_t ucp_tag_t
UCP Tag Identifier.
Definition: ucp_def.h:249
Definition: ucp.h:556
Definition: ucp.h:525
UCP listener attributes.
Definition: ucp.h:1118
ucp_op_attr_t
UCP operation fields and flags.
Definition: ucp.h:590
uint64_t field_mask
Definition: ucp.h:1246
Definition: ucp.h:542
void * user_data
Definition: ucp.h:1404
ucs_status_t ucp_conn_request_query(ucp_conn_request_h conn_request, ucp_conn_request_attr_t *attr)
Get attributes specific to a particular connection request received on the server side.
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:993
Definition: ucp.h:540
struct ucp_mem_advise_params ucp_mem_advise_params_t
Tuning parameters for the UCP memory advice.
ucs_memory_type_t memory_type
Definition: ucp.h:1303
void * reply_buffer
Definition: ucp.h:1410
ucs_status_ptr_t ucp_atomic_op_nbx(ucp_ep_h ep, ucp_atomic_op_t opcode, const void *buffer, size_t count, uint64_t remote_addr, ucp_rkey_h rkey, const ucp_request_param_t *param)
Post an atomic memory operation.
void ucp_config_print(const ucp_config_t *config, FILE *stream, const char *title, ucs_config_print_flags_t print_flags)
Print configuration information.
Definition: ucp.h:562
Tuning parameters for UCP library.
Definition: ucp.h:854
Definition: ucp.h:146
ucs_status_t ucp_worker_set_am_recv_handler(ucp_worker_h worker, const ucp_am_handler_param_t *param)
Add user defined callback for Active Message.
struct ucp_worker * ucp_worker_h
UCP Worker.
Definition: ucp_def.h:238
Definition: ucp.h:559
ucp_worker_address_flags_t
UCP worker address flags.
Definition: ucp.h:205
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:2487
Definition: ucp.h:148
void ucp_worker_print_info(ucp_worker_h worker, FILE *stream)
Print information about the worker.
uint64_t field_mask
Definition: ucp.h:1000
Parameters for a UCP listener object.
Definition: ucp.h:1166
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.
Active Message handler parameters passed to ucp_worker_set_am_recv_handler routine.
Definition: ucp.h:1443
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:924
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.
struct sockaddr_storage client_address
Definition: ucp.h:1155
ucs_memory_type_t memory_type
Definition: ucp.h:1419
Definition: ucp.h:123
ucp_worker_attr_field
UCP worker attributes field mask.
Definition: ucp.h:371
ucp_conn_request_attr_field
UCP listener's connection request attributes field mask.
Definition: ucp.h:399
ucp_listener_accept_handler_t accept_handler
Definition: ucp.h:1190
size_t(* pack)(void *state, size_t offset, void *dest, size_t max_length)
Pack data.
Definition: ucp.h:804
ucp_ep_close_flags_t
Close UCP endpoint modes.
Definition: ucp.h:269
size_t length
Definition: ucp.h:2503
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:251
Definition: types.h:118
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:90
struct ucp_mem_map_params ucp_mem_map_params_t
Tuning parameters for the UCP memory mapping.
void * address
Definition: ucp.h:2498
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:544
ucs_status_ptr_t ucp_am_recv_data_nbx(ucp_worker_h worker, void *data_desc, void *buffer, size_t count, const ucp_request_param_t *param)
Receive Active Message sent with rendezvous protocol.
UCP callback to handle the connection request in a client-server connection establishment flow.
Definition: ucp_def.h:417
Definition: ucp.h:121
Definition: ucp.h:488
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:1013
Definition: ucp.h:436
Operation parameters passed to ucp_tag_send_nbx, ucp_tag_send_sync_nbx, ucp_tag_recv_nbx,...
Definition: ucp.h:1364
Definition: ucp.h:310
Definition: ucp.h:558
size_t request_size
Definition: ucp.h:970
ucs_thread_mode_t thread_mode
Definition: ucp.h:976
ucs_cpu_set_t cpu_mask
Definition: ucp.h:1072
ucs_thread_mode_t thread_mode
Definition: ucp.h:1063
struct ucp_rkey * ucp_rkey_h
UCP Remote memory handle.
Definition: ucp_def.h:150
ucp_mem_advice
list of UCP memory use advice.
Definition: ucp.h:2470
void * user_data
Definition: ucp.h:1089
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:604
struct ucp_worker_attr ucp_worker_attr_t
UCP worker attributes.
Definition: ucp.h:2472
Definition: ucp.h:457
void ucp_rkey_destroy(ucp_rkey_h rkey)
Destroy the remote key.
ucs_status_ptr_t ucp_worker_flush_nbx(ucp_worker_h worker, const ucp_request_param_t *param)
Flush outstanding AMO and RMA operations on the worker.
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:410
struct ucp_generic_dt_ops ucp_generic_dt_ops_t
UCP generic data type descriptor.
Definition: ucp.h:142
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_ptr_t ucp_put_nbx(ucp_ep_h ep, const void *buffer, size_t count, uint64_t remote_addr, ucp_rkey_h rkey, const ucp_request_param_t *param)
Non-blocking remote memory put operation.
void(* ucp_am_recv_data_nbx_callback_t)(void *request, ucs_status_t status, size_t length, void *user_data)
Completion callback for non-blocking Active Message receives.
Definition: ucp_def.h:531
ucp_datatype_t datatype
Definition: ucp.h:1399
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:878
Definition: ucp.h:226
Definition: ucp.h:270
Definition: ucp.h:611
uint64_t field_mask
Definition: ucp.h:963
ucp_ep_params_flags_field
UCP endpoint parameters flags.
Definition: ucp.h:242
ucs_status_t ucp_worker_signal(ucp_worker_h worker)
Cause an event of the worker.
Definition: ucp.h:600
int event_fd
Definition: ucp.h:1106
Definition: ucp.h:668
void * buffer
Definition: ucp.h:721
struct ucp_listener_attr ucp_listener_attr_t
UCP listener attributes.
void * user_data
Definition: ucp.h:1218
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:1182