-
Notifications
You must be signed in to change notification settings - Fork 1
fix on osc/mt_v4 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
OPAL_DECLSPEC void | ||
opal_common_ucx_req_completion(void *request, ucs_status_t status) { | ||
opal_common_ucx_request_t *req = (opal_common_ucx_request_t *)request; | ||
ucp_request_release(req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if( request->user_cb != NULL ){
call it
}
@@ -105,9 +105,14 @@ typedef enum { | |||
OPAL_COMMON_UCX_MEM_MAP | |||
} opal_common_ucx_mem_type_t; | |||
|
|||
typedef struct { | |||
void *external_req; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add:
- user callback
- winfo ptr is to be added in subsequent commit introducing fine-grained locking
buffer, len, | ||
rem_addr, rkey, | ||
winfo->worker); | ||
(*ptr) = ucp_atomic_fetch_nb(ep, opcode, value, buffer, len, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the new parameter to opal_common_ucx_atomic_fetch_nb with the completion handler.
3bb19c4
to
d4605fb
Compare
opal/mca/common/ucx/common_ucx_int.h
Outdated
@@ -170,10 +171,11 @@ static inline | |||
ucs_status_ptr_t opal_common_ucx_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, | |||
uint64_t value, void *result, size_t op_size, | |||
uint64_t remote_addr, ucp_rkey_h rkey, | |||
opal_common_ucx_user_req_handler_t req_handler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ucp_send_calback_t here
#include "opal_config.h" | ||
#include <ucp/api/ucp.h> | ||
|
||
typedef void (*opal_common_ucx_req_handler_t)(void *request, ucs_status_t status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix here to not expose common internals
int target, void *buffer, size_t len, | ||
uint64_t rem_addr, | ||
opal_common_ucx_user_req_handler_t user_req_cb, | ||
void *user_req_ptr, int *completed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need completed flag. Call the callback instead.
0, target, &(module->req_result), | ||
sizeof(uint64_t), remote_addr, | ||
(ucs_status_ptr_t *)&internal_req); | ||
0, target, &(module->req_result), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increment the counters before calling this. Otherwise may go negative.
opal_mutex_unlock(&winfo->mutex); | ||
|
||
if (UCS_PTR_IS_PTR(req)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this
14371b0
to
dfc5a39
Compare
@xinzhao3 More important is that we need a sign-off in each commit. And I don't see them here. |
Signed-off-by: Xin Zhao <[email protected]>
Signed-off-by: Xin Zhao <[email protected]>
Signed-off-by: Xin Zhao <[email protected]>
No description provided.