File ucp.h

struct ucp_dt_iov
#include <ucp.h>

Structure for scatter-gather I/O.

This structure is used to specify a list of buffers which can be used within a single data transfer function call. This list should remain valid until the data transfer request is completed.

Note

If length is zero, the memory pointed to by buffer will not be accessed. Otherwise, buffer must point to valid memory.

Public Members

void *buffer

Pointer to a data buffer

size_t length

Length of the buffer in bytes

struct ucp_dt_local_sgl_t
#include <ucp.h>

Local SGL descriptor for multi-element operations.

This structure describes per-element local buffers, lengths, and memory handles. Element i describes a local buffer at buffers[i] of lengths[i] bytes with memory handle memhs[i].

The descriptor ucp_dt_local_sgl_t itself is copied by the library, so the caller may release it after the call returns. However, the arrays buffers, lengths, and memhs are not copied and must remain valid until the data transfer request is completed.

Pass as the buffer parameter to ucp_put_nbx with ucp_request_param_t::datatype set to ucp_dt_make_sgl().

Note

Currently only N->N mapping is supported: both sides must use the SGL datatype with equal counts and matching lengths.

Note

All buffers in the descriptor must share the same memory type (see ucs_memory_type_t), otherwise UCS_ERR_INVALID_PARAM is returned.

Public Members

uint64_t field_mask

Valid fields, using bits from ucp_dt_local_sgl_field

void *const *buffers

Array of local buffer pointers

const size_t *lengths

Array of transfer lengths in bytes

ucp_mem_h const *memhs

Array of local memory handles

struct ucp_dt_remote_sgl_t
#include <ucp.h>

Remote SGL descriptor for multi-element operations.

This structure describes per-element remote addresses, lengths, and keys. Element i targets remote address remote_addrs[i] using key rkeys[i].

The descriptor ucp_dt_remote_sgl_t itself is copied by the library, so the caller may release it after the call returns. However, the arrays remote_addrs, lengths, and rkeys are not copied and must remain valid until the data transfer request is completed.

Pass via ucp_request_param_t::remote with ucp_request_param_t::remote_datatype set to ucp_dt_make_sgl().

Public Members

uint64_t field_mask

Valid fields, using bits from ucp_dt_remote_sgl_field

const uint64_t *remote_addrs

Array of remote memory addresses

const size_t *lengths

Array of transfer lengths in bytes

ucp_rkey_h const *rkeys

Array of remote memory keys

struct ucp_generic_dt_ops
#include <ucp.h>

UCP generic data type descriptor.

This structure provides a generic datatype descriptor that is used for definition of application defined datatypes.

Typically, the descriptor is used for an integration with datatype engines implemented within MPI and SHMEM implementations.

Note

In case of partial receive, any amount of received data is acceptable which matches buffer size.

struct ucp_datatype_attr
#include <ucp.h>

UCP datatype attributes.

This structure provides attributes of a UCP datatype.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_datatype_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

size_t packed_size

Packed size of the given datatype. (output parameter)

const void *buffer

Pointer to a data buffer of the associated data type. This field is optional. If UCP_DATATYPE_ATTR_FIELD_BUFFER is not set in field_mask, this field defaults to NULL.

size_t count

Number of elements in buffer. This value is optional. If UCP_DATATYPE_ATTR_FIELD_COUNT is not set in field_mask, the value of this field defaults to 1.

struct ucp_params
#include <ucp.h>

Tuning parameters for UCP library.

The structure defines the parameters that are used for UCP library tuning during UCP library initialization.

Note

UCP library implementation uses the features parameter to optimize the library functionality that minimize memory footprint. For example, if the application does not require send/receive semantics UCP library may avoid allocation of expensive resources associated with send/receive queues.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

uint64_t features

UCP features that are used for library initialization. It is recommended for applications only to request the features that are required for an optimal functionality This field must be specified.

size_t request_size

The size of a reserved space in a non-blocking requests. Typically applications use this space for caching own structures in order to avoid costly memory allocations, pointer dereferences, and cache misses. For example, MPI implementation can use this memory for caching MPI descriptors This field defaults to 0 if not specified.

ucp_request_init_callback_t request_init

