summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2013-06-15 16:46:48 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2013-06-15 16:46:48 (GMT)
commite1e913f87c9adbcd1a10adb6471cfc1c232a929a (patch)
treec8ff87ddfe04609af8127339a14a82211e5376ea
parenteae9a5c1ce94a6e3ca293f3acb18a83852e09ee1 (diff)
downloadhdf5-e1e913f87c9adbcd1a10adb6471cfc1c232a929a.zip
hdf5-e1e913f87c9adbcd1a10adb6471cfc1c232a929a.tar.gz
hdf5-e1e913f87c9adbcd1a10adb6471cfc1c232a929a.tar.bz2
[svn-r23777] Implement SWMR-5:
Replace H5Fflush in writer with H5Dflush and file close/reopen with H5Drefresh. Use cases seem to run faster. Keeping the old code so that later on, I may test the performance between the two. Tested: koala.
-rw-r--r--test/use_common.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/use_common.c b/test/use_common.c
index 98448c3..380ef6c 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -341,7 +341,12 @@ int write_uc_file(void)
return -1;
}
/* flush file to make the just written plane available. */
- if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0){
+#if 0
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+#else
+ if(H5Dflush(dsid) < 0)
+#endif
+ {
fprintf(stderr, "Failed to H5Fflush file\n");
return -1;
}
@@ -528,6 +533,7 @@ int read_uc_file(void)
nplane_old=dims[0];
/* check if dataset has grown since last time */
+#if 0
/* close dsid and file, then reopen them */
if (H5Dclose(dsid) < 0){
fprintf(stderr, "H5Dclose failed\n");
@@ -545,6 +551,9 @@ int read_uc_file(void)
fprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
+#else
+ H5Drefresh(dsid);
+#endif
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0){
fprintf(stderr, "H5Sget_simple_extent_dims got error\n");