summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authormainzer <mainzer#hdfgroup.org>2017-03-16 17:42:10 (GMT)
committermainzer <mainzer#hdfgroup.org>2017-03-16 17:42:10 (GMT)
commit11ce930ae94bd21b1a8d4afdde7b982439f2800b (patch)
tree581a2a020c12b4714b6d00aee2b1ef1f12c3ba61 /src/H5AC.c
parentcee9624b0febcb60a7b2699262104e9eaf20313d (diff)
downloadhdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.zip
hdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.tar.gz
hdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.tar.bz2
Checkin of additions to cache image parallel test code and
associated bug fixes. Also, modifications to H5PB_dest() to flush the page buffer before destroying the page buffer. This is necessary, as when persistant free space managers are enabled, the page buffer will typically contain dirty FSM data at page buffer destroy time. Tested serial/debug, serial/production, serial/check-vfd/debug, parallel/debug, parallel/production on Jelly.
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index a561852..be41b6a 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -611,6 +611,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
/* Sanity check */
HDassert(f);
+ HDassert(f->shared);
HDassert(f->shared->cache);
#if H5AC_DUMP_STATS_ON_CLOSE
@@ -641,9 +642,17 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- /* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */
- if(H5AC__flush_entries(f, dxpl_id) < 0)
+ /* If the file was opened R/W, attempt to flush all entries
+ * from rank 0 & Bcast clean list to other ranks.
+ *
+ * Must not flush in the R/O case, as this will trigger the
+ * free space manager settle routines.
+ */
+ if ( ( H5F_ACC_RDWR & H5F_INTENT(f) ) &&
+ ( H5AC__flush_entries(f, dxpl_id) < 0 ) )
+
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush")
+
#endif /* H5_HAVE_PARALLEL */
/* Destroy the cache */