summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-07-02 20:17:42 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-07-02 20:17:42 (GMT)
commite686da7c03d01d4c96bf39aeda02bb25d736a6da (patch)
tree2c55bf93c0f4c2c5581989813e62371615feac3f
parentf8884cf6fa006b78b4824a767f9f3a4bcb8b7834 (diff)
downloadhdf5-e686da7c03d01d4c96bf39aeda02bb25d736a6da.zip
hdf5-e686da7c03d01d4c96bf39aeda02bb25d736a6da.tar.gz
hdf5-e686da7c03d01d4c96bf39aeda02bb25d736a6da.tar.bz2
[svn-r27330] more fixes.
problem with parallel t_cache test only when AT is ON.
-rw-r--r--src/H5ACmpio.c1
-rw-r--r--src/H5C.c13
-rw-r--r--src/H5Cprivate.h2
-rw-r--r--src/H5EAcache.c20
-rw-r--r--src/H5Fint.c5
-rw-r--r--src/H5Fsuper_cache.c10
-rw-r--r--src/H5HFcache.c10
-rw-r--r--test/cache_common.c4
-rw-r--r--testpar/t_cache.c14
9 files changed, 45 insertions, 34 deletions
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 6c2b924..38691e0 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -1902,6 +1902,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id)
(aux_ptr->write_done)();
} /* end if */
+ MPI_Barrier(aux_ptr->mpi_comm);
/* Propagate cleaned entries to other ranks. */
if(H5AC__propagate_flushed_and_still_clean_entries_list(f, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.")
diff --git a/src/H5C.c b/src/H5C.c
index 7141af4..ea4a9b7 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -253,7 +253,7 @@ static herr_t H5C__epoch_marker_serialize(const H5F_t *f,
void * image_ptr,
size_t len,
void * thing);
-static herr_t H5C__epoch_marker_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5C__epoch_marker_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5C__epoch_marker_free_icr(void * thing);
static herr_t H5C__epoch_marker_clear(const H5F_t *f, void * thing,
@@ -354,7 +354,7 @@ H5C__epoch_marker_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *
static herr_t
H5C__epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, const H5F_t H5_ATTR_UNUSED *f,
- void H5_ATTR_UNUSED * thing)
+ void H5_ATTR_UNUSED * thing, hid_t H5_ATTR_UNUSED dxpl_id)
{
FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
@@ -2309,7 +2309,7 @@ H5C_insert_entry(H5F_t * f,
* notice now that the entry is fully integrated into the cache.
*/
if(entry_ptr->type->notify &&
- (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_INSERT, f, entry_ptr) < 0)
+ (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_INSERT, f, entry_ptr, dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry inserted into cache")
H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr)
@@ -3152,7 +3152,7 @@ H5C_protect(H5F_t * f,
* notice now that the entry is fully integrated into the cache.
*/
if(entry_ptr->type->notify &&
- (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_LOAD, f, entry_ptr) < 0)
+ (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_LOAD, f, entry_ptr, dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, NULL, "can't notify client about entry inserted into cache")
}
@@ -7939,7 +7939,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* just flushed the entry.
*/
if(entry_ptr->type->notify &&
- (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, f, entry_ptr) < 0 )
+ (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, f, entry_ptr, dxpl_id) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client of entry flush")
} /* if ( write_entry ) */
@@ -7978,7 +7978,8 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* the entry is still fully integrated in the cache.
*/
if(destroy)
- if(entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, f, entry_ptr) < 0)
+ if(entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT,
+ f, entry_ptr, dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict")
/* Update the cache internal data structures. */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 913164b..c832c3b 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1084,7 +1084,7 @@ typedef herr_t (*H5C_pre_serialize_func_t)(const H5F_t *f, hid_t dxpl_id,
unsigned *flags_ptr);
typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f, void *image_ptr,
size_t len, void *thing);
-typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, const H5F_t *f, void *thing);
+typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
typedef herr_t (*H5C_free_icr_func_t)(void *thing);
typedef herr_t (*H5C_clear_func_t)(const H5F_t *f, void * thing,
hbool_t about_to_destroy);
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index af58d43..f897230 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -90,7 +90,7 @@ static herr_t H5EA__cache_iblock_image_len(const void *thing,
size_t *compressed_image_len_ptr);
static herr_t H5EA__cache_iblock_serialize(const H5F_t *f, void *image, size_t len,
void *thing);
-static herr_t H5EA__cache_iblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5EA__cache_iblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5EA__cache_iblock_free_icr(void *thing);
static herr_t H5EA__cache_sblock_get_load_size(const void *udata, size_t *image_len);
@@ -101,7 +101,7 @@ static herr_t H5EA__cache_sblock_image_len(const void *thing,
size_t *compressed_image_len_ptr);
static herr_t H5EA__cache_sblock_serialize(const H5F_t *f, void *image, size_t len,
void *thing);
-static herr_t H5EA__cache_sblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5EA__cache_sblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5EA__cache_sblock_free_icr(void *thing);
static herr_t H5EA__cache_dblock_get_load_size(const void *udata, size_t *image_len);
@@ -112,7 +112,7 @@ static herr_t H5EA__cache_dblock_image_len(const void *thing,
size_t *compressed_image_len_ptr);
static herr_t H5EA__cache_dblock_serialize(const H5F_t *f, void *image, size_t len,
void *thing);
-static herr_t H5EA__cache_dblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5EA__cache_dblock_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5EA__cache_dblock_free_icr(void *thing);
static herr_t H5EA__cache_dblock_fsf_size(const void *thing, size_t *fsf_size);
@@ -124,7 +124,7 @@ static herr_t H5EA__cache_dblk_page_image_len(const void *thing,
size_t *compressed_image_len_ptr);
static herr_t H5EA__cache_dblk_page_serialize(const H5F_t *f, void *image, size_t len,
void *thing);
-static herr_t H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5EA__cache_dblk_page_free_icr(void *thing);
@@ -807,7 +807,8 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_serialize() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_iblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing))
+H5EA__cache_iblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id))
/* Local variables */
H5EA_iblock_t *iblock = (H5EA_iblock_t *)_thing; /* Pointer to the object */
@@ -1161,7 +1162,8 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_sblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing))
+H5EA__cache_sblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id))
/* Local variables */
H5EA_sblock_t *sblock = (H5EA_sblock_t *)_thing; /* Pointer to the object */
@@ -1516,7 +1518,8 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_serialize() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_dblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing))
+H5EA__cache_dblock_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id))
/* Local variables */
H5EA_dblock_t *dblock = (H5EA_dblock_t *)_thing; /* Pointer to the object */
@@ -1838,7 +1841,8 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_serialize() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing))
+H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id))
/* Local variables */
H5EA_dblk_page_t *dblk_page = (H5EA_dblk_page_t *)_thing; /* Pointer to the object */
diff --git a/src/H5Fint.c b/src/H5Fint.c
index cfbb388..0307af7 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1197,13 +1197,10 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
if((should_truncate = H5F__should_truncate(f, dxpl_id)) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't check whether truncation is required.")
- if(TRUE == should_truncate) {
+ if(TRUE == should_truncate)
/* Truncate the file to the current allocated size */
if(H5FD_truncate(f->shared->lf, dxpl_id, closing) < 0)
HDONE_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "low level truncate failed")
- if(H5F_super_dirty(f) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to mark Super Block dirty")
- }
/* Flush the entire metadata cache */
if(H5AC_flush(f, dxpl_id) < 0)
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 5109360..6f6bd05 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -79,7 +79,7 @@ static herr_t H5F__cache_superblock_pre_serialize(const H5F_t *f,
size_t *new_compressed_len, unsigned *flags);
static herr_t H5F__cache_superblock_serialize(const H5F_t *f, void *image, size_t len,
void *thing);
-static herr_t H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5F__cache_superblock_free_icr(void *thing);
static herr_t H5F__cache_drvrinfo_get_load_size(const void *udata, size_t *image_len);
@@ -106,7 +106,7 @@ const H5AC_class_t H5AC_SUPERBLOCK[1] = {{
H5F__cache_superblock_get_load_size,/* 'get_load_size' callback */
H5F__cache_superblock_deserialize, /* 'deserialize' callback */
H5F__cache_superblock_image_len, /* 'image_len' callback */
- H5F__cache_superblock_pre_serialize,/* 'pre_serialize' callback */
+ NULL,//H5F__cache_superblock_pre_serialize,/* 'pre_serialize' callback */
H5F__cache_superblock_serialize, /* 'serialize' callback */
H5F__cache_superblock_notify, /* 'notify' callback */
H5F__cache_superblock_free_icr, /* 'free_icr' callback */
@@ -793,7 +793,7 @@ done:
} /* H5F__cache_superblock_serialize() */
static herr_t
-H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing)
+H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id)
{
H5F_super_t *sblock = (H5F_super_t *)thing; /* Pointer to the super block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -896,7 +896,7 @@ H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *t
if(H5O_msg_write(&ext_loc, H5O_EOA_ID, mesg_flags, H5O_UPDATE_TIME, &eoa_msg, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "unable to update EOA header message")
} /* end if */
-#if 0
+
/* Check for ignoring the driver info for this file */
if(!H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
/* Check for driver info message */
@@ -919,7 +919,7 @@ H5F__cache_superblock_notify(H5C_notify_action_t action, const H5F_t *f, void *t
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "unable to update driver info header message")
} /* end if */
} /* end if */
-#endif
+
/* Close the superblock extension object header */
if(H5F_super_ext_close((H5F_t *)f, &ext_loc, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension")
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index cd286fb..9d51c72 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -98,7 +98,7 @@ static herr_t H5HF__cache_iblock_pre_serialize(const H5F_t *f, hid_t dxpl_id,
unsigned *flags);
static herr_t H5HF__cache_iblock_serialize(const H5F_t *f, void *image,
size_t len, void *thing);
-static herr_t H5HF__cache_iblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5HF__cache_iblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5HF__cache_iblock_free_icr(void *thing);
static herr_t H5HF__cache_dblock_get_load_size(const void *udata, size_t *image_len);
@@ -113,7 +113,7 @@ static herr_t H5HF__cache_dblock_pre_serialize(const H5F_t *f, hid_t dxpl_id,
unsigned *flags);
static herr_t H5HF__cache_dblock_serialize(const H5F_t *f, void *image,
size_t len, void *thing);
-static herr_t H5HF__cache_dblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t H5HF__cache_dblock_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t H5HF__cache_dblock_free_icr(void *thing);
/* Debugging Function Prototypes */
@@ -1364,7 +1364,8 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t len,
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_iblock_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing)
+H5HF__cache_iblock_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id)
{
H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2361,7 +2362,8 @@ H5HF__cache_dblock_serialize(const H5F_t *f, void *image, size_t len,
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_dblock_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *_thing)
+H5HF__cache_dblock_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f,
+ void *_thing, hid_t H5_ATTR_UNUSED dxpl_id)
{
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Fractal heap direct block */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/test/cache_common.c b/test/cache_common.c
index 6b3f0ca..ca123d6 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -204,7 +204,7 @@ static herr_t variable_free_icr(void *thing);
static herr_t notify_free_icr(void *thing);
-static herr_t notify_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t notify_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
/* Generic callback routines */
static herr_t get_load_size(const void *udata_ptr, size_t *image_len_ptr,
@@ -1505,7 +1505,7 @@ notify(H5C_notify_action_t action, void *thing, int32_t entry_type)
} /* notify() */
herr_t
-notify_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *thing)
+notify_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *thing, hid_t H5_ATTR_UNUSED dxpl_id)
{
return(notify(action, thing, NOTIFY_ENTRY_TYPE));
}
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 7cabbed..e10fac5 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -407,7 +407,7 @@ static herr_t datum_serialize(const H5F_t *f,
size_t len,
void *thing_ptr);
-static herr_t datum_notify(H5C_notify_action_t action, const H5F_t *f, void *thing);
+static herr_t datum_notify(H5C_notify_action_t action, const H5F_t *f, void *thing, hid_t dxpl_id);
static herr_t datum_free_icr(void * thing);
@@ -2577,7 +2577,7 @@ datum_serialize(const H5F_t *f,
*-------------------------------------------------------------------------
*/
static herr_t
-datum_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *thing)
+datum_notify(H5C_notify_action_t action, const H5F_t H5_ATTR_UNUSED *f, void *thing, hid_t H5_ATTR_UNUSED dxpl_id)
{
hbool_t was_dirty = FALSE;
herr_t ret_value = SUCCEED;
@@ -4040,7 +4040,7 @@ setup_cache_for_test(hid_t * fid_ptr,
{
hbool_t success = FALSE; /* will set to TRUE if appropriate. */
hbool_t enable_rpt_fcn = FALSE;
- hid_t fid = -1;
+ hid_t fid = -1, fcpl = -1;
H5AC_cache_config_t config;
H5AC_cache_config_t test_config;
H5F_t * file_ptr = NULL;
@@ -4051,7 +4051,13 @@ setup_cache_for_test(hid_t * fid_ptr,
HDassert ( file_ptr_ptr != NULL );
HDassert ( cache_ptr_ptr != NULL );
- fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ if(H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY == metadata_write_strategy)
+ H5Pset_avoid_truncate(fcpl, H5F_AVOID_TRUNCATE_OFF);
+
+ fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, fcpl, fapl);
+
+ H5Pclose(fcpl);
if ( fid < 0 ) {
nerrors++;