UCX  1.8
Unified Communication X

Enumerations

enum  uct_alloc_method_t {
  UCT_ALLOC_METHOD_THP, UCT_ALLOC_METHOD_MD, UCT_ALLOC_METHOD_HEAP, UCT_ALLOC_METHOD_MMAP,
  UCT_ALLOC_METHOD_HUGE, UCT_ALLOC_METHOD_LAST, UCT_ALLOC_METHOD_DEFAULT = UCT_ALLOC_METHOD_LAST
}
 Memory allocation methods. More...
 

Functions

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. More...
 
void uct_worker_destroy (uct_worker_h worker)
 Destroy a worker object. More...
 
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. More...
 
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's progress. More...
 
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_md_config_t) or connection manager configuration (uct_cm_config_t). More...
 
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 connection manager configuration (uct_cm_config_t). More...
 
unsigned uct_worker_progress (uct_worker_h worker)
 Explicit progress for UCT worker. More...
 

Detailed Description

UCT context abstracts all the resources required for network communication. It is designed to enable either share or isolate resources for multiple programming models used by an application.

This section provides a detailed description of this concept and routines associated with it.

Enumeration Type Documentation

◆ uct_alloc_method_t

Enumerator
UCT_ALLOC_METHOD_THP 

Allocate from OS using libc allocator with Transparent Huge Pages enabled

UCT_ALLOC_METHOD_MD 

Allocate using memory domain

UCT_ALLOC_METHOD_HEAP 

Allocate from heap using libc allocator

UCT_ALLOC_METHOD_MMAP 

Allocate from OS using mmap() syscall

UCT_ALLOC_METHOD_HUGE 

Allocate huge pages

UCT_ALLOC_METHOD_LAST 
UCT_ALLOC_METHOD_DEFAULT 

Use default method

Function Documentation

◆ uct_worker_create()

ucs_status_t uct_worker_create ( ucs_async_context_t *  async,
ucs_thread_mode_t  thread_mode,
uct_worker_h worker_p 
)

The worker represents a progress engine. Multiple progress engines can be created in an application, for example to be used by multiple threads. Transports can allocate separate communication resources for every worker, so that every worker can be progressed independently of others.

Parameters
[in]asyncContext for async event handlers. Must not be NULL.
[in]thread_modeThread access mode to the worker and all interfaces and endpoints associated with it.
[out]worker_pFilled with a pointer to the worker object.
Examples
uct_hello_world.c.

◆ uct_worker_destroy()

void uct_worker_destroy ( uct_worker_h  worker)
Parameters
[in]workerWorker object to destroy.
Examples
uct_hello_world.c.

◆ uct_worker_progress_register_safe()

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 
)

If *id_p is equal to UCS_CALLBACKQ_ID_NULL, this function will add a callback which will be invoked every time progress is made on the worker. *id_p will be updated with an id which refers to this callback and can be used in uct_worker_progress_unregister_safe to remove it from the progress path.

Parameters
[in]workerHandle to the worker whose progress should invoke the callback.
[in]funcPointer to the callback function.
[in]argArgument for the callback function.
[in]flagsCallback flags, see ucs_callbackq_flags.
[in,out]id_pPoints to a location to store a callback identifier. If *id_p is equal to UCS_CALLBACKQ_ID_NULL, a callback will be added and *id_p will be replaced with a callback identifier which can be subsequently used to remove the callback. Otherwise, no callback will be added and *id_p will be left unchanged.
Note
This function is thread safe.

◆ uct_worker_progress_unregister_safe()

void uct_worker_progress_unregister_safe ( uct_worker_h  worker,
uct_worker_cb_id_t id_p 
)

If *id_p is not equal to UCS_CALLBACKQ_ID_NULL, remove a callback which was previously added by uct_worker_progress_register_safe. *id_p will be reset to UCS_CALLBACKQ_ID_NULL.

Parameters
[in]workerHandle to the worker whose progress should invoke the callback.
[in,out]id_pPoints to a callback identifier which indicates the callback to remove. If *id_p is not equal to UCS_CALLBACKQ_ID_NULL, the callback will be removed and *id_p will be reset to UCS_CALLBACKQ_ID_NULL. If *id_p is equal to UCS_CALLBACKQ_ID_NULL, no operation will be performed and *id_p will be left unchanged.
Note
This function is thread safe.

◆ uct_config_get()

ucs_status_t uct_config_get ( void *  config,
const char *  name,
char *  value,
size_t  max 
)
Parameters
[in]configConfiguration to get from.
[in]nameConfiguration variable name.
[out]valuePointer to get value. Should be allocated/freed by caller.
[in]maxAvailable memory space at value pointer.
Returns
UCS_OK if found, otherwise UCS_ERR_INVALID_PARAM or UCS_ERR_NO_ELEM if error.

◆ uct_config_modify()

ucs_status_t uct_config_modify ( void *  config,
const char *  name,
const char *  value 
)
Parameters
[in]configConfiguration to modify.
[in]nameConfiguration variable name.
[in]valueValue to set.
Returns
Error code.

◆ uct_worker_progress()

unsigned uct_worker_progress ( uct_worker_h  worker)

This routine explicitly progresses any outstanding communication operations and active message requests.

Note
  • In the current implementation, users MUST call this routine to receive the active message requests.
Parameters
[in]workerHandle to worker.
Returns
Nonzero if any communication was progressed, zero otherwise.
Examples
uct_hello_world.c.