UCX  1.21
Unified Communication X
uct.h
1 
10 #ifndef UCT_H_
11 #define UCT_H_
12 
13 #include <uct/api/uct_def.h>
14 #include <uct/api/tl.h>
15 #include <uct/api/version.h>
16 #include <ucs/async/async_fwd.h>
17 #include <ucs/datastruct/callbackq.h>
18 #include <ucs/datastruct/callbackq_compat.h>
19 #include <ucs/datastruct/linear_func.h>
20 #include <ucs/memory/memory_type.h>
21 #include <ucs/type/status.h>
22 #include <ucs/type/thread_mode.h>
23 #include <ucs/type/cpu_set.h>
24 #include <ucs/stats/stats_fwd.h>
25 #include <ucs/sys/compiler_def.h>
26 #include <ucs/sys/topo/base/topo.h>
27 
28 #include <sys/socket.h>
29 #include <stdio.h>
30 #include <sched.h>
31 
32 BEGIN_C_DECLS
33 
218 typedef struct uct_md_resource_desc {
219  char md_name[UCT_MD_NAME_MAX];
221 
222 
235 };
236 
237 
245 typedef struct uct_component_attr {
252  uint64_t field_mask;
253 
255  char name[UCT_COMPONENT_NAME_MAX];
256 
259 
274 
278  uint64_t flags;
280 
281 
289 enum {
294  UCT_COMPONENT_FLAG_CM = UCS_BIT(0),
295 
301 };
302 
303 
308 typedef enum {
315 
316 
328 typedef struct uct_tl_resource_desc {
329  char tl_name[UCT_TL_NAME_MAX];
330  char dev_name[UCT_DEVICE_NAME_MAX];
333  ucs_sys_device_t sys_device;
336 
337 #define UCT_TL_RESOURCE_DESC_FMT "%s/%s"
338 #define UCT_TL_RESOURCE_DESC_ARG(_resource) (_resource)->tl_name, (_resource)->dev_name
339 
340 
348 typedef enum uct_atomic_op {
349  UCT_ATOMIC_OP_ADD,
350  UCT_ATOMIC_OP_AND,
351  UCT_ATOMIC_OP_OR,
352  UCT_ATOMIC_OP_XOR,
353  UCT_ATOMIC_OP_SWAP,
354  UCT_ATOMIC_OP_CSWAP,
355  UCT_ATOMIC_OP_LAST
356 } uct_atomic_op_t;
357 
358 
369  /* Active message capabilities */
370 #define UCT_IFACE_FLAG_AM_SHORT UCS_BIT(0)
371 #define UCT_IFACE_FLAG_AM_BCOPY UCS_BIT(1)
372 #define UCT_IFACE_FLAG_AM_ZCOPY UCS_BIT(2)
374 #define UCT_IFACE_FLAG_PENDING UCS_BIT(3)
376  /* PUT capabilities */
377 #define UCT_IFACE_FLAG_PUT_SHORT UCS_BIT(4)
378 #define UCT_IFACE_FLAG_PUT_BCOPY UCS_BIT(5)
379 #define UCT_IFACE_FLAG_PUT_ZCOPY UCS_BIT(6)
381  /* GET capabilities */
382 #define UCT_IFACE_FLAG_GET_SHORT UCS_BIT(8)
383 #define UCT_IFACE_FLAG_GET_BCOPY UCS_BIT(9)
384 #define UCT_IFACE_FLAG_GET_ZCOPY UCS_BIT(10)
386  /* Atomic operations domain */
387 #define UCT_IFACE_FLAG_ATOMIC_CPU UCS_BIT(30)
389 #define UCT_IFACE_FLAG_ATOMIC_DEVICE UCS_BIT(31)
393  /* Error handling capabilities */
394 #define UCT_IFACE_FLAG_ERRHANDLE_SHORT_BUF UCS_BIT(32)
395 #define UCT_IFACE_FLAG_ERRHANDLE_BCOPY_BUF UCS_BIT(33)
396 #define UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF UCS_BIT(34)
397 #define UCT_IFACE_FLAG_ERRHANDLE_AM_ID UCS_BIT(35)
398 #define UCT_IFACE_FLAG_ERRHANDLE_REMOTE_MEM UCS_BIT(36)
399 #define UCT_IFACE_FLAG_ERRHANDLE_BCOPY_LEN UCS_BIT(37)
400 #define UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE UCS_BIT(38)
402 #define UCT_IFACE_FLAG_EP_CHECK UCS_BIT(39)
404  /* Connection establishment */
405 #define UCT_IFACE_FLAG_CONNECT_TO_IFACE UCS_BIT(40)
406 #define UCT_IFACE_FLAG_CONNECT_TO_EP UCS_BIT(41)
407 #define UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR UCS_BIT(42)
409  /* Special transport flags */
410 #define UCT_IFACE_FLAG_AM_DUP UCS_BIT(43)
414  /* Callback invocation */
415 #define UCT_IFACE_FLAG_CB_SYNC UCS_BIT(44)
418 #define UCT_IFACE_FLAG_CB_ASYNC UCS_BIT(45)
425  /* Keepalive */
426 #define UCT_IFACE_FLAG_EP_KEEPALIVE UCS_BIT(46)
432  /* Tag matching operations */
433 #define UCT_IFACE_FLAG_TAG_EAGER_SHORT UCS_BIT(50)
434 #define UCT_IFACE_FLAG_TAG_EAGER_BCOPY UCS_BIT(51)
435 #define UCT_IFACE_FLAG_TAG_EAGER_ZCOPY UCS_BIT(52)
436 #define UCT_IFACE_FLAG_TAG_RNDV_ZCOPY UCS_BIT(53)
438  /* Interface capability */
439 #define UCT_IFACE_FLAG_INTER_NODE UCS_BIT(54)
440 #define UCT_IFACE_FLAG_DEVICE_EP UCS_BIT(55)
456  /* Event types */
457 #define UCT_IFACE_FLAG_EVENT_SEND_COMP UCS_BIT(0)
459 #define UCT_IFACE_FLAG_EVENT_RECV UCS_BIT(1)
461 #define UCT_IFACE_FLAG_EVENT_RECV_SIG UCS_BIT(2)
463  /* Event notification mechanisms */
464 #define UCT_IFACE_FLAG_EVENT_FD UCS_BIT(3)
466 #define UCT_IFACE_FLAG_EVENT_ASYNC_CB UCS_BIT(4)
477 typedef enum {
487 
488 
501  UCT_EVENT_SEND_COMP = UCS_BIT(0),
502  UCT_EVENT_RECV = UCS_BIT(1),
503  UCT_EVENT_RECV_SIG = UCS_BIT(2),
506 };
507 
508 
513 enum uct_flush_flags {
518  UCT_FLUSH_FLAG_CANCEL = UCS_BIT(0),
533  UCT_FLUSH_FLAG_REMOTE = UCS_BIT(1)
542 };
543 
544 
549 enum uct_progress_types {
550  UCT_PROGRESS_SEND = UCS_BIT(0),
551  UCT_PROGRESS_RECV = UCS_BIT(1),
552  UCT_PROGRESS_THREAD_SAFE = UCS_BIT(7)
555 };
556 
557 
562 enum uct_msg_flags {
563  UCT_SEND_FLAG_SIGNALED = UCS_BIT(0),
569  UCT_SEND_FLAG_PEER_CHECK = UCS_BIT(1)
576 };
577 
578 
585 enum uct_cb_flags {
586  UCT_CB_FLAG_RESERVED = UCS_BIT(1),
587  UCT_CB_FLAG_ASYNC = UCS_BIT(2)
602 };
603 
604 
609 enum uct_iface_open_mode {
611  UCT_IFACE_OPEN_MODE_DEVICE = UCS_BIT(0),
612 
616 
620 };
621 
622 
633 
635  UCT_IFACE_PARAM_FIELD_OPEN_MODE = UCS_BIT(1),
639  UCT_IFACE_PARAM_FIELD_DEVICE = UCS_BIT(2),
643  UCT_IFACE_PARAM_FIELD_SOCKADDR = UCS_BIT(3),
644 
647 
650 
659 
662 
665 
668 
671 
674 
677 
680 
683 
686 
689 };
690 
695 typedef enum {
704 
709 enum {
713  UCT_MD_FLAG_ALLOC = UCS_BIT(0),
714 
718  UCT_MD_FLAG_REG = UCS_BIT(1),
719 
723  UCT_MD_FLAG_NEED_MEMH = UCS_BIT(2),
724 
729  UCT_MD_FLAG_NEED_RKEY = UCS_BIT(3),
730 
734  UCT_MD_FLAG_ADVISE = UCS_BIT(4),
735 
739  UCT_MD_FLAG_FIXED = UCS_BIT(5),
740 
747  UCT_MD_FLAG_RKEY_PTR = UCS_BIT(6),
748 
752  UCT_MD_FLAG_SOCKADDR = UCS_BIT(7),
753 
761 
766  UCT_MD_FLAG_EXPORTED_MKEY = UCS_BIT(9),
767 
771  UCT_MD_FLAG_REG_DMABUF = UCS_BIT(10),
772 
777  UCT_MD_FLAG_LAST = UCS_BIT(11)
778 };
779 
784 enum uct_md_mem_flags {
789  UCT_MD_MEM_FLAG_NONBLOCK = UCS_BIT(0),
790 
794  UCT_MD_MEM_FLAG_FIXED = UCS_BIT(1),
795 
800  UCT_MD_MEM_FLAG_LOCK = UCS_BIT(2),
801 
806  UCT_MD_MEM_FLAG_HIDE_ERRORS = UCS_BIT(3),
807 
808  /* Memory access flags */
812  UCT_MD_MEM_ACCESS_REMOTE_PUT = UCS_BIT(5),
813 
817  UCT_MD_MEM_ACCESS_REMOTE_GET = UCS_BIT(6),
818 
822  UCT_MD_MEM_ACCESS_REMOTE_ATOMIC = UCS_BIT(7),
823 
828 
832  UCT_MD_MEM_ACCESS_LOCAL_WRITE = UCS_BIT(9),
841  UCT_MD_MEM_SYMMETRIC_RKEY = UCS_BIT(10),
842 
846  UCT_MD_MEM_GVA = UCS_BIT(11),
847 
856 
864 };
865 
866 
871 typedef enum {
878 
879 
887 enum uct_cm_attr_field {
890 };
891 
903 };
904 
905 
916 
919 
922 };
924 
932 enum uct_ep_params_field {
935 
937  UCT_EP_PARAM_FIELD_USER_DATA = UCS_BIT(1),
938 
940  UCT_EP_PARAM_FIELD_DEV_ADDR = UCS_BIT(2),
941 
943  UCT_EP_PARAM_FIELD_IFACE_ADDR = UCS_BIT(3),
944 
946  UCT_EP_PARAM_FIELD_SOCKADDR = UCS_BIT(4),
947 
950 
955  UCT_EP_PARAM_FIELD_CM = UCS_BIT(7),
956 
959 
962 
965 
968 
971 
974 
977 
980 
983 
986 
989 };
990 
1002 
1005 };
1007 
1016 enum uct_iface_feature {
1018  UCT_IFACE_FEATURE_AM = UCS_BIT(0),
1019 
1021  UCT_IFACE_FEATURE_PUT = UCS_BIT(1),
1024  UCT_IFACE_FEATURE_GET = UCS_BIT(2),
1027  UCT_IFACE_FEATURE_AMO32 = UCS_BIT(3),
1028 
1030  UCT_IFACE_FEATURE_AMO64 = UCS_BIT(4),
1031 
1033  UCT_IFACE_FEATURE_TAG = UCS_BIT(5),
1034 
1036  UCT_IFACE_FEATURE_FLUSH_REMOTE = UCS_BIT(6),
1040 };
1041 
1042 /*
1043  * @ingroup UCT_RESOURCE
1044  * @brief Process Per Node (PPN) bandwidth specification: f(ppn) = dedicated + shared / ppn
1045  *
1046  * This structure specifies a function which is used as basis for bandwidth
1047  * estimation of various UCT operations. This information can be used to select
1048  * the best performing combination of UCT operations.
1049  */
1050 typedef struct uct_ppn_bandwidth {
1051  double dedicated;
1052  double shared;
1055 
1061  struct {
1062  struct {
1063  size_t max_short;
1064  size_t max_bcopy;
1065  size_t min_zcopy;
1068  size_t max_zcopy;
1071  size_t opt_zcopy_align;
1073  size_t align_mtu;
1074  size_t max_iov;
1077  } put;
1079  struct {
1080  size_t max_short;
1081  size_t max_bcopy;
1082  size_t min_zcopy;
1085  size_t max_zcopy;
1088  size_t opt_zcopy_align;
1090  size_t align_mtu;
1091  size_t max_iov;
1094  } get;
1096  struct {
1097  size_t max_short;
1099  size_t max_bcopy;
1100  size_t min_zcopy;
1103  size_t max_zcopy;
1106  size_t opt_zcopy_align;
1108  size_t align_mtu;
1109  size_t max_hdr;
1110  size_t max_iov;
1113  } am;
1115  struct {
1116  struct {
1117  size_t min_recv;
1118  size_t max_zcopy;
1120  size_t max_iov;
1123  size_t max_outstanding;
1125  } recv;
1126 
1127  struct {
1128  size_t max_short;
1130  size_t max_bcopy;
1132  size_t max_zcopy;
1134  size_t max_iov;
1136  } eager;
1138  struct {
1139  size_t max_zcopy;
1141  size_t max_hdr;
1144  size_t max_iov;
1146  } rndv;
1147  } tag;
1149  struct {
1150  uint64_t op_flags;
1151  uint64_t fop_flags;
1152  } atomic32, atomic64;
1154  uint64_t flags;
1155  uint64_t event_flags;
1156  } cap;
1158  size_t device_addr_len;
1159  size_t iface_addr_len;
1160  size_t ep_addr_len;
1161  size_t max_conn_priv;
1164  struct sockaddr_storage listen_sockaddr;
1166  /*
1167  * The following fields define expected performance of the communication
1168  * interface, this would usually be a combination of device and system
1169  * characteristics and determined at run time.
1170  */
1171  double overhead;
1172  uct_ppn_bandwidth_t bandwidth;
1173  ucs_linear_func_t latency;
1175  uint8_t priority;
1176  size_t max_num_eps;
1177  unsigned dev_num_paths;
1186 };
1187 
1188 
1200  uint64_t field_mask;
1202  ucs_cpu_set_t cpu_mask;
1204  uint64_t open_mode;
1206  union {
1213  struct {
1214  const char *tl_name;
1215  const char *dev_name;
1216  } device;
1224  struct {
1225  ucs_sock_addr_t listen_sockaddr;
1227  void *conn_request_arg;
1229  uct_sockaddr_conn_request_callback_t conn_request_cb;
1232  uint32_t cb_flags;
1233  } sockaddr;
1234  } mode;
1235 
1238  ucs_stats_node_t *stats_root;
1240  size_t rx_headroom;
1241 
1243  void *err_handler_arg;
1245  uct_error_handler_t err_handler;
1248  uint32_t err_handler_flags;
1249 
1251  void *eager_arg;
1253  uct_tag_unexp_eager_cb_t eager_cb;
1254  void *rndv_arg;
1256  uct_tag_unexp_rndv_cb_t rndv_cb;
1257 
1258  void *async_event_arg;
1263  uct_async_event_cb_t async_event_cb;
1265  /* Time period between keepalive rounds */
1266  ucs_time_t keepalive_interval;
1267 
1275  size_t am_alignment;
1276 
1293  size_t am_align_offset;
1294 
1299  uint64_t features;
1300 };
1301 
1302 
1307 struct uct_ep_params {
1313  uint64_t field_mask;
1319  uct_iface_h iface;
1324  void *user_data;
1325 
1331  const uct_device_addr_t *dev_addr;
1332 
1338  const uct_iface_addr_t *iface_addr;
1339 
1347  const ucs_sock_addr_t *sockaddr;
1348 
1357  uint32_t sockaddr_cb_flags;
1358 
1369  uct_cm_ep_priv_data_pack_callback_t sockaddr_pack_cb;
1370 
1375  uct_cm_h cm;
1376 
1384  uct_conn_request_h conn_request;
1385 
1391 
1397 
1401  uct_ep_disconnect_cb_t disconnect_cb;
1402 
1407  unsigned path_index;
1408 
1416  uct_cm_ep_resolve_callback_t cm_resolve_cb;
1424  const void *private_data;
1425 
1430  size_t private_data_length;
1431 
1438  const ucs_sock_addr_t *local_sockaddr;
1439 
1444  size_t dev_addr_length;
1450  size_t iface_addr_length;
1451 };
1452 
1453 
1458 struct uct_ep_connect_params {
1464  uint64_t field_mask;
1469  const void *private_data;
1470 
1475  size_t private_data_length;
1476 };
1477 
1482 struct uct_cm_attr {
1488  uint64_t field_mask;
1489 
1494  size_t max_conn_priv;
1495 };
1497 
1502 struct uct_listener_attr {
1508  uint64_t field_mask;
1513  struct sockaddr_storage sockaddr;
1514 };
1516 
1522 struct uct_listener_params {
1528  uint64_t field_mask;
1535  int backlog;
1536 
1541 
1545  void *user_data;
1546 };
1547 
1548 
1558 struct uct_md_attr {
1559  struct {
1560  uint64_t max_alloc;
1561  size_t max_reg;
1562  uint64_t flags;
1563  uint64_t reg_mem_types;
1564  uint64_t detect_mem_types;
1565  uint64_t alloc_mem_types;
1566  uint64_t access_mem_types;
1567  } cap;
1568 
1569  ucs_linear_func_t reg_cost;
1573  char component_name[UCT_COMPONENT_NAME_MAX];
1574  size_t rkey_packed_size;
1575  ucs_cpu_set_t local_cpus;
1576 };
1577 
1578 
1586 typedef enum uct_md_mem_attr_field {
1588  UCT_MD_MEM_ATTR_FIELD_MEM_TYPE = UCS_BIT(0),
1589 
1598 
1601 
1608 
1616 
1625 typedef struct uct_md_mem_attr {
1630  uint64_t field_mask;
1631 
1637  ucs_memory_type_t mem_type;
1638 
1644  ucs_sys_device_t sys_dev;
1645 
1651  void *base_address;
1652 
1658  size_t alloc_length;
1659 
1668  int dmabuf_fd;
1669 
1674  size_t dmabuf_offset;
1676 
1677 
1698 ucs_status_t uct_md_mem_query(uct_md_h md, const void *address, size_t length,
1699  uct_md_mem_attr_t *mem_attr);
1700 
1701 
1710 typedef struct uct_allocated_memory {
1711  void *address;
1712  size_t length;
1713  uct_alloc_method_t method;
1714  ucs_memory_type_t mem_type;
1715  uct_md_h md;
1716  uct_mem_h memh;
1717  ucs_sys_device_t sys_device;
1719 
1720 
1728 typedef struct uct_rkey_bundle {
1729  uct_rkey_t rkey;
1730  void *handle;
1731  void *type;
1753 struct uct_completion {
1755  int count;
1756  ucs_status_t status;
1759 };
1760 
1761 
1769 struct uct_pending_req {
1770  uct_pending_callback_t func;
1771  char priv[UCT_PENDING_REQ_PRIV_LEN];
1772 };
1773 
1782 struct uct_tag_context {
1789  void (*tag_consumed_cb)(uct_tag_context_t *self);
1810  void (*completed_cb)(uct_tag_context_t *self, uct_tag_t stag, uint64_t imm,
1811  size_t length, void *inline_data, ucs_status_t status);
1812 
1825  void (*rndv_cb)(uct_tag_context_t *self, uct_tag_t stag, const void *header,
1826  unsigned header_length, ucs_status_t status, unsigned flags);
1827 
1829  char priv[UCT_TAG_PRIV_LEN];
1830 };
1832 
1837 enum {
1838  /* If set, header points to inline data, otherwise it is user buffer. */
1839  UCT_TAG_RECV_CB_INLINE_DATA = UCS_BIT(0)
1840 };
1841 
1842 
1843 extern const char *uct_alloc_method_names[];
1844 extern const char *uct_device_type_names[];
1845 
1861  unsigned *num_components_p);
1862 
1873 
1874 
1888  uct_component_attr_t *component_attr);
1889 
1890 
1910 ucs_status_t uct_md_open(uct_component_h component, const char *md_name,
1911  const uct_md_config_t *config, uct_md_h *md_p);
1912 
1919 void uct_md_close(uct_md_h md);
1920 
1921 
1937  uct_tl_resource_desc_t **resources_p,
1938  unsigned *num_resources_p);
1939 
1940 
1951 
1952 
1967 ucs_status_t uct_worker_create(ucs_async_context_t *async,
1968  ucs_thread_mode_t thread_mode,
1969  uct_worker_h *worker_p);
1970 
1971 
1978 void uct_worker_destroy(uct_worker_h worker);
1979 
1980 
2004 void uct_worker_progress_register_safe(uct_worker_h worker, ucs_callback_t func,
2005  void *arg, unsigned flags,
2006  uct_worker_cb_id_t *id_p);
2007 
2008 
2030  uct_worker_cb_id_t *id_p);
2031 
2032 
2060 ucs_status_t uct_md_iface_config_read(uct_md_h md, const char *tl_name,
2061  const char *env_prefix, const char *filename,
2062  uct_iface_config_t **config_p);
2063 
2064 
2072 void uct_config_release(void *config);
2073 
2074 
2090 ucs_status_t uct_config_get(void *config, const char *name, char *value,
2091  size_t max);
2092 
2093 
2106 ucs_status_t uct_config_modify(void *config, const char *name, const char *value);
2107 
2108 
2125  const uct_iface_params_t *params,
2126  const uct_iface_config_t *config,
2127  uct_iface_h *iface_p);
2128 
2129 
2136 void uct_iface_close(uct_iface_h iface);
2137 
2138 
2147 
2148 
2161 
2162 
2174 
2175 
2194 int uct_iface_is_reachable(const uct_iface_h iface, const uct_device_addr_t *dev_addr,
2195  const uct_iface_addr_t *iface_addr);
2196 
2197 
2215 ucs_status_t uct_ep_check(const uct_ep_h ep, unsigned flags,
2216  uct_completion_t *comp);
2217 
2218 
2232 
2233 
2253 ucs_status_t uct_iface_event_arm(uct_iface_h iface, unsigned events);
2254 
2255 
2271 ucs_status_t uct_iface_mem_alloc(uct_iface_h iface, size_t length, unsigned flags,
2272  const char *name, uct_allocated_memory_t *mem);
2273 
2274 
2282 
2283 
2302  uct_am_callback_t cb, void *arg, uint32_t flags);
2303 
2304 
2319  void *arg);
2320 
2321 
2334  uct_conn_request_h conn_request);
2335 
2336 
2350  uct_conn_request_h conn_request);
2351 
2352 
2387 ucs_status_t uct_ep_create(const uct_ep_params_t *params, uct_ep_h *ep_p);
2388 
2389 
2405 
2406 
2439 ucs_status_t uct_ep_disconnect(uct_ep_h ep, unsigned flags);
2440 
2441 
2448 void uct_ep_destroy(uct_ep_h ep);
2449 
2450 
2460 
2461 
2473  const uct_ep_addr_t *ep_addr);
2474 
2475 
2484 
2485 
2493 typedef enum {
2495  UCT_MEM_ALLOC_PARAM_FIELD_FLAGS = UCS_BIT(0),
2496 
2498  UCT_MEM_ALLOC_PARAM_FIELD_ADDRESS = UCS_BIT(1),
2499 
2502 
2504  UCT_MEM_ALLOC_PARAM_FIELD_MDS = UCS_BIT(3),
2505 
2507  UCT_MEM_ALLOC_PARAM_FIELD_NAME = UCS_BIT(4),
2508 
2512 
2513 
2518 typedef struct {
2524  uint64_t field_mask;
2532  unsigned flags;
2533 
2544  void *address;
2549  ucs_memory_type_t mem_type;
2550 
2551  struct {
2556  const uct_md_h *mds;
2557 
2563  unsigned count;
2564  } mds;
2572  const char *name;
2573 
2578  ucs_sys_device_t sys_device;
2580 
2581 
2600  size_t length, uct_mem_advice_t advice);
2601 
2602 
2616 ucs_status_t uct_md_mem_reg(uct_md_h md, void *address, size_t length,
2617  unsigned flags, uct_mem_h *memh_p);
2618 
2619 
2628 
2629 
2642 ucs_status_t uct_md_detect_memory_type(uct_md_h md, const void *addr,
2643  size_t length,
2644  ucs_memory_type_t *mem_type_p);
2645 
2646 
2671 ucs_status_t uct_mem_alloc(size_t length, const uct_alloc_method_t *methods,
2672  unsigned num_methods,
2673  const uct_mem_alloc_params_t *params,
2674  uct_allocated_memory_t *mem);
2675 
2676 
2687 
2703  const char *env_prefix, const char *filename,
2704  uct_md_config_t **config_p);
2705 
2706 
2729 
2730 
2742 ucs_status_t uct_md_mkey_pack(uct_md_h md, uct_mem_h memh, void *rkey_buffer);
2743 
2744 
2764 ucs_status_t uct_rkey_unpack(uct_component_h component, const void *rkey_buffer,
2765  uct_rkey_bundle_t *rkey_ob);
2766 
2767 
2794  uint64_t remote_addr, void **addr_p);
2795 
2796 
2806  const uct_rkey_bundle_t *rkey_ob);
2807 
2808 
2823 UCT_INLINE_API unsigned uct_worker_progress(uct_worker_h worker)
2824 {
2825  return ucs_callbackq_dispatch(&worker->progress_q);
2826 }
2827 
2828 
2857 UCT_INLINE_API ucs_status_t uct_iface_flush(uct_iface_h iface, unsigned flags,
2858  uct_completion_t *comp)
2859 {
2860  return iface->ops.iface_flush(iface, flags, comp);
2861 }
2862 
2875 UCT_INLINE_API ucs_status_t uct_iface_fence(uct_iface_h iface, unsigned flags)
2876 {
2877  return iface->ops.iface_fence(iface, flags);
2879 
2889 UCT_INLINE_API void uct_iface_release_desc(void *desc)
2890 {
2891  uct_recv_desc_t *release_desc = uct_recv_desc(desc);
2892  release_desc->cb(release_desc, desc);
2893 }
2894 
2895 
2900 UCT_INLINE_API ucs_status_t uct_ep_put_short(uct_ep_h ep, const void *buffer, unsigned length,
2901  uint64_t remote_addr, uct_rkey_t rkey)
2902 {
2903  return ep->iface->ops.ep_put_short(ep, buffer, length, remote_addr, rkey);
2904 }
2905 
2906 
2911 UCT_INLINE_API ssize_t uct_ep_put_bcopy(uct_ep_h ep, uct_pack_callback_t pack_cb,
2912  void *arg, uint64_t remote_addr,
2913  uct_rkey_t rkey)
2914 {
2915  return ep->iface->ops.ep_put_bcopy(ep, pack_cb, arg, remote_addr, rkey);
2916 }
2917 
2918 
2948 UCT_INLINE_API ucs_status_t uct_ep_put_zcopy(uct_ep_h ep,
2949  const uct_iov_t *iov, size_t iovcnt,
2950  uint64_t remote_addr, uct_rkey_t rkey,
2951  uct_completion_t *comp)
2952 {
2953  return ep->iface->ops.ep_put_zcopy(ep, iov, iovcnt, remote_addr, rkey, comp);
2954 }
2955 
2956 
2961 UCT_INLINE_API ucs_status_t uct_ep_get_short(uct_ep_h ep, void *buffer, unsigned length,
2962  uint64_t remote_addr, uct_rkey_t rkey)
2963 {
2964  return ep->iface->ops.ep_get_short(ep, buffer, length, remote_addr, rkey);
2965 }
2966 
2967 
2972 UCT_INLINE_API ucs_status_t uct_ep_get_bcopy(uct_ep_h ep, uct_unpack_callback_t unpack_cb,
2973  void *arg, size_t length,
2974  uint64_t remote_addr, uct_rkey_t rkey,
2975  uct_completion_t *comp)
2976 {
2977  return ep->iface->ops.ep_get_bcopy(ep, unpack_cb, arg, length, remote_addr,
2978  rkey, comp);
2979 }
2980 
2981 
3011 UCT_INLINE_API ucs_status_t uct_ep_get_zcopy(uct_ep_h ep,
3012  const uct_iov_t *iov, size_t iovcnt,
3013  uint64_t remote_addr, uct_rkey_t rkey,
3014  uct_completion_t *comp)
3015 {
3016  return ep->iface->ops.ep_get_zcopy(ep, iov, iovcnt, remote_addr, rkey, comp);
3017 }
3018 
3019 
3024 UCT_INLINE_API ucs_status_t uct_ep_am_short(uct_ep_h ep, uint8_t id, uint64_t header,
3025  const void *payload, unsigned length)
3026 {
3027  return ep->iface->ops.ep_am_short(ep, id, header, payload, length);
3028 }
3029 
3030 
3061 UCT_INLINE_API ucs_status_t uct_ep_am_short_iov(uct_ep_h ep, uint8_t id,
3062  const uct_iov_t *iov, size_t iovcnt)
3063 {
3064  return ep->iface->ops.ep_am_short_iov(ep, id, iov, iovcnt);
3065 }
3066 
3067 
3072 UCT_INLINE_API ssize_t uct_ep_am_bcopy(uct_ep_h ep, uint8_t id,
3073  uct_pack_callback_t pack_cb, void *arg,
3074  unsigned flags)
3075 {
3076  return ep->iface->ops.ep_am_bcopy(ep, id, pack_cb, arg, flags);
3077 }
3078 
3079 
3117 UCT_INLINE_API ucs_status_t uct_ep_am_zcopy(uct_ep_h ep, uint8_t id,
3118  const void *header,
3119  unsigned header_length,
3120  const uct_iov_t *iov, size_t iovcnt,
3121  unsigned flags,
3122  uct_completion_t *comp)
3123 {
3124  return ep->iface->ops.ep_am_zcopy(ep, id, header, header_length, iov, iovcnt,
3125  flags, comp);
3126 }
3127 
3132 UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap,
3133  uint64_t remote_addr, uct_rkey_t rkey,
3134  uint64_t *result, uct_completion_t *comp)
3135 {
3136  return ep->iface->ops.ep_atomic_cswap64(ep, compare, swap, remote_addr, rkey, result, comp);
3137 }
3139 
3144 UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap,
3145  uint64_t remote_addr, uct_rkey_t rkey,
3146  uint32_t *result, uct_completion_t *comp)
3147 {
3148  return ep->iface->ops.ep_atomic_cswap32(ep, compare, swap, remote_addr, rkey, result, comp);
3149 }
3150 
3151 
3156 UCT_INLINE_API ucs_status_t uct_ep_atomic32_post(uct_ep_h ep, uct_atomic_op_t opcode,
3157  uint32_t value, uint64_t remote_addr,
3158  uct_rkey_t rkey)
3159 {
3160  return ep->iface->ops.ep_atomic32_post(ep, opcode, value, remote_addr, rkey);
3161 }
3162 
3163 
3168 UCT_INLINE_API ucs_status_t uct_ep_atomic64_post(uct_ep_h ep, uct_atomic_op_t opcode,
3169  uint64_t value, uint64_t remote_addr,
3170  uct_rkey_t rkey)
3171 {
3172  return ep->iface->ops.ep_atomic64_post(ep, opcode, value, remote_addr, rkey);
3173 }
3174 
3175 
3180 UCT_INLINE_API ucs_status_t uct_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode,
3181  uint32_t value, uint32_t *result,
3182  uint64_t remote_addr, uct_rkey_t rkey,
3183  uct_completion_t *comp)
3184 {
3185  return ep->iface->ops.ep_atomic32_fetch(ep, opcode, value, result,
3186  remote_addr, rkey, comp);
3187 }
3188 
3194 UCT_INLINE_API ucs_status_t uct_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode,
3195  uint64_t value, uint64_t *result,
3196  uint64_t remote_addr, uct_rkey_t rkey,
3197  uct_completion_t *comp)
3198 {
3199  return ep->iface->ops.ep_atomic64_fetch(ep, opcode, value, result,
3200  remote_addr, rkey, comp);
3202 
3203 
3224 UCT_INLINE_API ucs_status_t uct_ep_pending_add(uct_ep_h ep,
3225  uct_pending_req_t *req,
3226  unsigned flags)
3227 {
3228  return ep->iface->ops.ep_pending_add(ep, req, flags);
3229 }
3230 
3231 
3243 UCT_INLINE_API void uct_ep_pending_purge(uct_ep_h ep,
3245  void *arg)
3246 {
3247  ep->iface->ops.ep_pending_purge(ep, cb, arg);
3248 }
3249 
3250 
3279 UCT_INLINE_API ucs_status_t uct_ep_flush(uct_ep_h ep, unsigned flags,
3280  uct_completion_t *comp)
3281 {
3282  return ep->iface->ops.ep_flush(ep, flags, comp);
3283 }
3284 
3285 
3298 UCT_INLINE_API ucs_status_t uct_ep_fence(uct_ep_h ep, unsigned flags)
3299 {
3300  return ep->iface->ops.ep_fence(ep, flags);
3301 }
3302 
3303 
3326 UCT_INLINE_API ucs_status_t uct_ep_tag_eager_short(uct_ep_h ep, uct_tag_t tag,
3327  const void *data, size_t length)
3328 {
3329  return ep->iface->ops.ep_tag_eager_short(ep, tag, data, length);
3330 }
3331 
3332 
3356 UCT_INLINE_API ssize_t uct_ep_tag_eager_bcopy(uct_ep_h ep, uct_tag_t tag,
3357  uint64_t imm,
3358  uct_pack_callback_t pack_cb,
3359  void *arg, unsigned flags)
3360 {
3361  return ep->iface->ops.ep_tag_eager_bcopy(ep, tag, imm, pack_cb, arg, flags);
3362 }
3363 
3364 
3402 UCT_INLINE_API ucs_status_t uct_ep_tag_eager_zcopy(uct_ep_h ep, uct_tag_t tag,
3403  uint64_t imm,
3404  const uct_iov_t *iov,
3405  size_t iovcnt,
3406  unsigned flags,
3407  uct_completion_t *comp)
3408 {
3409  return ep->iface->ops.ep_tag_eager_zcopy(ep, tag, imm, iov, iovcnt, flags,
3410  comp);
3411 }
3412 
3413 
3451  const void *header,
3452  unsigned header_length,
3453  const uct_iov_t *iov,
3454  size_t iovcnt,
3455  unsigned flags,
3456  uct_completion_t *comp)
3457 {
3458  return ep->iface->ops.ep_tag_rndv_zcopy(ep, tag, header, header_length,
3459  iov, iovcnt, flags, comp);
3460 }
3461 
3462 
3481 UCT_INLINE_API ucs_status_t uct_ep_tag_rndv_cancel(uct_ep_h ep, void *op)
3482 {
3483  return ep->iface->ops.ep_tag_rndv_cancel(ep, op);
3484 }
3485 
3486 
3507  const void* header,
3508  unsigned header_length,
3509  unsigned flags)
3510 {
3511  return ep->iface->ops.ep_tag_rndv_request(ep, tag, header, header_length,
3512  flags);
3513 }
3514 
3515 
3547  uct_tag_t tag,
3548  uct_tag_t tag_mask,
3549  const uct_iov_t *iov,
3550  size_t iovcnt,
3551  uct_tag_context_t *ctx)
3552 {
3553  return iface->ops.iface_tag_recv_zcopy(iface, tag, tag_mask, iov, iovcnt, ctx);
3554 }
3555 
3556 
3580  uct_tag_context_t *ctx,
3581  int force)
3582 {
3583  return iface->ops.iface_tag_recv_cancel(iface, ctx, force);
3584 }
3585 
3586 
3605 UCT_INLINE_API void uct_iface_progress_enable(uct_iface_h iface, unsigned flags)
3606 {
3607  iface->ops.iface_progress_enable(iface, flags);
3608 }
3609 
3610 
3630 UCT_INLINE_API void uct_iface_progress_disable(uct_iface_h iface, unsigned flags)
3631 {
3632  iface->ops.iface_progress_disable(iface, flags);
3633 }
3634 
3635 
3640 UCT_INLINE_API unsigned uct_iface_progress(uct_iface_h iface)
3641 {
3642  return iface->ops.iface_progress(iface);
3643 }
3644 
3645 
3669  const uct_cm_config_t *config, uct_cm_h *cm_p);
3670 
3671 
3678 void uct_cm_close(uct_cm_h cm);
3679 
3680 
3692 
3693 
3711  const char *env_prefix, const char *filename,
3712  uct_cm_config_t **config_p);
3713 
3714 
3728 
3729 
3748 ucs_status_t uct_listener_create(uct_cm_h cm, const struct sockaddr *saddr,
3749  socklen_t socklen,
3750  const uct_listener_params_t *params,
3751  uct_listener_h *listener_p);
3752 
3753 
3760 void uct_listener_destroy(uct_listener_h listener);
3761 
3762 
3779  uct_conn_request_h conn_request);
3780 
3781 
3795  uct_listener_attr_t *listener_attr);
3796 
3797 
3805 static UCS_F_ALWAYS_INLINE
3807 {
3808  if (ucs_unlikely(status != UCS_OK) && (comp->status == UCS_OK)) {
3809  /* store first failure status */
3810  comp->status = status;
3811  }
3812 }
3813 
3814 
3820 END_C_DECLS
3821 
3822 #endif
ucs_status_t uct_ep_disconnect(uct_ep_h ep, unsigned flags)
Initiate a disconnection of an endpoint connected to a sockaddr by a connection manager uct_cm_h...
ucs_status_t uct_md_config_read(uct_component_h component, const char *env_prefix, const char *filename, uct_md_config_t **config_p)
Read the configuration for a memory domain.
ucs_status_t uct_config_get(void *config, const char *name, char *value, size_t max)
Get value by name from interface configuration (uct_iface_config_t), memory domain configuration (uct...
uct_cm_attr_field
UCT connection manager attributes field mask.
Definition: uct.h:908
Definition: uct.h:872
ucs_status_t uct_ep_tag_eager_zcopy(uct_ep_h ep, uct_tag_t tag, uint64_t imm, const uct_iov_t *iov, size_t iovcnt, unsigned flags, uct_completion_t *comp)
Zcopy eager tagged-send operation.
Definition: uct.h:3423
Definition: uct.h:853
uct_progress_types
UCT progress types.
Definition: uct.h:570
Definition: uct.h:522
Definition: uct.h:893
ucs_status_t uct_iface_get_device_address(uct_iface_h iface, uct_device_addr_t *addr)
Get address of the device the interface is using.
Definition: uct.h:843
static UCS_F_ALWAYS_INLINE void uct_completion_update_status(uct_completion_t *comp, ucs_status_t status)
Update status of UCT completion handle.
Definition: uct.h:3827
Definition: uct.h:964
struct uct_tl_resource_desc uct_tl_resource_desc_t
Communication resource descriptor.
void(* uct_async_event_cb_t)(void *arg, unsigned flags)
Callback to process asynchronous events.
Definition: uct_def.h:901
void uct_config_release(void *config)
Release configuration memory returned from uct_md_iface_config_read(), uct_md_config_read(), or from uct_cm_config_read().
ucs_status_t uct_md_query_tl_resources(uct_md_h md, uct_tl_resource_desc_t **resources_p, unsigned *num_resources_p)
Query for transport resources.
uct_device_type_t
List of UCX device types.
Definition: uct.h:308
Definition: uct.h:768
ucs_status_t uct_md_mem_advise(uct_md_h md, uct_mem_h memh, void *addr, size_t length, uct_mem_advice_t advice)
Give advice about the use of memory.
ucs_status_t uct_iface_event_fd_get(uct_iface_h iface, int *fd_p)
Obtain a notification file descriptor for polling.
Definition: uct.h:815
ucs_status_ptr_t uct_ep_tag_rndv_zcopy(uct_ep_h ep, uct_tag_t tag, const void *header, unsigned header_length, const uct_iov_t *iov, size_t iovcnt, unsigned flags, uct_completion_t *comp)
Rendezvous tagged-send operation.
Definition: uct.h:3471
Definition: uct.h:862
ucs_status_t uct_ep_atomic32_post(uct_ep_h ep, uct_atomic_op_t opcode, uint32_t value, uint64_t remote_addr, uct_rkey_t rkey)
Definition: uct.h:3177
ucs_status_t uct_iface_event_arm(uct_iface_h iface, unsigned events)
Turn on event notification for the next event.
void * uct_mem_h
Definition: uct_def.h:84
void(* uct_sockaddr_conn_request_callback_t)(uct_iface_h iface, void *arg, uct_conn_request_h conn_request, const void *conn_priv_data, size_t length)
Callback to process an incoming connection request on the server side.
Definition: uct_def.h:646
Structure for scatter-gather I/O.
Definition: uct_def.h:151
uct_component_attr_field
UCT component attributes field mask.
Definition: uct.h:230
ucs_status_t uct_iface_accept(uct_iface_h iface, uct_conn_request_h conn_request)
Accept connection request.
Definition: uct.h:997
Definition: uct.h:709
uct_msg_flags
Flags for active message send operation.
Definition: uct.h:583
void uct_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, void *arg)
Remove all pending requests from an endpoint.
Definition: uct.h:3264
Definition: uct.h:760
ucs_status_t uct_rkey_unpack(uct_component_h component, const void *rkey_buffer, uct_rkey_bundle_t *rkey_ob)
Unpack a remote key.
Definition: uct.h:502
Definition: uct.h:660
ssize_t uct_ep_tag_eager_bcopy(uct_ep_h ep, uct_tag_t tag, uint64_t imm, uct_pack_callback_t pack_cb, void *arg, unsigned flags)
Bcopy eager tagged-send operation.
Definition: uct.h:3377
ucs_status_t uct_ep_flush(uct_ep_h ep, unsigned flags, uct_completion_t *comp)
Flush outstanding communication operations on an endpoint.
Definition: uct.h:3300
void(* uct_ep_disconnect_cb_t)(uct_ep_h ep, void *arg)
Callback to handle the disconnection of the remote peer.
Definition: uct_def.h:747
ucs_status_t uct_listener_query(uct_listener_h listener, uct_listener_attr_t *listener_attr)
Get attributes specific to a particular listener.
Definition: uct.h:2519
Definition: uct.h:311
ucs_status_t uct_iface_tag_recv_cancel(uct_iface_h iface, uct_tag_context_t *ctx, int force)
Cancel a posted tag.
Definition: uct.h:3600
Definition: uct.h:991
Definition: uct.h:294
Definition: uct.h:656
ucs_status_t uct_mem_alloc(size_t length, const uct_alloc_method_t *methods, unsigned num_methods, const uct_mem_alloc_params_t *params, uct_allocated_memory_t *mem)
Allocate memory for zero-copy communications and remote access.
uct_mem_advice_t
list of UCT memory use advice
Definition: uct.h:892
void uct_listener_destroy(uct_listener_h listener)
Destroy a transport listener.
Parameters used for interface creation.
Definition: uct.h:1217
struct uct_md_config uct_md_config_t
Definition: uct_def.h:81
ucs_status_t uct_ep_put_zcopy(uct_ep_h ep, const uct_iov_t *iov, size_t iovcnt, uint64_t remote_addr, uct_rkey_t rkey, uct_completion_t *comp)
Write data to remote memory while avoiding local memory copy.
Definition: uct.h:2969
Memory domain resource descriptor.
Definition: uct.h:218
Definition: uct.h:867
ucs_status_t uct_md_detect_memory_type(uct_md_h md, const void *addr, size_t length, ucs_memory_type_t *mem_type_p)
Detect memory type.
int uct_iface_is_reachable(const uct_iface_h iface, const uct_device_addr_t *dev_addr, const uct_iface_addr_t *iface_addr)
Check if remote iface address is reachable.
void(* uct_pending_purge_callback_t)(uct_pending_req_t *self, void *arg)
Callback to purge pending requests.
Definition: uct_def.h:590
uct_mem_alloc_params_field_t
UCT allocation parameters specification field mask.
Definition: uct.h:2514
ucs_status_t uct_iface_get_address(uct_iface_h iface, uct_iface_addr_t *addr)
Get interface address.
uct_cm_t * uct_cm_h
Definition: uct_def.h:105
uct_listener_params_field
UCT listener created by uct_listener_create parameters field mask.
Definition: uct.h:934
UCT component attributes.
Definition: uct.h:245
ucs_status_t(* uct_cm_ep_resolve_callback_t)(void *user_data, const uct_cm_ep_resolve_args_t *resolve_args)
Callback to notify that the client side endpoint is bound to a local device.
Definition: uct_def.h:799
Definition: uct.h:1860
ucs_status_t uct_mem_free(const uct_allocated_memory_t *mem)
Release allocated memory.
Definition: uct.h:310
uct_cb_flags
Callback flags.
Definition: uct.h:606
Definition: uct.h:2516
void(* uct_cm_listener_conn_request_callback_t)(uct_listener_h listener, void *arg, const uct_cm_listener_conn_request_args_t *conn_req_args)
Callback to process an incoming connection request on the server side listener in a connection manage...
Definition: uct_def.h:671
uct_listener_attr_field
UCT listener attributes field mask.
Definition: uct.h:921
Definition: uct.h:750
Definition: uct.h:717
void(* uct_cm_ep_server_conn_notify_callback_t)(uct_ep_h ep, void *arg, const uct_cm_ep_server_conn_notify_args_t *connect_args)
Callback to process an incoming connection establishment acknowledgment on the server side listener...
Definition: uct_def.h:701
void uct_iface_release_desc(void *desc)
Release AM descriptor.
Definition: uct.h:2910
ucs_status_t uct_ep_check(const uct_ep_h ep, unsigned flags, uct_completion_t *comp)
check if the destination endpoint is alive in respect to UCT library
UCT listener attributes, capabilities and limitations.
Definition: uct.h:1523
struct uct_worker * uct_worker_h
Definition: uct_def.h:95
ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap, uint64_t remote_addr, uct_rkey_t rkey, uint64_t *result, uct_completion_t *comp)
Definition: uct.h:3153
ucs_status_t uct_ep_atomic64_post(uct_ep_h ep, uct_atomic_op_t opcode, uint64_t value, uint64_t remote_addr, uct_rkey_t rkey)
Definition: uct.h:3189
Interface attributes: capabilities and limitations.
Definition: uct.h:1081
Definition: uct.h:827
int uct_worker_cb_id_t
Definition: uct_def.h:111
ucs_status_t uct_ep_put_short(uct_ep_h ep, const void *buffer, unsigned length, uint64_t remote_addr, uct_rkey_t rkey)
Definition: uct.h:2921
ucs_status_t uct_ep_am_short_iov(uct_ep_h ep, uint8_t id, const uct_iov_t *iov, size_t iovcnt)
Short io-vector send operation.
Definition: uct.h:3082
ucs_status_t(* uct_error_handler_t)(void *arg, uct_ep_h ep, ucs_status_t status)
Callback to process peer failure.
Definition: uct_def.h:578
ucs_status_t uct_ep_get_short(uct_ep_h ep, void *buffer, unsigned length, uint64_t remote_addr, uct_rkey_t rkey)
Definition: uct.h:2982
ucs_status_t uct_worker_create(ucs_async_context_t *async, ucs_thread_mode_t thread_mode, uct_worker_h *worker_p)
Create a worker object.
ucs_status_t uct_ep_get_address(uct_ep_h ep, uct_ep_addr_t *addr)
Get endpoint address.
Definition: uct.h:573
Definition: uct.h:976
ucs_status_t uct_iface_flush(uct_iface_h iface, unsigned flags, uct_completion_t *comp)
Flush outstanding communication operations on an interface.
Definition: uct.h:2878
Definition: uct.h:535
ucs_status_t uct_ep_get_zcopy(uct_ep_h ep, const uct_iov_t *iov, size_t iovcnt, uint64_t remote_addr, uct_rkey_t rkey, uct_completion_t *comp)
Read data from remote memory while avoiding local memory copy.
Definition: uct.h:3032
Definition: uct.h:1609
void uct_iface_progress_disable(uct_iface_h iface, unsigned flags)
Disable synchronous progress for the interface.
Definition: uct.h:3651
Definition: uct.h:755
struct uct_iface_addr uct_iface_addr_t
Definition: uct_def.h:99
uint64_t field_mask
Definition: uct.h:252
ucs_thread_mode_t
Thread sharing mode.
Definition: thread_mode.h:19
ucs_status_t uct_ep_connect(uct_ep_h ep, const uct_ep_connect_params_t *params)
Connect a client side endpoint after it is bound to a local network device, i.e. uct_ep_params_t::cm_...
void(* uct_completion_callback_t)(uct_completion_t *self)
Callback to process send completion.
Definition: uct_def.h:540
Definition: uct.h:524
void uct_md_close(uct_md_h md)
Close a memory domain.
ucs_status_t uct_query_components(uct_component_h **components_p, unsigned *num_components_p)
Query for list of components.
ucs_status_t uct_md_open(uct_component_h component, const char *md_name, const uct_md_config_t *config, uct_md_h *md_p)
Open a memory domain.
struct uct_cm_config uct_cm_config_t
Definition: uct_def.h:82
struct uct_ep_addr uct_ep_addr_t
Definition: uct_def.h:100
Definition: uct.h:958
Definition: uct.h:312
Definition: uct.h:309
struct uct_md * uct_md_h
Memory domain handler.
Definition: uct_def.h:86
uct_ep_params_field
UCT endpoint created by uct_ep_create parameters field mask.
Definition: uct.h:953
Definition: uct.h:792
ucs_status_t uct_ep_tag_eager_short(uct_ep_h ep, uct_tag_t tag, const void *data, size_t length)
Short eager tagged-send operation.
Definition: uct.h:3347
ucs_status_t uct_ep_am_short(uct_ep_h ep, uint8_t id, uint64_t header, const void *payload, unsigned length)
Definition: uct.h:3045
Remote key with its type.
Definition: uct.h:1749
ucs_status_t(* uct_tag_unexp_rndv_cb_t)(void *arg, unsigned flags, uint64_t stag, const void *header, unsigned header_length, uint64_t remote_addr, size_t length, const void *rkey_buf)
Callback to process unexpected rendezvous tagged message.
Definition: uct_def.h:886
ucs_status_t uct_ep_tag_rndv_cancel(uct_ep_h ep, void *op)
Cancel outstanding rendezvous operation.
Definition: uct.h:3502
ucs_status_t uct_ep_create(const uct_ep_params_t *params, uct_ep_h *ep_p)
Create new endpoint.
uct_device_type_t dev_type
Definition: uct.h:331
Memory domain attributes.
Definition: uct.h:1646
size_t(* uct_pack_callback_t)(void *dest, void *arg)
Callback for producing data.
Definition: uct_def.h:602
struct uct_rkey_bundle uct_rkey_bundle_t
Remote key with its type.
Definition: uct.h:300
Definition: uct.h:664
char md_name[UCT_MD_NAME_MAX]
Definition: uct.h:219
Definition: uct.h:781
ucs_status_t uct_ep_am_zcopy(uct_ep_h ep, uint8_t id, const void *header, unsigned header_length, const uct_iov_t *iov, size_t iovcnt, unsigned flags, uct_completion_t *comp)
Send active message while avoiding local memory copy.
Definition: uct.h:3138
Definition: uct.h:821
ucs_status_t
Status codes.
Definition: status.h:45
Definition: uct.h:607
void uct_worker_progress_unregister_safe(uct_worker_h worker, uct_worker_cb_id_t *id_p)
Remove a slow path callback function from worker&#39;s progress.
Definition: uct.h:848
Definition: uct.h:539
Definition: uct.h:313
enum uct_md_mem_attr_field uct_md_mem_attr_field_t
UCT MD memory attributes field mask.
ucs_status_t uct_iface_open(uct_md_h md, uct_worker_h worker, const uct_iface_params_t *params, const uct_iface_config_t *config, uct_iface_h *iface_p)
Open a communication interface.
ucs_status_t uct_rkey_ptr(uct_component_h component, uct_rkey_bundle_t *rkey_ob, uint64_t remote_addr, void **addr_p)
Get a local pointer to remote memory.
Definition: uct.h:632
uct_md_mem_flags
Memory allocation/registration flags.
Definition: uct.h:805
Parameters for creating a listener object uct_listener_h by uct_listener_create.
Definition: uct.h:1543
Definition: uct.h:720
Definition: uct.h:501
Definition: uct.h:967
Definition: uct.h:2528
Definition: uct.h:1042
uint64_t flags
Definition: uct.h:278
Definition: uct.h:571
ucs_status_t uct_cm_client_ep_conn_notify(uct_ep_h ep)
Notify the server about client-side connection establishment.
Connection manager attributes, capabilities and limitations.
Definition: uct.h:1503
struct uct_listener * uct_listener_h
Definition: uct_def.h:107
ucs_status_t uct_md_mkey_pack(uct_md_h md, uct_mem_h memh, void *rkey_buffer)
Pack a remote key.
Definition: uct.h:653
ucs_status_t uct_md_query(uct_md_h md, uct_md_attr_t *md_attr)
Query for memory domain attributes.
Definition: uct.h:744
void(* uct_unpack_callback_t)(void *arg, const void *data, size_t length)
Callback for consuming data.
Definition: uct_def.h:615
Definition: uct.h:506
void uct_iface_progress_enable(uct_iface_h iface, unsigned flags)
Enable synchronous progress for the interface.
Definition: uct.h:3626
Definition: uct.h:234
ucs_status_t uct_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, uint64_t value, uint64_t *result, uint64_t remote_addr, uct_rkey_t rkey, uct_completion_t *comp)
Definition: uct.h:3215
uct_iface_feature
UCT interface configuration features.
Definition: uct.h:1037
Definition: uct.h:734
ssize_t uct_ep_am_bcopy(uct_ep_h ep, uint8_t id, uct_pack_callback_t pack_cb, void *arg, unsigned flags)
Definition: uct.h:3093
uct_flush_flags
Flush modifiers.
Definition: uct.h:534
struct uct_component * uct_component_h
Definition: uct_def.h:78
ucs_status_t uct_iface_reject(uct_iface_h iface, uct_conn_request_h conn_request)
Reject connection request. Will invoke an error handler uct_error_handler_t on the remote transport i...
uct_md_mem_attr_field
UCT MD memory attributes field mask.
Definition: uct.h:1607
uct_alloc_method_t
Memory allocation methods.
Definition: uct.h:498
Definition: uct.h:1057
Definition: status.h:47
uint64_t uct_tag_t
Definition: uct_def.h:110
Definition: uct.h:773
Definition: uct.h:499
struct uct_iface_config uct_iface_config_t
Definition: uct_def.h:80
ucs_status_t uct_rkey_release(uct_component_h component, const uct_rkey_bundle_t *rkey_ob)
Release a remote key.
ucs_status_t uct_config_modify(void *config, const char *name, const char *value)
Modify interface configuration (uct_iface_config_t), memory domain configuration (uct_md_config_t) or...
Parameters for connecting a UCT endpoint by uct_ep_connect.
Definition: uct.h:1479
Parameters for allocating memory using uct_mem_alloc.
Definition: uct.h:2539
void uct_iface_mem_free(const uct_allocated_memory_t *mem)
Release memory allocated with uct_iface_mem_alloc().
Definition: uct.h:787
Definition: uct.h:608
enum ucs_memory_type ucs_memory_type_t
Memory types.
ucs_status_t uct_iface_fence(uct_iface_h iface, unsigned flags)
Ensures ordering of outstanding communications on the interface. Operations issued on the interface p...
Definition: uct.h:2896
ucs_status_t status
Definition: uct.h:1777
uct_ep_connect_params_field
UCT endpoint connected by uct_ep_connect parameters field mask.
Definition: uct.h:1020
struct uct_md_resource_desc uct_md_resource_desc_t
Memory domain resource descriptor.
ssize_t(* uct_cm_ep_priv_data_pack_callback_t)(void *arg, const uct_cm_ep_priv_data_pack_args_t *pack_args, void *priv_data)
Callback to fill the user&#39;s private data in a client-server flow.
Definition: uct_def.h:775
Definition: uct.h:1045
unsigned md_resource_count
Definition: uct.h:258
Definition: uct.h:1615
unsigned long ucs_time_t
Definition: time_def.h:23
ucs_status_t uct_ep_tag_rndv_request(uct_ep_h ep, uct_tag_t tag, const void *header, unsigned header_length, unsigned flags)
Send software rendezvous request.
Definition: uct.h:3527
uct_iface_open_mode
Mode in which to open the interface.
Definition: uct.h:630
Definition: uct.h:955
ucs_status_t uct_md_mem_reg(uct_md_h md, void *address, size_t length, unsigned flags, uct_mem_h *memh_p)
Register memory for zero-copy sends and remote access.
ucs_status_t uct_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req, unsigned flags)
Add a pending request to an endpoint.
Definition: uct.h:3245
ucs_status_t uct_iface_set_am_tracer(uct_iface_h iface, uct_am_tracer_t tracer, void *arg)
Set active message tracer for the interface.
Definition: uct.h:572
void uct_ep_destroy(uct_ep_h ep)
Destroy an endpoint.
Parameters for creating a UCT endpoint by uct_ep_create.
Definition: uct.h:1328
void * ucs_status_ptr_t
Status pointer.
Definition: status.h:106
uct_sockaddr_accessibility_t
Socket address accessibility type.
Definition: uct.h:716
Definition: uct.h:979
Definition: uct.h:1628
ucs_status_t uct_cm_open(uct_component_h component, uct_worker_h worker, const uct_cm_config_t *config, uct_cm_h *cm_p)
Open a connection manager.
ucs_status_t uct_component_query(uct_component_h component, uct_component_attr_t *component_attr)
Get component attributes.
Definition: uct.h:1048
Definition: uct.h:1051
ucs_status_t uct_cm_config_read(uct_component_h component, const char *env_prefix, const char *filename, uct_cm_config_t **config_p)
Read the configuration for a connection manager.
Memory domain attributes.
Definition: uct.h:1579
Definition: uct.h:584
uct_iface_params_field
UCT interface created by uct_iface_open parameters field mask.
Definition: uct.h:651
ucs_status_t uct_listener_reject(uct_listener_h listener, uct_conn_request_h conn_request)
Reject a connection request.
struct uct_component_attr uct_component_attr_t
UCT component attributes.
ucs_status_t uct_cm_query(uct_cm_h cm, uct_cm_attr_t *cm_attr)
Get connection manager attributes.
void * uct_conn_request_h
Definition: uct_def.h:112
Definition: uct.h:1039
void uct_release_tl_resource_list(uct_tl_resource_desc_t *resources)
Release the list of resources returned from uct_md_query_tl_resources.
Definition: uct.h:833
void uct_cm_close(uct_cm_h cm)
Close a connection manager.
Definition: uct.h:2525
ucs_status_t uct_md_iface_config_read(uct_md_h md, const char *tl_name, const char *env_prefix, const char *filename, uct_iface_config_t **config_p)
Read transport-specific interface configuration.
Definition: uct.h:504
ucs_status_t uct_ep_fence(uct_ep_h ep, unsigned flags)
Ensures ordering of outstanding communications on the endpoint. Operations issued on the endpoint pri...
Definition: uct.h:3319
struct uct_allocated_memory uct_allocated_memory_t
Describes a memory allocated by UCT.
Definition: uct.h:894
void uct_worker_destroy(uct_worker_h worker)
Destroy a worker object.
void(* uct_am_tracer_t)(void *arg, uct_am_trace_type_t type, uint8_t id, const void *data, size_t length, char *buffer, size_t max)
Callback to trace active messages.
Definition: uct_def.h:528
ucs_status_t(* uct_pending_callback_t)(uct_pending_req_t *self)
Callback to process pending requests.
Definition: uct_def.h:557
Definition: uct.h:503
Definition: uct.h:1003
Communication resource descriptor.
Definition: uct.h:328
Pending request.
Definition: uct.h:1790
uct_md_resource_desc_t * md_resources
Definition: uct.h:273
ucs_status_t uct_iface_set_am_handler(uct_iface_h iface, uint8_t id, uct_am_callback_t cb, void *arg, uint32_t flags)
Set active message handler for the interface.
Definition: uct.h:1071
unsigned uct_worker_progress(uct_worker_h worker)
Explicit progress for UCT worker.
Definition: uct.h:2844
void(* uct_cm_ep_client_connect_callback_t)(uct_ep_h ep, void *arg, const uct_cm_ep_client_connect_args_t *connect_args)
Callback to process an incoming connection response on the client side from the server or handle a lo...
Definition: uct_def.h:725
void uct_worker_progress_register_safe(uct_worker_h worker, ucs_callback_t func, void *arg, unsigned flags, uct_worker_cb_id_t *id_p)
Add a slow path callback function to a worker progress.
struct uct_iface * uct_iface_h
Definition: uct_def.h:79
Definition: uct.h:910
Definition: uct.h:231
Definition: uct.h:1060
Definition: types.h:151
ucs_status_t uct_listener_create(uct_cm_h cm, const struct sockaddr *saddr, socklen_t socklen, const uct_listener_params_t *params, uct_listener_h *listener_p)
Create a new transport listener object.
struct uct_ep * uct_ep_h
Definition: uct_def.h:83
Definition: uct.h:554
Definition: uct.h:881
ucs_status_t uct_md_mem_dereg(uct_md_h md, uct_mem_h memh)
Undo the operation of uct_md_mem_reg().
void uct_release_component_list(uct_component_h *components)
Release the list of components returned from uct_query_components.
Posted tag context.
Definition: uct.h:1803
ucs_status_t uct_iface_query(uct_iface_h iface, uct_iface_attr_t *iface_attr)
Get interface attributes.
ucs_status_t(* uct_tag_unexp_eager_cb_t)(void *arg, void *data, size_t length, unsigned flags, uct_tag_t stag, uint64_t imm, void **context)
Callback to process unexpected eager tagged message.
Definition: uct_def.h:849
Completion handle.
Definition: uct.h:1774
Definition: uct.h:526
ssize_t uct_ep_put_bcopy(uct_ep_h ep, uct_pack_callback_t pack_cb, void *arg, uint64_t remote_addr, uct_rkey_t rkey)
Definition: uct.h:2932
ucs_status_t uct_ep_get_bcopy(uct_ep_h ep, uct_unpack_callback_t unpack_cb, void *arg, size_t length, uint64_t remote_addr, uct_rkey_t rkey, uct_completion_t *comp)
Definition: uct.h:2993
Definition: uct.h:838
struct uct_device_addr uct_device_addr_t
Definition: uct_def.h:98
Definition: uct.h:590
void uct_iface_close(uct_iface_h iface)
Close and destroy an interface.
unsigned uct_iface_progress(uct_iface_h iface)
Perform a progress on an interface.
Definition: uct.h:3661
ucs_sys_device_t sys_device
Definition: uct.h:333
ucs_status_t(* uct_am_callback_t)(void *arg, void *data, size_t length, unsigned flags)
Callback to process incoming active message.
Definition: uct_def.h:510
uintptr_t uct_rkey_t
Definition: uct_def.h:85
ucs_status_t uct_iface_tag_recv_zcopy(uct_iface_h iface, uct_tag_t tag, uct_tag_t tag_mask, const uct_iov_t *iov, size_t iovcnt, uct_tag_context_t *ctx)
Post a tag to a transport interface.
Definition: uct.h:3567
ucs_status_t uct_ep_connect_to_ep(uct_ep_h ep, const uct_device_addr_t *dev_addr, const uct_ep_addr_t *ep_addr)
Connect endpoint to a remote endpoint.
struct uct_md_mem_attr uct_md_mem_attr_t
Memory domain attributes.
Definition: uct.h:523
ucs_status_t uct_md_mem_query(uct_md_h md, const void *address, size_t length, uct_md_mem_attr_t *mem_attr)
Query attributes of a given pointer.
Definition: uct.h:505
Definition: uct.h:810
ucs_status_t uct_iface_mem_alloc(uct_iface_h iface, size_t length, unsigned flags, const char *name, uct_allocated_memory_t *mem)
Allocate memory which can be used for zero-copy communications.
ucs_status_t uct_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, uint32_t value, uint32_t *result, uint64_t remote_addr, uct_rkey_t rkey, uct_completion_t *comp)
Definition: uct.h:3201
int uct_md_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockaddr, uct_sockaddr_accessibility_t mode)
Check if remote sock address is accessible from the memory domain.
ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap, uint64_t remote_addr, uct_rkey_t rkey, uint32_t *result, uct_completion_t *comp)
Definition: uct.h:3165
uct_iface_event_types
Asynchronous event types.
Definition: uct.h:521
Definition: uct.h:1054
Definition: uct.h:739
Describes a memory allocated by UCT.
Definition: uct.h:1731
Definition: uct.h:798
Definition: uct.h:961