Pointer to a routine that is used for the request initialization. This function will be called only on the very first time a request memory is initialized, and may not be called again if a request is reused. If a request should be reset before the next reuse, it can be done before calling ucp_request_free.

NULL can be used if no such is function required, which is also the default if this field is not specified by field_mask.

ucp_request_cleanup_callback_t request_cleanup

Pointer to a routine that is responsible for final cleanup of the memory associated with the request. This routine may not be called every time a request is released. For some implementations, the cleanup call may be delayed and only invoked at ucp_worker_destroy.

NULL can be used if no such function is required, which is also the default if this field is not specified by field_mask.

uint64_t tag_sender_mask

Mask which specifies particular bits of the tag which can uniquely identify the sender (UCP endpoint) in tagged operations. This field defaults to 0 if not specified.

int mt_workers_shared

This flag indicates if this context is shared by multiple workers from different threads. If so, this context needs thread safety support; otherwise, the context does not need to provide thread safety. For example, if the context is used by single worker, and that worker is shared by multiple threads, this context does not need thread safety; if the context is used by worker 1 and worker 2, and worker 1 is used by thread 1 and worker 2 is used by thread 2, then this context needs thread safety. Note that actual thread mode may be different from mode passed to ucp_init. To get actual thread mode use ucp_context_query.

size_t estimated_num_eps

An optimization hint of how many endpoints will be created on this context. For example, when used from MPI or SHMEM libraries, this number will specify the number of ranks (or processing elements) in the job. Does not affect semantics, but only transport selection criteria and the resulting performance. The value can be also set by UCX_NUM_EPS environment variable. In such case it will override the number of endpoints set by estimated_num_eps

size_t estimated_num_ppn

An optimization hint for a single node. For example, when used from MPI or OpenSHMEM libraries, this number will specify the number of Processes Per Node (PPN) in the job. Does not affect semantics, only transport selection criteria and the resulting performance. The value can be also set by the UCX_NUM_PPN environment variable, which will override the number of endpoints set by estimated_num_ppn

const char *name

Tracing and analysis tools can identify the context using this name. To retrieve the context’s name, use ucp_context_query, as the name you supply may be changed by UCX under some circumstances, e.g. a name conflict. This field is only assigned if you set UCP_PARAM_FIELD_NAME in the field mask. If not, then a default unique name will be created for you.

size_t node_local_id

An optimization hint for a single node. For example, when used from MPI or OpenSHMEM libraries, this number will specify the local identificator on a single node in the job. Does not affect semantics, only transport selection criteria and the resulting performance. The value can be also set by the UCX_LOCAL_NODE_ID environment variable, which will override the id set by node_local_id

struct ucp_lib_attr
#include <ucp.h>

Lib attributes.

The structure defines the attributes that characterize the Library.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_lib_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucs_thread_mode_t max_thread_level

Maximum level of thread support of the library, which is permanent throughout the lifetime of the library. Accordingly, the user can call ucp_worker_create with appropriate ucp_worker_params_t::thread_mode. For supported thread levels please see ucs_thread_mode_t.

struct ucp_context_attr
#include <ucp.h>

Context attributes.

The structure defines the attributes that characterize the particular context.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_context_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

size_t request_size

Size of UCP non-blocking request. When pre-allocated request is used (e.g. in ucp_tag_recv_nbr) it should have enough space to fit UCP request data, which is defined by this value.

ucs_thread_mode_t thread_mode

Thread safe level of the context. For supported thread levels please see ucs_thread_mode_t.

uint64_t memory_types

Mask of which memory types are supported, for supported memory types please see ucs_memory_type_t.

char name[UCP_ENTITY_NAME_MAX]

Tracing and analysis tools can use name to identify this UCX context.

size_t device_counter_size

Size usable to allocate a counter memory for UCP Device API usage.

struct ucp_worker_attr
#include <ucp.h>

UCP worker attributes.

The structure defines the attributes which characterize the particular worker.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_worker_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucs_thread_mode_t thread_mode

Thread safe level of the worker.

uint32_t address_flags

Flags indicating requested details of the worker address. If UCP_WORKER_ATTR_FIELD_ADDRESS_FLAGS bit is set in the field_mask, this value should be set as well. Possible flags are specified in ucp_worker_address_flags_t.

