summaryrefslogtreecommitdiffstats
path: root/examples/h5dsm_dset_write.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2016-12-12 22:41:39 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2016-12-12 22:41:39 (GMT)
commit3889eeb5c86376fa677d48c8156584435f5cea66 (patch)
tree4e4d4b5850b8d3f6a4a409f3d64ec512f70b5ec3 /examples/h5dsm_dset_write.c
parentbbcb31845f506a167337c432c062a01936fe7118 (diff)
downloadhdf5-3889eeb5c86376fa677d48c8156584435f5cea66.zip
hdf5-3889eeb5c86376fa677d48c8156584435f5cea66.tar.gz
hdf5-3889eeb5c86376fa677d48c8156584435f5cea66.tar.bz2
Add transaction number printing for write examples, optional transaction
number arguments for read examples. Rework and fix bug in h5dsm_dset_wpartial.c. Not tested.
Diffstat (limited to 'examples/h5dsm_dset_write.c')
-rw-r--r--examples/h5dsm_dset_write.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/h5dsm_dset_write.c b/examples/h5dsm_dset_write.c
index 9b45892..d52e5a3 100644
--- a/examples/h5dsm_dset_write.c
+++ b/examples/h5dsm_dset_write.c
@@ -54,6 +54,8 @@ int main(int argc, char *argv[]) {
printf("\n");
}
+ printf("Transaction number = %llu\n", (long long unsigned)(trans_num + 1));
+
/* Write data */
if(H5Dwrite_ff(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf, trans) < 0)
ERROR;
@@ -67,7 +69,7 @@ int main(int argc, char *argv[]) {
ERROR;
if(H5TRclose(trans) < 0)
ERROR;
- if(H5Fclose(file) < 0)
+ if(H5Fclose_ff(file, -1) < 0)
ERROR;
if(H5Pclose(fapl) < 0)
ERROR;
@@ -82,7 +84,7 @@ error:
H5E_BEGIN_TRY {
H5Dclose_ff(dset, -1);
H5TRclose(trans);
- H5Fclose(file);
+ H5Fclose_ff(file, -1);
H5Pclose(fapl);
} H5E_END_TRY;