flush step after writing dataset

This commit is contained in:
2011-08-11 15:04:14 +00:00
parent f9710938f2
commit a29d3c894a
2 changed files with 19 additions and 0 deletions
+18
View File
@@ -1087,6 +1087,24 @@ hdf5_close_file (
HDF5_WRAPPER_RETURN (H5_SUCCESS);
}
static inline h5_err_t
hdf5_flush (
hid_t obj_id,
H5F_scope_t scope
) {
HDF5_WRAPPER_ENTER2 (h5_err_t,
"obj_id=%d (%s)",
obj_id,
hdf5_get_objname (obj_id));
if (H5Fflush (obj_id, scope) < 0)
HDF5_WRAPPER_LEAVE (
h5_error (
H5_ERR_HDF5,
"Cannot flush data \"%s\".",
hdf5_get_objname (obj_id)));
HDF5_WRAPPER_RETURN (H5_SUCCESS);
}
/****** E r r o r h a n d l i n g ********************************************/
static inline h5_err_t
+1
View File
@@ -158,6 +158,7 @@ h5u_write_data (
TRY (hdf5_close_dataset (dset_id));
f->empty = 0;
TRY (hdf5_flush (f->step_gid, H5F_SCOPE_LOCAL));
H5_CORE_API_RETURN (H5_SUCCESS);
}