diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-01-22 14:40:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 14:40:33 (GMT) |
commit | 99d3962a831167298ebc087f0b8e8b6209034d95 (patch) | |
tree | 5c879275551180b76d0b14be52cdbf0a1b98ad8c /src/H5Dmpio.c | |
parent | d45124d7085de2771c0157f5d48d71b21a10de1f (diff) | |
download | hdf5-99d3962a831167298ebc087f0b8e8b6209034d95.zip hdf5-99d3962a831167298ebc087f0b8e8b6209034d95.tar.gz hdf5-99d3962a831167298ebc087f0b8e8b6209034d95.tar.bz2 |
Parallel rank0 deadlock fixes (#1183)
* Fix several places where rank 0 can skip past collective MPI operations on failure
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r-- | src/H5Dmpio.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index f8bce33..cf8a6ef 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -2360,8 +2360,16 @@ H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank") if (mpi_rank == 0) { - if (H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + if (H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0) { + size_t u; + + /* Clear total chunk address array */ + for (u = 0; u < (size_t)fm->layout->u.chunk.nchunks; u++) + total_chunk_addr_array[u] = HADDR_UNDEF; + + /* Push error, but still participate in following MPI_Bcast */ + HDONE_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + } } /* end if */ /* Broadcasting the MPI_IO option info. and chunk address info. */ |