summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2005-01-20 22:40:37 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2005-01-20 22:40:37 (GMT)
commit3b90c189cad3762670f2228b87d1c533767bcbe1 (patch)
tree02fd78bfec2361cc05eac941e4b9f16edd618725 /src/H5F.c
parent3d83546b364c38c29ee80613010047af7a168c4c (diff)
downloadhdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.zip
hdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.tar.gz
hdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.tar.bz2
[svn-r9850] Purpose:
1) Provide facilities in cache to allow us to avoid a potential cache consistency bug in the parallel case. 2) Clean up a off by one sanity checking bug. 3) Turn off execution of long running tests in debug mode. Description: 1) In the parallel case, all writes to metadata must be collective, but reads may not be. In pricipal, this allows us to different contents in different caches. This isn't a problem as long as the correct data is always on disk, but unless we can force certain writes immediately, that need not be the case. 2) & 3) should need no further explanation. Solution: 1) Add code allowing us to mark cache entries, and then force these entries to be flushed at a later time. Note that to actually avoid the bug, we will have to modify existing code to use these new features. 2) & 3) should need no further explanation. Platforms tested: heping (serial debug and production) committest (copper, sol, and heping). test failed on heping in the c++ portion of the build, but at Quincey's siggestion, I am proceeding with the checkin. Misc. update:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 9a83ca2..ce7621b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2909,6 +2909,11 @@ done:
* Modified the flags being passed in to be one flag instead
* of several.
*
+ * John Mainzer, 2005-01-07
+ * H5AC (and H5C) now have their own system of flags. Hence
+ * we must now translate between the H5F_FLUSH flags and the
+ * H5AC flags. Added code to handle this detail.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2916,6 +2921,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags)
{
unsigned nerrors = 0; /* Errors from nested flushes */
unsigned i; /* Index variable */
+ unsigned int H5AC_flags; /* translated flags for H5AC_flush() */
herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5F_flush)
@@ -3012,7 +3018,16 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags)
* allocates object headers (calls the H5O_init function...via a
* lot of other functions first)....
*/
- if (H5AC_flush(f, dxpl_id, flags & (H5F_FLUSH_INVALIDATE | H5F_FLUSH_CLEAR_ONLY)) < 0)
+
+ H5AC_flags = 0;
+
+ if ( (flags & H5F_FLUSH_INVALIDATE) != 0 )
+ H5AC_flags |= H5AC__FLUSH_INVALIDATE_FLAG;
+
+ if ( (flags & H5F_FLUSH_CLEAR_ONLY) != 0 )
+ H5AC_flags |= H5AC__FLUSH_CLEAR_ONLY_FLAG;
+
+ if (H5AC_flush(f, dxpl_id, H5AC_flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush meta data cache")
/* Write the superblock to disk */