File ucp_compat.h

Typedefs

typedef struct ucp_listener_accept_handler ucp_listener_accept_handler_t

Deprecated:

Replaced by ucp_listener_conn_handler_t.

Functions

int ucp_request_is_completed(void *request)

Deprecated:

Replaced by ucp_request_test.

void ucp_request_release(void *request)

Deprecated:

Replaced by ucp_request_free.

void ucp_ep_destroy(ucp_ep_h ep)

Deprecated:

Replaced by ucp_ep_close_nb.

ucs_status_ptr_t ucp_disconnect_nb(ucp_ep_h ep)

Deprecated:

Replaced by ucp_ep_close_nb.

ucs_status_t ucp_request_test(void *request, ucp_tag_recv_info_t *info)

Deprecated:

Replaced by ucp_tag_recv_request_test and ucp_request_check_status depends on use case.

Note

Please use ucp_request_check_status for cases that only need to check the completion status of an outstanding request. ucp_request_check_status can be used for any type of request. ucp_tag_recv_request_test should only be used for requests returned by ucp_tag_recv_nb (or request allocated by user for ucp_tag_recv_nbr) for which additional information (returned via the info pointer) is needed.

ucs_status_t ucp_ep_flush(ucp_ep_h ep)

Deprecated:

Replaced by ucp_ep_flush_nb.

ucs_status_t ucp_worker_flush(ucp_worker_h worker)

Flush outstanding AMO and RMA operations on the worker.

Deprecated:

Replaced by ucp_worker_flush_nb. The following example implements the same functionality using ucp_worker_flush_nb :

ucs_status_t worker_flush(ucp_worker_h worker)
{
    void *request = ucp_worker_flush_nb(worker);
    if (request == NULL) {
        return UCS_OK;
    } else if (UCS_PTR_IS_ERR(request)) {
        return UCS_PTR_STATUS(request);
    } else {
        ucs_status_t status;
        do {
            ucp_worker_progress(worker);
            status = ucp_request_check_status(request);
        } while (status == UCS_INPROGRESS);
        ucp_request_release(request);
        return status;
    }
}

This routine flushes all outstanding AMO and RMA communications on the worker. All the AMO and RMA operations issued on the worker prior to this call are completed both at the origin and at the target when this call returns.

Parameters

worker[in] UCP worker.

Returns

Error code as defined by ucs_status_t

Note

For description of the differences between flush and fence operations please see ucp_worker_fence()

ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey)

Blocking remote memory put operation.

Deprecated:

Replaced by ucp_put_nb. The following example implements the same functionality using ucp_put_nb :

void empty_callback(void *request, ucs_status_t status)
{
}

ucs_status_t put(ucp_ep_h ep, const void *buffer, size_t length,
                  uint64_t remote_addr, ucp_rkey_h rkey)
{
    void *request = ucp_put_nb(ep, buffer, length, remote_addr, rkey,
                               empty_callback),
    if (request == NULL) {
        return UCS_OK;
    } else if (UCS_PTR_IS_ERR(request)) {
        return UCS_PTR_STATUS(request);
    } else {
        ucs_status_t status;
        do {
            ucp_worker_progress(worker);
            status = ucp_request_check_status(request);
        } while (status == UCS_INPROGRESS);
        ucp_request_release(request);
        return status;
    }
}

This routine stores contiguous block of data that is described by the local address buffer in the remote contiguous memory region described by remote_addr address and the memory handle rkey. The routine returns when it is safe to reuse the source address buffer.

Parameters
  • ep[in] Remote endpoint handle.

  • buffer[in] Pointer to the local source address.

  • length[in] Length of the data (in bytes) stored under the source address.

  • remote_addr[in] Pointer to the destination remote address to write to.

  • rkey[in] Remote memory key associated with the remote address.

Returns

Error code as defined by ucs_status_t

ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, uint64_t remote_addr, ucp_rkey_h rkey)

Blocking remote memory get operation.

Deprecated:

Replaced by ucp_get_nb.

This routine loads contiguous block of data that is described by the remote address remote_addr and the memory handle rkey in the local contiguous memory region described by buffer address. The routine returns when remote data is loaded and stored under the local address buffer.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • buffer[in] Pointer to the local source address.

  • length[in] Length of the data (in bytes) stored under the source address.

  • remote_addr[in] Pointer to the destination remote address to write to.

  • rkey[in] Remote memory key associated with the remote address.

Returns

Error code as defined by ucs_status_t

ucs_status_t ucp_atomic_add32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey)

Blocking atomic add operation for 32 bit integers.

Deprecated:

Replaced by ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD.

This routine performs an add operation on a 32 bit integer value atomically. The remote integer value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The add value is the value that is used for the add operation. When the operation completes the sum of the original remote value and the operand value (add) is stored in remote memory. The call to the routine returns immediately, independent of operation completion.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • add[in] Value to add.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 32 bit.