Note

This is an input attribute.

ucp_address_t *address

Worker address, which can be passed to remote instances of the UCP library in order to connect to this worker. The memory for the address handle is allocated by ucp_worker_query() routine, and must be released by using ucp_worker_release_address() routine.

size_t address_length

Size of worker address in bytes.

size_t max_am_header

Maximum allowed header size for ucp_am_send_nbx routine.

char name[UCP_ENTITY_NAME_MAX]

Tracing and analysis tools can identify the worker using this name.

size_t max_debug_string

Maximum debug string size that can be filled with ucp_request_query.

struct ucp_rkey_compare_params
#include <ucp.h>

Tuning parameters for the comparison function ucp_rkey_compare.

The structure defines the parameters that can be used for UCP library remote keys comparison using ucp_rkey_compare routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, must currently be zero. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

struct ucp_worker_params
#include <ucp.h>

Tuning parameters for the UCP worker.

The structure defines the parameters that are used for the UCP worker tuning during the UCP worker creation.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_worker_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucs_thread_mode_t thread_mode

The parameter thread_mode suggests the thread safety mode which worker and the associated resources should be created with. This is an optional parameter. The default value is UCS_THREAD_MODE_SINGLE and it is used when the value of the parameter is not set. When this parameter along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_THREAD_MODE is set, the ucp_worker_create attempts to create worker with this thread mode. The thread mode with which worker is created can differ from the suggested mode. The actual thread mode of the worker should be obtained using the query interface ucp_worker_query.

ucs_cpu_set_t cpu_mask

Mask of which CPUs worker resources should preferably be allocated on. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_CPU_MASK), resources are allocated according to system’s default policy.

unsigned events

Mask of events (ucp_wakeup_event_t) which are expected on wakeup. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_EVENTS), all types of events will trigger on wakeup.

void *user_data

User data associated with the current worker. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_USER_DATA), it will default to NULL.

int event_fd

External event file descriptor. This value is optional. If UCP_WORKER_PARAM_FIELD_EVENT_FD is set in the field_mask, events on the worker will be reported on the provided event file descriptor. In this case, calling ucp_worker_get_efd will result in an error. The provided file descriptor must be capable of aggregating notifications for arbitrary events, for example epoll(7) on Linux systems. user_data will be used as the event user-data on systems which support it. For example, on Linux, it will be placed in epoll_data_t::ptr, when returned from epoll_wait(2).

Otherwise, events will be reported to the event file descriptor returned from ucp_worker_get_efd().

uint64_t flags

Worker flags. This value is optional. If UCP_WORKER_PARAM_FIELD_FLAGS is not set in the field_mask, the value of this field will default to 0.

const char *name

Tracing and analysis tools can identify the worker using this name. To retrieve the worker’s name, use ucp_worker_query, as the name you supply may be changed by UCX under some circumstances, e.g. a name conflict. This field is only assigned if you set UCP_WORKER_PARAM_FIELD_NAME in the field mask. If not, then a default unique name will be created for you.

size_t am_alignment

Minimal address alignment of the active message data pointer as passed in argument data to the active message handler, defined as ucp_am_recv_callback_t.

uint64_t client_id

Client id that is sent as part of the connection request payload when connecting to a remote socket address. On the remote side, this value can be obtained from ucp_conn_request_h using ucp_conn_request_query.

struct ucp_worker_address_attr
#include <ucp.h>

UCP worker address attributes.

The structure defines the attributes of the particular worker address.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_worker_address_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

uint64_t worker_uid

Unique id of the worker this address belongs to.

struct ucp_ep_evaluate_perf_param_t
#include <ucp.h>

UCP endpoint performance evaluation request attributes.

The structure defines the attributes which characterize the request for performance estimation of a particular endpoint.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_ep_perf_param_field_t. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

size_t message_size

Message size to use for determining performance. This field must be initialized by the caller.

struct ucp_ep_evaluate_perf_attr_t
#include <ucp.h>

UCP endpoint performance evaluation result attributes.

The structure defines the attributes which characterize the result of performance estimation of a particular endpoint.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_ep_perf_attr_field_t. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

double estimated_time

