Skip to content

Conversation

@hjelmn
Copy link
Member

@hjelmn hjelmn commented Aug 18, 2016

This commit changes the sematics of ompi request callbacks. If a
request's callback has freed or re-posted (using start) a request
the callback must return 1 instead of OMPI_SUCCESS. This indicates
to ompi_request_complete that the request should not be modified
further. This fixes a race condition in osc/pt2pt that could lead
to the req_state being inconsistent if a request is freed between
the callback and setting the request as complete.

Signed-off-by: Nathan Hjelm hjelmn@lanl.gov

This commit changes the sematics of ompi request callbacks. If a
request's callback has freed or re-posted (using start) a request
the callback must return 1 instead of OMPI_SUCCESS. This indicates
to ompi_request_complete that the request should not be modified
further. This fixes a race condition in osc/pt2pt that could lead
to the req_state being inconsistent if a request is freed between
the callback and setting the request as complete.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
@hjelmn
Copy link
Member Author

hjelmn commented Aug 18, 2016

@bosilca We already returned an integer from the callback function. This commit makes ompi_request_complete actually look at the return code and set complete iff the callback returns 1. osc/pt2pt has been updated to both free the request in the callback and return 1.

@bosilca
Copy link
Member

bosilca commented Aug 18, 2016

Looks good. 👍

@hjelmn hjelmn merged commit e5c7512 into open-mpi:master Aug 18, 2016
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