summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2018-07-13 14:26:41 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2018-07-13 14:26:41 (GMT)
commit0dc6c3c8b5c2e42fa83872c3c753dbf0d7ec4987 (patch)
tree65fc80b48760b5591b68da1f80e289cb83ea6b38 /src
parent30d3bc2c91b42a0d54595267b3549ed318be2df3 (diff)
downloadhdf5-0dc6c3c8b5c2e42fa83872c3c753dbf0d7ec4987.zip
hdf5-0dc6c3c8b5c2e42fa83872c3c753dbf0d7ec4987.tar.gz
hdf5-0dc6c3c8b5c2e42fa83872c3c753dbf0d7ec4987.tar.bz2
Add check for actually using the MPI file driver when caching one chunk
Better explain rationale behind chunk caching issue fix
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index d1528eb..f901cdf 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -2943,9 +2943,23 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
* address in the file and/or gets re-allocated with a different size).
* If we were to cache this information, subsequent reads/writes would
* retrieve the invalid information and cause a variety of issues.
+ *
+ * This is an ugly and potentially frail check, but the
+ * H5D__chunk_cinfo_cache_reset() function is not currently available
+ * to functions outside of this file, so outside functions can not
+ * invalidate this single chunk cache. Even if the function were available,
+ * this check prevents us from doing the work of going through and caching
+ * each chunk in the write operation, when we're only going to invalidate
+ * the cache at the end of a parallel write anyway.
+ *
+ * - JTH
*/
#ifdef H5_HAVE_PARALLEL
- if ( !((H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR) && dset->shared->dcpl_cache.pline.nused) )
+ if ( !( (H5F_HAS_FEATURE(idx_info.f, H5FD_FEAT_HAS_MPI))
+ && (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR)
+ && dset->shared->dcpl_cache.pline.nused
+ )
+ )
#endif
H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, udata);
} /* end if */