Estimated time (in seconds) required to send a message of a given size on this endpoint. This field is set by the ucp_ep_evaluate_perf function.

struct ucp_listener_attr
#include <ucp.h>

UCP listener attributes.

The structure defines the attributes which characterize the particular listener.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_listener_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

struct sockaddr_storage sockaddr

Sockaddr on which this listener is listening for incoming connection requests.

struct ucp_conn_request_attr
#include <ucp.h>

UCP listener’s connection request attributes.

The structure defines the attributes that characterize the particular connection request received on the server side.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_conn_request_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

struct sockaddr_storage client_address

The address of the remote client that sent the connection request to the server.

uint64_t client_id

Remote client id if remote endpoint’s flag UCP_EP_PARAMS_FLAGS_SEND_CLIENT_ID is set.

struct ucp_listener_params
#include <ucp.h>

Parameters for a UCP listener object.

This structure defines parameters for ucp_listener_create, which is used to listen for incoming client/server connections.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_listener_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucs_sock_addr_t sockaddr

An address in the form of a sockaddr. This field is mandatory for filling (along with its corresponding bit in the field_mask - UCP_LISTENER_PARAM_FIELD_SOCK_ADDR). The ucp_listener_create routine will return with an error if sockaddr is not specified.

ucp_listener_accept_handler_t accept_handler

Handler to endpoint creation in a client-server connection flow. In order for the callback inside this handler to be invoked, the UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER needs to be set in the field_mask.

ucp_listener_conn_handler_t conn_handler

Handler of an incoming connection request in a client-server connection flow. In order for the callback inside this handler to be invoked, the UCP_LISTENER_PARAM_FIELD_CONN_HANDLER needs to be set in the field_mask.

Note

User is expected to call ucp_ep_create with set UCP_EP_PARAM_FIELD_CONN_REQUEST flag to ucp_ep_params_t::field_mask and ucp_ep_params_t::conn_request in order to be able to receive communications.

struct ucp_stream_poll_ep
#include <ucp.h>

Output parameter of ucp_stream_worker_poll function.

The structure defines the endpoint and its user data.

Public Members

ucp_ep_h ep

Endpoint handle.

void *user_data

User data associated with an endpoint passed in ucp_ep_params_t::user_data.

unsigned flags

Reserved for future use.

uint8_t reserved[16]

Reserved for future use.

struct ucp_mem_map_params
#include <ucp.h>

Tuning parameters for the UCP memory mapping.

The structure defines the parameters that are used for the UCP memory mapping tuning during the ucp_mem_map routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_mem_map_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

void *address

If the address is not NULL, the routine maps (registers) the memory segment pointed to by this address. If the pointer is NULL, the library allocates mapped (registered) memory segment and returns its address in this argument. Therefore, this value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_MEM_MAP_PARAM_FIELD_ADDRESS), the ucp_mem_map routine will consider address as set to NULL and will allocate memory.

size_t length

Length (in bytes) to allocate or map (register). This field is mandatory for filling (along with its corresponding bit in the field_mask - UCP_MEM_MAP_PARAM_FIELD_LENGTH). The ucp_mem_map routine will return with an error if the length isn’t specified.

unsigned flags

Allocation flags, e.g. UCP_MEM_MAP_NONBLOCK. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_MEM_MAP_PARAM_FIELD_FLAGS), the ucp_mem_map routine will consider the flags as set to zero.

unsigned prot

Memory protection mode, e.g. UCP_MEM_MAP_PROT_LOCAL_READ. This value is optional. If it’s not set, the ucp_mem_map routine will consider the flags as set to UCP_MEM_MAP_PROT_LOCAL_READ|UCP_MEM_MAP_PROT_LOCAL_WRITE| UCP_MEM_MAP_PROT_REMOTE_READ|UCP_MEM_MAP_PROT_REMOTE_WRITE.

ucs_memory_type_t memory_type
const void *exported_memh_buffer

Exported memory handle buffer as returned by ucp_mem_map function for a memory handle created and packed by ucp_memh_pack with UCP_MEMH_PACK_FLAG_EXPORT flag. If this field is specified for ucp_mem_map function, a resulting memory handle will be a mapping of peer memory instead of local memory. If the field is not set (along with its corresponding bit in the field_mask - UCP_MEM_MAP_PARAM_FIELD_EXPORTED_MEMH_BUFFER), the ucp_mem_map routine will consider the memory handle buffer to be set to NULL by default.

