From 996d07102d426ae673dff0bb49409e5ae4d1aecf Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Fri, 18 Dec 2020 14:30:31 -0600 Subject: H5FD__mpio_read: Fix MPI_Bcast datatype (#205) Signed-off-by: Evan Ramos --- src/H5FDmpio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index a4e0baf..2f5ed64 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1271,7 +1271,11 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU * of the data. (QAK - 2019/1/2) */ if (rank0_bcast) - if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_LONG_LONG, 0, file->comm)) +#if MPI_VERSION >= 3 + if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_COUNT, 0, file->comm)) +#else + if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_INT, 0, file->comm)) +#endif HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", 0) /* Get the type's size */ -- cgit v0.12