Skip to content
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

Fix multithread request wait #11966

Closed

Conversation

FlorentGermain-Bull
Copy link
Contributor

Fixes #11965

Fix: multi-thread logic issue in ompi/request/request.h:ompi_request_wait_completion
Fix: ensure request free is only called once on each request in ompi/request/req_wait.c:ompi_request_default_wait

The wait fix must be done in waitany, waitsome, waitall, test, testany, testsome, testall to ensure request free is only called once.
If the wait change suits you, then I can apply it to the other functions.

Signed-off-by: Florent Germain <[email protected]>
@@ -447,53 +447,84 @@ static inline bool ompi_request_tag_is_collective(int tag) {
* Wait a particular request for completion
*/

static inline void ompi_request_wait_completion(ompi_request_t *req)
static inline void ompi_request_wait_completion(ompi_request_t **req)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this change necessary? Are we assigning anything to that pointer? (maybe I'm missing something here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the change is to handle the case where another thread switch the request to MPI_REQUEST_NULL

As concurrent wait on the same request is erroneous, this shouldn't happen

@FlorentGermain-Bull
Copy link
Contributor Author

issue relates to an erroneous behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-thread wait can result in an assert failure
2 participants