Skip to content

Commit

Permalink
ch4/ucx: use matching datatype in win_allgather
Browse files Browse the repository at this point in the history
rkey_sizes are changed into MPI_Aint to use the enlarged internal
collective interfaces, and we need use datatypes that match MPI_Aint to
gather rkey_sizes array.
  • Loading branch information
hzhou committed Feb 4, 2021
1 parent f126b42 commit 3b1ac74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mpid/ch4/netmod/ucx/ucx_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,14 @@ static int win_allgather(MPIR_Win * win, size_t length, uint32_t disp_unit, void
MPIDI_UCX_CHK_STATUS(status);
}

MPI_Datatype aint_type;
mpi_errno = MPIR_Type_match_size_impl(MPI_TYPECLASS_INTEGER, sizeof(MPI_Aint), &aint_type);
MPIR_ERR_CHECK(mpi_errno);

rkey_sizes = (MPI_Aint *) MPL_malloc(sizeof(MPI_Aint) * comm_ptr->local_size, MPL_MEM_OTHER);
rkey_sizes[comm_ptr->rank] = (MPI_Aint) rkey_size;
mpi_errno = MPIR_Allgather(MPI_IN_PLACE, 1, MPI_INT, rkey_sizes, 1, MPI_INT, comm_ptr, &err);
mpi_errno =
MPIR_Allgather(MPI_IN_PLACE, 1, aint_type, rkey_sizes, 1, aint_type, comm_ptr, &err);

MPIR_ERR_CHECK(mpi_errno);

Expand Down

0 comments on commit 3b1ac74

Please sign in to comment.