summaryrefslogtreecommitdiffstats
path: root/examples/h5dsm_dset_r1m.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2017-03-14 16:46:29 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2017-03-14 16:46:29 (GMT)
commit1da81639f6352598dd6a00f2dd66739e69c1aba9 (patch)
treea18ccbd829ec11dd375144ea18879726c1e97bbe /examples/h5dsm_dset_r1m.c
parent83cd06479ce3e93653f287faacf00edf75e9f16d (diff)
downloadhdf5-1da81639f6352598dd6a00f2dd66739e69c1aba9.zip
hdf5-1da81639f6352598dd6a00f2dd66739e69c1aba9.tar.gz
hdf5-1da81639f6352598dd6a00f2dd66739e69c1aba9.tar.bz2
Modify DAOS-M plugin to call daos_pool_connect at plugin initialization
time, using a communicator passed to the initialization function. Add public functions H5VLdaosm_init and H5VLdaosm_term. Apps no longer need to call daos_init and daos_fini. Updated examples. Other minor fixes/cleanup.
Diffstat (limited to 'examples/h5dsm_dset_r1m.c')
-rw-r--r--examples/h5dsm_dset_r1m.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/h5dsm_dset_r1m.c b/examples/h5dsm_dset_r1m.c
index 762dd2d..0b53908 100644
--- a/examples/h5dsm_dset_r1m.c
+++ b/examples/h5dsm_dset_r1m.c
@@ -12,7 +12,6 @@ int main(int argc, char *argv[]) {
int i;
(void)MPI_Init(&argc, &argv);
- (void)daos_init();
/* Seed random number generator */
srand(time(NULL));
@@ -24,10 +23,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 */
@@ -92,9 +95,11 @@ int main(int argc, char *argv[]) {
free(nbuf);
nbuf = NULL;
+ if(H5VLdaosm_term() < 0)
+ ERROR;
+
printf("Success\n");
- (void)daos_fini();
(void)MPI_Finalize();
return 0;
@@ -105,12 +110,12 @@ error:
H5Fclose(file);
H5Fclose(nfile);
H5Pclose(fapl);
+ H5VLdaosm_term();
} H5E_END_TRY;
free(buf);
free(nbuf);
- (void)daos_fini();
(void)MPI_Finalize();
return 1;
}