-
Notifications
You must be signed in to change notification settings - Fork 433
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
UCP/CORE: Increment completion count before calling uct_ep_flush #7332
Conversation
a21f072
to
df16fe6
Compare
|
||
out_comp_count_dec: | ||
--req->send.state.uct_comp.count; | ||
ucs_assert(req->send.state.uct_comp.count == 0); |
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.
why assert == 0, are we use it started with 0? maybe assert >= 0?
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.
yes, it should be either 0 or 1
src/ucp/core/ucp_worker.c
Outdated
return UCS_OK; | ||
} else if (status == UCS_ERR_NO_RESOURCE) { | ||
return UCS_ERR_NO_RESOURCE; | ||
goto out_comp_count_dec; |
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.
we cannot touch request after calling ucp_worker_discard_uct_ep_flush_comp
maybe
if (status == UCS_INPROGRESS) {
return status; // or goto out
}
--req->send.state.uct_comp.count;
if (status != UCS_ERR_NO_RESOURCE) {
uct_completion_update_status(&req->send.state.uct_comp, status);
ucp_worker_discard_uct_ep_flush_comp(&req->send.state.uct_comp);
status = UCS_OK;
}
return status;
return 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.
good catch!
done
c952e33
to
38dbfcd
Compare
src/ucp/core/ucp_worker.c
Outdated
--req->send.state.uct_comp.count; | ||
ucs_assert(req->send.state.uct_comp.count == 0); | ||
|
||
if (status != UCS_ERR_NO_RESOURCE) { |
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.
a slight better suggestion:
if (status == NO_RESOURCE) {
return NO_RESOURCE;
}
uct_completion_update_status(&req->send.state.uct_comp, status);
ucp_worker_discard_uct_ep_flush_comp(&req->send.state.uct_comp);
return UCS_OK
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.
thanks, done
38dbfcd
to
a390687
Compare
Since #6933 |
What
Increment completion count before calling
uct_ep_flush()
.Why ?
Fixes the following assertion in UD EP flush which expects that the completion counter > 0.
How ?
uct_ep_flush()
.status == UCS_OK
was returned fromuct_ep_flush()
.status == UCS_INPROGRESS
was returned fromuct_ep_flush()
.