summaryrefslogtreecommitdiffstats
path: root/examples/h5dsm_dset_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/h5dsm_dset_open.c')
-rw-r--r--examples/h5dsm_dset_open.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/h5dsm_dset_open.c b/examples/h5dsm_dset_open.c
index 2c67497..f30cb59 100644
--- a/examples/h5dsm_dset_open.c
+++ b/examples/h5dsm_dset_open.c
@@ -10,7 +10,6 @@ int main(int argc, char *argv[]) {
H5VL_daosm_snap_id_t snap_id;
(void)MPI_Init(&argc, &argv);
- (void)daos_init();
if(argc < 4 || argc > 5)
PRINTF_ERROR("argc must be 4 or 5\n");
@@ -19,10 +18,14 @@ int main(int argc, char *argv[]) {
if(0 != uuid_parse(argv[1], pool_uuid))
ERROR;
+ /* Initialize VOL */
+ if(H5VLdaosm_init(MPI_COMM_WORLD, pool_uuid, pool_grp) < 0)
+ ERROR;
+
/* Set up FAPL */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
ERROR;
- if(H5Pset_fapl_daosm(fapl, MPI_COMM_WORLD, MPI_INFO_NULL, pool_uuid, pool_grp) < 0)
+ if(H5Pset_fapl_daosm(fapl, MPI_COMM_WORLD, MPI_INFO_NULL) < 0)
ERROR;
/* Open snapshot if specified */
@@ -105,9 +108,11 @@ int main(int argc, char *argv[]) {
if(H5Pclose(def_dapl) < 0)
ERROR;
+ if(H5VLdaosm_term() < 0)
+ ERROR;
+
printf("Success\n");
- (void)daos_fini();
(void)MPI_Finalize();
return 0;
@@ -122,9 +127,9 @@ error:
H5Pclose(dapl);
H5Pclose(def_dcpl);
H5Pclose(def_dapl);
+ H5VLdaosm_term();
} H5E_END_TRY;
- (void)daos_fini();
(void)MPI_Finalize();
return 1;
}