Send or receive a message with the UCX Tag API. More...
#include <request_tag.h>
Public Member Functions | |
| void | cancel () override |
| Cancel the tag request. | |
| void | request () |
| Create and submit a tag request. | |
| void | callback (void *request, ucs_status_t status, const ucp_tag_recv_info_t *info) |
| Implementation of the tag receive request callback. | |
| Public Member Functions inherited from ucxx::Request | |
| Request (const Request &)=delete | |
| Request & | operator= (Request const &)=delete |
| Request (Request &&o)=delete | |
| Request & | operator= (Request &&o)=delete |
| virtual | ~Request () |
| ucxx::Request destructor. | |
| ucs_status_t | getStatus () |
| Return the status of the request. | |
| void * | getFuture () |
| Return the future used to check on state. | |
| void | checkError () |
| Check whether the request completed with an error. | |
| bool | isCompleted () |
| Check whether the request has already completed. | |
| void | callback (void *request, ucs_status_t status) |
| Callback executed by UCX when request is completed. | |
| void | populateDelayedSubmission () |
| Populate the internal submission dispatcher. | |
| const std::string & | getOwnerString () const |
| Get formatted string with owner type and handle address. | |
| virtual std::shared_ptr< Buffer > | getRecvBuffer () |
| Get the received buffer. | |
| virtual std::string | getRecvHeader () |
| Get the received user header. | |
| Attributes | queryAttributes () |
| Get the requests's attributes. | |
| Public Member Functions inherited from ucxx::Component | |
| void | setParent (std::shared_ptr< Component > parent) |
| Set the internal parent reference. | |
| std::shared_ptr< Component > | getParent () const |
| Get the internal parent reference. | |
Static Public Member Functions | |
| static void | tagSendCallback (void *request, ucs_status_t status, void *arg) |
| Callback executed by UCX when a tag send request is completed. | |
| static void | tagRecvCallback (void *request, ucs_status_t status, const ucp_tag_recv_info_t *info, void *arg) |
| Callback executed by UCX when a tag receive request is completed. | |
Friends | |
| class | detail::ConstructorFactory |
Additional Inherited Members | |
| Protected Member Functions inherited from ucxx::Request | |
| Request (std::shared_ptr< Component > endpointOrWorker, const data::RequestData requestData, std::string operationName, const bool enablePythonFuture=false, RequestCallbackUserFunction callbackFunction=nullptr, RequestCallbackUserData callbackData=nullptr) | |
| Protected constructor of an abstract ucxx::Request. | |
| void | process () |
| Perform initial processing of the request to determine if immediate completion. | |
| void | setStatus (ucs_status_t status) |
| Set the request status and notify Python future. | |
| void | publishRequest (void *request) |
| Publish the UCP request handle and capture its attributes. | |
| Protected Attributes inherited from ucxx::Request | |
| ucs_status_t | _status {UCS_INPROGRESS} |
| Requests status. | |
| std::string | _status_msg {} |
| Human-readable status message. | |
| void * | _request {nullptr} |
| Pointer to UCP request. | |
| std::shared_ptr< Future > | _future {nullptr} |
| Future to notify upon completion. | |
| std::shared_ptr< Worker > | _worker |
| Worker that generated request (if not from endpoint). | |
| std::shared_ptr< Endpoint > | _endpoint |
| Endpoint that generated request (if not from worker). | |
| std::string | _ownerString |
| String to print owner (endpoint or worker) when logging. | |
| std::recursive_mutex | _mutex {} |
| Mutex to prevent checking status while it's being set. | |
| data::RequestData | _requestData {} |
| The operation-specific data to be used in the request. | |
| std::string | _operationName |
| Human-readable operation name, mostly used for log messages. | |
| bool | _enablePythonFuture {true} |
| Whether Python future is enabled for this request. | |
| RequestCallbackUserFunction | _callback {nullptr} |
| Completion callback. | |
| RequestCallbackUserData | _callbackData {nullptr} |
| Completion callback data. | |
| Attributes | _requestAttr {} |
| Protected Attributes inherited from ucxx::Component | |
| std::shared_ptr< Component > | _parent {nullptr} |
| A reference-counted pointer to the parent. | |
Send or receive a message with the UCX Tag API.
Send or receive a message with the UCX Tag API, using non-blocking UCP calls ucp_tag_send_nbx or ucp_tag_recv_nbx.
| void ucxx::RequestTag::callback | ( | void * | request, |
| ucs_status_t | status, | ||
| const ucp_tag_recv_info_t * | info ) |
Implementation of the tag receive request callback.
Implementation of the tag receive request callback. Verify whether the message was truncated and set that state if necessary, and finally dispatch ucxx::Request::callback().
| [in] | request | the UCX request pointer. |
| [in] | status | the completion status of the request. |
| [in] | info | information of the completed transfer provided by UCX, includes length of message received used to verify for truncation. |
|
overridevirtual |
Cancel the tag request.
A receive created from a probed message handle must consume that handle before it can be canceled. If delayed submission has not occurred yet, defer cancelation until the progress context has submitted and processed the receive.
Reimplemented from ucxx::Request.
| void ucxx::RequestTag::request | ( | ) |
Create and submit a tag request.
This is the method that should be called to actually submit a tag request. It is meant to be called from populateDelayedSubmission(), which is decided at the discretion of std::shared_ptr<ucxx::Worker>. See populateDelayedSubmission() for more details.
|
static |
Callback executed by UCX when a tag receive request is completed.
Callback executed by UCX when a tag receive request is completed, that will dispatch ucxx::RequestTag::callback().
| [in] | request | the UCX request pointer. |
| [in] | status | the completion status of the request. |
| [in] | info | information of the completed transfer provided by UCX, includes length of message received used to verify for truncation. |
| [in] | arg | the pointer to the ucxx::Request object that created the transfer, effectively this pointer as seen by request(). |
|
static |
Callback executed by UCX when a tag send request is completed.
Callback executed by UCX when a tag send request is completed, that will dispatch ucxx::Request::callback().
| [in] | request | the UCX request pointer. |
| [in] | status | the completion status of the request. |
| [in] | arg | the pointer to the ucxx::Request object that created the transfer, effectively this pointer as seen by request(). |