-
Notifications
You must be signed in to change notification settings - Fork 885
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
Add test for mpi_request_null to avoid error in wait[xxx]/test[xxx] when using sessions #12525
Add test for mpi_request_null to avoid error in wait[xxx]/test[xxx] when using sessions #12525
Conversation
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 for the fix @HawkmoonEternal! Would you mind removing the changes that are not strictly addressing the issue? The change from indx
to i
is not strictly needed here.
Signed-off-by: HawkmoonEternal <domi.huber@tum.de>
1994c3b
to
da18f8e
Compare
I removed all changes that are not strictly addressing the issue. I will include these changes in another pull request to address code consistency. |
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.
I wonder what is ompi_request_empty
? Nothing in the MPI standard related to this, and the documentation in request.c begs for more questions than answers.
@bosilca AFAIK, this is the request we hand out if the operation completes immediately, e.g., if it fits the eager protocol. |
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 @HawkmoonEternal!
Makes sense, we gain peanuts on the small send but we pay the branching/testing cost for all multiple test/wait requests. Let's put aside the discussion about performance, the code we have today seems incomplete with regard to sessions because we need to test for all OMPI predefined requests |
You're right that Having said that, these checks are not performance critical since they are only done if argument error checking is enabled. |
that's our default. Literally everyone in the world is doing these checks. |
Consistent way to check that an array of requests belong to the same session or are predefined. Skip all requests generated by components that do not support instances (generalized requests, file, win). Replaces open-mpi#12525. Signed-off-by: George Bosilca <gbosilca@nvidia.com>
A slightly different approach (#12691) was used to solve this. |
Consistent way to check that an array of requests belong to the same session or are predefined. Skip all requests generated by components that do not support instances (generalized requests, file, win). Replaces open-mpi#12525. Signed-off-by: George Bosilca <gbosilca@nvidia.com> (cherry picked from commit ae5b0f6)
Consistent way to check that an array of requests belong to the same session or are predefined. Skip all requests generated by components that do not support instances (generalized requests, file, win). Replaces open-mpi#12525. Signed-off-by: George Bosilca <gbosilca@nvidia.com> (cherry picked from commit ae5b0f6)
Issue:
The MPI Standard explicitly allows for
MPI_REQUEST_NULL
in the list of requests passed toMPI_Wait[xxx]/MPI_Test[xxx]
.However, using
MPI_Wait[xxx]/MPI_Test[xxx]
with a list containing active requests together with null requests leads to the following MPI error:Reproducer:
The following code snippet is a minimal reproducer of the issue:
Root Cause:
The root cause of the issue is that
ompi_comm_instances_same()
fails, becauseMPI_REQUEST_NULL
is not associated with a particular instance and therefore the instance is not the same for null requests and valid requests.Proposed Solution:
This pull request adds a check for
ompi_request_null
inMPI_Wait[xxx]/MPI_Test[xxx]
to avoid it being passed to theompi_comm_instances_same()
check.