summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2017-12-18 19:42:09 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2017-12-18 19:42:09 (GMT)
commit8aa520584463a5151699dc5768bcdef39f5564a6 (patch)
tree5c905b6022d0d3286f957fb78710e58335f3e2c7 /src/H5Fint.c
parent758b9667b3e07a7562107f19f7dabee027e5bd53 (diff)
downloadhdf5-8aa520584463a5151699dc5768bcdef39f5564a6.zip
hdf5-8aa520584463a5151699dc5768bcdef39f5564a6.tar.gz
hdf5-8aa520584463a5151699dc5768bcdef39f5564a6.tar.bz2
Optimized version of avoid truncate patch.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 8212eb5..25df964 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1532,6 +1532,17 @@ H5F__flush_phase2(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t closi
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
/* Truncate the file to the current allocated size */
+#if 1 /* JRM */
+#ifdef H5_HAVE_PARALLEL
+ if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ /* Since we just returned from a call to H5AC_flush(), we just
+ * passed through a barrier. Hence we can skip the barrier on
+ * entry to the mpio file driver call below.
+ */
+ H5FD_mpio_mark_pre_trunc_barrier_unecessary(f->shared->lf);
+ }
+#endif /* H5_HAVE_PARALLEL */
+#endif /* JRM */
if(H5FD_truncate(f->shared->lf, meta_dxpl_id, closing) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "low level truncate failed")