ucs_status_t ucp_atomic_add64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey)

Blocking atomic add operation for 64 bit integers.

Deprecated:

Replaced by ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD.

This routine performs an add operation on a 64 bit integer value atomically. The remote integer value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The add value is the value that is used for the add operation. When the operation completes the sum of the original remote value and the operand value (add) is stored in remote memory. The call to the routine returns immediately, independent of operation completion.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • add[in] Value to add.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 64 bit.

ucs_status_t ucp_atomic_fadd32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result)

Blocking atomic fetch and add operation for 32 bit integers.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD.

This routine performs an add operation on a 32 bit integer value atomically. The remote integer value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The add value is the value that is used for the add operation. When the operation completes, the original remote value is stored in the local memory result, and the sum of the original remote value and the operand value is stored in remote memory. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • add[in] Value to add.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 32 bit.

ucs_status_t ucp_atomic_fadd64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result)

Blocking atomic fetch and add operation for 64 bit integers.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD.

This routine performs an add operation on a 64 bit integer value atomically. The remote integer value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The add value is the value that is used for the add operation. When the operation completes, the original remote value is stored in the local memory result, and the sum of the original remote value and the operand value is stored in remote memory. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • add[in] Value to add.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 64 bit.

ucs_status_t ucp_atomic_swap32(ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result)

Blocking atomic swap operation for 32 bit values.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP.

This routine swaps a 32 bit value between local and remote memory. The remote value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The swap value is the value that is used for the swap operation. When the operation completes, the remote value is stored in the local memory result, and the operand value (swap) is stored in remote memory. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • swap[in] Value to swap.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 32 bit.

ucs_status_t ucp_atomic_swap64(ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result)

Blocking atomic swap operation for 64 bit values.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP.

This routine swaps a 64 bit value between local and remote memory. The remote value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The swap value is the value that is used for the swap operation. When the operation completes, the remote value is stored in the local memory result, and the operand value (swap) is stored in remote memory. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • swap[in] Value to swap.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 64 bit.

ucs_status_t ucp_atomic_cswap32(ucp_ep_h ep, uint32_t compare, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result)

Blocking atomic conditional swap (cswap) operation for 32 bit values.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP.

This routine conditionally swaps a 32 bit value between local and remote memory. The swap occurs only if the condition value (continue) is equal to the remote value, otherwise the remote memory is not modified. The remote value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The swap value is the value that is used to update the remote memory if the condition is true. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • compare[in] Value to compare to.

  • swap[in] Value to swap.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 32 bit.

ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result)

Blocking atomic conditional swap (cswap) operation for 64 bit values.

Deprecated:

Replaced by ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP.

This routine conditionally swaps a 64 bit value between local and remote memory. The swap occurs only if the condition value (continue) is equal to the remote value, otherwise the remote memory is not modified. The remote value is described by the combination of the remote memory address remote_addr and the remote memory handle rkey. The swap value is the value that is used to update the remote memory if the condition is true. The call to the routine returns when the operation is completed and the result value is updated.
See

ucp_put.

Parameters
  • ep[in] Remote endpoint handle.

  • compare[in] Value to compare to.

  • swap[in] Value to swap.

  • remote_addr[in] Pointer to the destination remote address of the atomic variable.

  • rkey[in] Remote memory key associated with the remote address.

  • result[out] Pointer to the address that is used to store the previous value of the atomic variable described by the remote_addr

Returns

Error code as defined by ucs_status_t

Note

The remote address must be aligned to 64 bit.

ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params)

Modify endpoint parameters.

Deprecated:

Use ucp_listener_conn_handler_t instead of ucp_listener_accept_handler_t, if you have other use case please submit an issue on https://github.com/openucx/ucx or report to ucx-group@elist.ornl.gov

This routine modifies endpoint created by ucp_ep_create or ucp_listener_accept_callback_t. For example, this API can be used to setup custom parameters like ucp_ep_params_t::user_data or ucp_ep_params_t::err_handler to endpoint created by ucp_listener_accept_callback_t.

Parameters
Returns

NULL - The endpoint is modified successfully.

Returns

UCS_PTR_IS_ERR(_ptr) - The reconfiguration failed and an error code indicates the status. However, the endpoint is not modified and can be used further.

Returns

otherwise - The reconfiguration process is started, and can be completed at any point in time. A request handle is returned to the application in order to track progress of the endpoint modification. The application is responsible for releasing the handle using the ucp_request_free routine.

Note

See the documentation of ucp_ep_params_t for details, only some of the parameters can be modified.

struct ucp_listener_accept_handler
#include <ucp_compat.h>

Deprecated:

Replaced by ucp_listener_conn_handler_t.

Public Members

ucp_listener_accept_callback_t cb

Endpoint creation callback

void *arg

User defined argument for the callback