summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2017-03-20 18:13:13 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2017-03-20 18:13:13 (GMT)
commit52ee0344ef077b8109123b83b0677be7f132b4dc (patch)
treec78b7d1b038cca384558f2171fbf6e2ff2460757 /src/H5C.c
parentb359e8f1a2349d177e70d34560d0a089ce37c4c8 (diff)
parentb7c58f7dfca66d4caa26d7f8b318ad3514b8c46f (diff)
downloadhdf5-52ee0344ef077b8109123b83b0677be7f132b4dc.zip
hdf5-52ee0344ef077b8109123b83b0677be7f132b4dc.tar.gz
hdf5-52ee0344ef077b8109123b83b0677be7f132b4dc.tar.bz2
Merge pull request #341 in HDFFV/hdf5 from ~MAINZER/hdf5_jrm:develop to develop
* commit 'b7c58f7dfca66d4caa26d7f8b318ad3514b8c46f': Minor code changes to address comments in pull request Checkin of additions to cache image parallel test code and associated bug fixes.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 120abb8..2ba9f2d 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -761,7 +761,10 @@ H5C_prep_for_file_close(H5F_t *f, hid_t dxpl_id)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cache image")
#ifdef H5_HAVE_PARALLEL
- if(!image_generated && cache_ptr->aux_ptr != NULL && f->shared->fs_persist) {
+ if ( ( H5F_INTENT(f) & H5F_ACC_RDWR ) &&
+ ( ! image_generated ) &&
+ ( cache_ptr->aux_ptr != NULL ) &&
+ ( f->shared->fs_persist ) ) {
/* If persistent free space managers are enabled, flushing the
* metadata cache may result in the deletion, insertion, and/or
* dirtying of entries.
@@ -7295,14 +7298,20 @@ H5C__make_space_in_cache(H5F_t *f, hid_t dxpl_id, size_t space_needed,
prev_ptr = entry_ptr->aux_prev;
+ if ( ( !(entry_ptr->prefetched_dirty) )
#ifdef H5_HAVE_PARALLEL
- if(!(entry_ptr->coll_access)) {
+ && ( ! (entry_ptr->coll_access) )
#endif /* H5_HAVE_PARALLEL */
- if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
-#ifdef H5_HAVE_PARALLEL
+ ) {
+
+ if ( H5C__flush_single_entry(f, dxpl_id, entry_ptr,
+ H5C__FLUSH_INVALIDATE_FLAG |
+ H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0 )
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
+ "unable to flush entry")
+
} /* end if */
-#endif /* H5_HAVE_PARALLEL */
/* we are scanning the clean LRU, so the serialize function
* will not be called on any entry -- thus there is no