Skip to content

Commit

Permalink
Merge pull request #12709 from bosilca/topic/fix_same_instance
Browse files Browse the repository at this point in the history
Topic/fix same instance
  • Loading branch information
bosilca authored Jul 25, 2024
2 parents ce2310a + 0a02491 commit 20b900e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ompi/mca/coll/base/coll_base_alltoallv.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, ompi_count_array_t
if( OPAL_UNLIKELY(opal_local_arch != ompi_proc->super.proc_convertor->master->remote_arch)) {
packed_size = opal_datatype_compute_remote_size(&rdtype->super,
ompi_proc->super.proc_convertor->master->remote_sizes);
packed_size *= rcounts[right];
packed_size *= ompi_count_array_get(rcounts, right);
max_size = packed_size > max_size ? packed_size : max_size;
}
}
Expand Down
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

0 comments on commit 20b900e

Please sign in to comment.