summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2018-07-13 14:26:41 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-07-26 22:18:46 (GMT)
commitc058e5eb7ee15335351fdfd9ab354cc243f7b9b3 (patch)
tree9b8b5eb5f3bd5121d9d2ea84f8720092396aae7b /src
parent21a5db8d98cb4bc7b2f51ebf29d6f964697532b8 (diff)
downloadhdf5-c058e5eb7ee15335351fdfd9ab354cc243f7b9b3.zip
hdf5-c058e5eb7ee15335351fdfd9ab354cc243f7b9b3.tar.gz
hdf5-c058e5eb7ee15335351fdfd9ab354cc243f7b9b3.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 3ee3a82..a0976f1 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 */