struct ucp_tag_recv_info
#include <ucp.h>

UCP receive information descriptor.

The UCP receive information descriptor is allocated by application and filled in with the information about the received message by ucp_tag_probe_nb or ucp_tag_recv_request_test routines or ucp_tag_recv_callback_t callback argument.

Public Members

ucp_tag_t sender_tag

Sender tag

size_t length

The size of the received data

struct ucp_request_param_t
#include <ucp.h>

Operation parameters passed to ucp_tag_send_nbx, ucp_tag_send_sync_nbx, ucp_tag_recv_nbx, ucp_put_nbx, ucp_get_nbx, ucp_am_send_nbx and ucp_am_recv_data_nbx.

The structure ucp_request_param_t is used to specify datatype of operation, provide user request in case the external request is used, set completion callback and custom user data passed to this callback.

Example: implementation of function to send contiguous buffer to ep and invoke callback function at operation completion. If the operation completed immediately (status == UCS_OK) then callback is not called.

ucs_status_ptr_t send_data(ucp_ep_h ep, void *buffer, size_t length,
                           ucp_tag_t tag, void *request)
{
    ucp_request_param_t param = {
        .op_attr_mask               = UCP_OP_ATTR_FIELD_CALLBACK |
                                      UCP_OP_ATTR_FIELD_REQUEST,
        .request                    = request,
        .cb.send                    = custom_send_callback_f,
        .user_data                  = pointer_to_user_context_passed_to_cb
    };

    ucs_status_ptr_t status;

    status = ucp_tag_send_nbx(ep, buffer, length, tag, &param);
    if (UCS_PTR_IS_ERR(status)) {
        handle_error(status);
    } else if (status == UCS_OK) {
        // operation is completed
    }

    return status;
}

Public Members

uint32_t op_attr_mask

Mask of valid fields in this structure and operation flags, using bits from ucp_op_attr_t. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

uint32_t flags
void *request

Request handle allocated by the user. There should be at least UCP request size bytes of available space before the request. The size of the UCP request can be obtained by ucp_context_query function.

union ucp_request_param_t cb

Callback function that is invoked whenever the send or receive operation is completed.

ucp_datatype_t datatype

Datatype descriptor for the elements in the buffer. In case the op_attr_mask & UCP_OP_ATTR_FIELD_DATATYPE bit is not set, then use default datatype ucp_dt_make_contig(1)

void *user_data

Pointer to user data passed to callback function.

void *reply_buffer

Reply buffer. Can be used for storing operation result, for example by ucp_atomic_op_nbx.

ucs_memory_type_t memory_type

Memory type of the buffer. see ucs_memory_type_t for possible memory types. An optimization hint to avoid memory type detection for request buffer. If this value is not set (along with its corresponding bit in the op_attr_mask - UCP_OP_ATTR_FIELD_MEMORY_TYPE), then use default UCS_MEMORY_TYPE_UNKNOWN which means the memory type will be detected internally.

union ucp_request_param_t recv_info

Pointer to the information where received data details are stored in case of an immediate completion of receive operation. The user has to provide a pointer to valid memory/variable which will be updated on function return.

ucp_mem_h memh

Memory handle for pre-registered buffer. If the handle is provided, protocols that require registered memory can skip the registration step. As a result, the communication request overhead can be reduced and the request can be completed faster. The memory handle should be obtained by calling ucp_mem_map.

ucp_datatype_t remote_datatype

Remote datatype identifier for SGL operations. When set (along with UCP_OP_ATTR_FIELD_REMOTE_DATATYPE), specifies the datatype of the remote side. Currently only ucp_dt_make_sgl() is supported. When this field is set, remote and remote_count should also be set.

const void *remote

Remote data descriptor. The type is determined by remote_datatype. Used together with remote_datatype and remote_count to specify the remote side of SGL operations. This field is used when UCP_OP_ATTR_FIELD_REMOTE is set in op_attr_mask.

size_t remote_count

