This is a MIT licensed rust crate. It provides a FFI binding to the UCX library. It is likely that it works better with the libibverbs
library variant supplied by Mellanox.
```C
/* * @ingroup UCP_MEM * @brief If possible translate remote address into local address which can be * accessed using direct load and store operations. * * This routine returns a local memory address for the remote address such that * application can use the local address for direct memory load and store * operations. If the underlying hardware does not support this capability * this routine will return a corresponding error. * * @param [in] ep Endpoint handle that was used for rkey object * creation and is used for the remote memory address. * @param [in] remote_addr Remote address to translate. * @param [out] rkey Remote key handle for the remote address. * @param [out] local_addr_p Local memory address that can by accessed * directly using memory load and store operations. * * @return Error code as defined by @ref ucs_status_t */ ucs_status_t ucp_rmem_ptr(ucp_ep_h ep, void *remote_addr, ucp_rkey_h rkey, void *localaddrp); ```
```C /** * @ingroup UCPDATATYPE * @brief Generate an identifier for contiguous data type. * * This macro creates an identifier for contiguous datatype that is defined by * the size of the basic element. * * @param [in] _elemsize Size of the basic element of the type. * * @return Data-type identifier. */ #define ucpdtmakecontig(elemsize) \ (((ucpdatatypet)(elemsize) << UCPDATATYPESHIFT) | UCPDATATYPE_CONTIG)
/** * @ingroup UCP_DATATYPE * @brief Generate an identifier for Scatter-gather IOV data type. * * This macro creates an identifier for datatype of scatter-gather list * with multiple pointers * * @return Data-type identifier. */
/** * @ingroup UCPCONTEXT * @brief UCP context initialization. * * This routine creates and initializes a @ref ucpcontexth * "UCP application context". * * @warning This routine must be called before any other UCP function * call in the application. * * This routine checks API version compatibility, then discovers the available * network interfaces, and initializes the network resources required for * discovering of the network and memory related devices. * This routine is responsible for initialization all information required for * a particular application scope, for example, MPI application, OpenSHMEM * application, etc. * * @note * @li Higher level protocols can add additional communication isolation, as * MPI does with it's communicator object. A single communication context may * be used to support multiple MPI communicators. * @li The context can be used to isolate the communication that corresponds to * different protocols. For example, if MPI and OpenSHMEM are using UCP to * isolate the MPI communication from the OpenSHMEM communication, users should * use different application context for each of the communication libraries. * * @param [in] config UCP configuration descriptor allocated through * @ref ucpconfigread "ucpconfigread()" routine. * @param [in] params User defined @ref ucpparamst configurations for the * @ref ucpcontexth "UCP application context". * @param [out] contextp Initialized @ref ucpcontexth * "UCP application context". * * @return Error code as defined by @ref ucsstatust */ static inline ucsstatust ucpinit(const ucpparamst *params, const ucpconfigt *config, ucpcontexth *contextp) { return ucpinitversion(UCPAPIMAJOR, UCPAPIMINOR, params, config, context_p); }
```