Skip to content

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

Merged
merged 3 commits into from
Dec 1, 2018
Merged

fix on osc/mt_v4 #6

merged 3 commits into from
Dec 1, 2018

Conversation

xinzhao3
Copy link

No description provided.

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);
Copy link
Owner

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;
Copy link
Owner

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,
Copy link
Owner

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.

@xinzhao3 xinzhao3 force-pushed the osc/mt_v4 branch 3 times, most recently from 3bb19c4 to d4605fb Compare December 1, 2018 02:34
@@ -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,
Copy link
Owner

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);
Copy link
Owner

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)
Copy link
Owner

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),
Copy link
Owner

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)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix this

@xinzhao3 xinzhao3 force-pushed the osc/mt_v4 branch 4 times, most recently from 14371b0 to dfc5a39 Compare December 1, 2018 20:24
@artpol84
Copy link
Owner

artpol84 commented Dec 1, 2018

@xinzhao3
If you don't mind, lets prefix all commits with small letters (so it will be consistent across the PR) as I started doing so.

More important is that we need a sign-off in each commit. And I don't see them here.

@artpol84 artpol84 merged commit 6ec4a3f into artpol84:osc/mt_v4 Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants