summaryrefslogtreecommitdiffstats
path: root/src/H5Cimage.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-01-22 14:40:33 (GMT)
committerGitHub <noreply@github.com>2022-01-22 14:40:33 (GMT)
commit99d3962a831167298ebc087f0b8e8b6209034d95 (patch)
tree5c879275551180b76d0b14be52cdbf0a1b98ad8c /src/H5Cimage.c
parentd45124d7085de2771c0157f5d48d71b21a10de1f (diff)
downloadhdf5-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/H5Cimage.c')
-rw-r--r--src/H5Cimage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index 7421c90..98c1291 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -997,6 +997,9 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
#endif /* H5_HAVE_PARALLEL */
/* Read the buffer (if serial access, or rank 0 of parallel access) */
+ /* NOTE: if this block read is being performed on rank 0 only, throwing
+ * an error here will cause other ranks to hang in the following MPI_Bcast.
+ */
if (H5F_block_read(f, H5FD_MEM_SUPER, cache_ptr->image_addr, cache_ptr->image_len,
cache_ptr->image_buffer) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_READERROR, FAIL, "Can't read metadata cache image block")