Number of elements in the remote descriptor. When set (along with UCP_OP_ATTR_FIELD_REMOTE_COUNT), specifies how many elements the remote side has, independent of the local count parameter. Used together with remote_datatype and remote.

Note

Currently must equal the local count (only N->N mapping is supported).

struct ucp_request_attr_t
#include <ucp.h>

Attributes of a particular request.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_req_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

char *debug_string

Pointer to allocated string of size debug_string_size that will be filled with debug information about transports and protocols that were selected to complete the request.

size_t debug_string_size

Size of the debug_string. String will be filled up to this size. Maximum possible size debug string can be obtained by querying the worker via ucp_worker_query.

ucs_status_t status

Status of the request. The same as ucp_request_check_status.

ucs_memory_type_t mem_type

Detected memory type of the buffer passed to the operation.

struct ucp_am_handler_param
#include <ucp.h>

Active Message handler parameters passed to ucp_worker_set_am_recv_handler routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_am_handler_param_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

unsigned id

Active Message id.

Warning

Value must be between 0 and UINT16_MAX.

uint32_t flags

Handler flags as defined by ucp_am_cb_flags.

ucp_am_recv_callback_t cb

Active Message callback. To clear the already set callback, this value should be set to NULL.

void *arg

Active Message argument, which will be passed in to every invocation of ucp_am_recv_callback_t function as the arg argument.

struct ucp_am_recv_param
#include <ucp.h>

Operation parameters provided in ucp_am_recv_callback_t callback.

Public Members

uint64_t recv_attr

Mask of valid fields in this structure and receive operation flags, using bits from ucp_am_recv_attr_t. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucp_ep_h reply_ep

Endpoint, which can be used for the reply to this message.

struct ucp_mem_advise_params
#include <ucp.h>

Tuning parameters for the UCP memory advice.

This structure defines the parameters that are used for the UCP memory advice tuning during the ucp_mem_advise routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_mem_advise_params_field. All fields are mandatory. Provides ABI compatibility with respect to adding new fields.

void *address

Memory base address.

size_t length

Length (in bytes) to allocate or map (register).

ucp_mem_advice_t advice

Memory use advice ucp_mem_advice

struct ucp_memh_pack_params
#include <ucp.h>

Memory handle pack parameters passed to ucp_memh_pack.

This structure defines the parameters that are used for packing the UCP memory handle during the ucp_memh_pack routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

uint64_t flags

Flags to control packing of a memory handle.

struct ucp_memh_buffer_release_params
#include <ucp.h>

Memory handle release parameters passed to ucp_memh_buffer_release.

This structure defines the parameters that are used for releasing the UCP memory handle buffer during the ucp_memh_buffer_release routine.

Public Members

uint64_t field_mask

Mask of valid fields in this structure. All fields are mandatory. Provides ABI compatibility with respect to adding new fields.

struct ucp_ep_attr
#include <ucp.h>

UCP endpoint attributes.

The structure defines the attributes that characterize the particular endpoint.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_ep_attr_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

char name[UCP_ENTITY_NAME_MAX]

Endpoint name. Tracing and analysis tools can identify the endpoint using this name.

struct sockaddr_storage local_sockaddr

Local socket address for this endpoint. Valid only for endpoints created by connecting to a socket address. If this field is specified for an endpoint not connected to a socket address, UCS_ERR_NOT_CONNECTED will be returned.

struct sockaddr_storage remote_sockaddr

Remote socket address this endpoint is connected to. Valid only for endpoints created by connecting to a socket address. If this field is specified for an endpoint not connected to a socket address, UCS_ERR_NOT_CONNECTED will be returned.

ucp_transports_t transports

Structure defining an array containing transport and device names used by this endpoint. The caller is responsible for allocation and deallocation of this array.

void *user_data

User data associated with an endpoint passed in ucp_ep_params_t::user_data.

ucp_request_param_t.cb

Callback function that is invoked whenever the send or receive operation is completed.

ucp_request_param_t.recv_info

Pointer to the information where received data details are stored in case of an immediate completion of receive operation. The user has to provide a pointer to valid memory/variable which will be updated on function return.

Public Members

size_t *length
ucp_tag_recv_info_t *tag_info