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

Identify requests from the same instance. #12711

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ompi/request/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ int ompi_request_persistent_noop_create(ompi_request_t** request)
bool ompi_request_check_same_instance(ompi_request_t** requests,
int count)
{
ompi_request_t *req, *base = NULL;
ompi_instance_t* base_instance = NULL;
ompi_request_t *req;

for(int idx = 0; idx < count; idx++ ) {
req = requests[idx];
Expand All @@ -262,11 +263,11 @@ bool ompi_request_check_same_instance(ompi_request_t** requests,
/* Only PML requests have support for MPI sessions */
if(OMPI_REQUEST_PML != req->req_type)
continue;
if(NULL == base) {
base = req;
if(NULL == base_instance) {
base_instance = req->req_mpi_object.comm->instance;
continue;
}
if(base->req_mpi_object.comm != req->req_mpi_object.comm)
if(base_instance != req->req_mpi_object.comm->instance)
return false;
}
return true;
Expand Down
Loading