diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/h5dsm_attr_create.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_attr_open.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_attr_read.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_attr_write.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_create.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_open.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_r1m.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_read.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_rpartial.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_w1m.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_wpartial.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_dset_write.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_file_create.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_file_open.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_group_create.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_group_open.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_link_exists.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_slink_create.c | 13 | ||||
-rw-r--r-- | examples/h5dsm_ttconv.c | 13 |
19 files changed, 172 insertions, 75 deletions
diff --git a/examples/h5dsm_attr_create.c b/examples/h5dsm_attr_create.c index a7e941a..099bffc 100644 --- a/examples/h5dsm_attr_create.c +++ b/examples/h5dsm_attr_create.c @@ -8,7 +8,6 @@ int main(int argc, char *argv[]) { H5VL_daosm_snap_id_t snap_id; (void)MPI_Init(&argc, &argv); - (void)daos_init(); if(argc < 6 || argc > 7) PRINTF_ERROR("argc must be 6 or 7\n"); @@ -17,10 +16,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; /* Set up dataspace */ @@ -68,9 +71,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -81,9 +86,9 @@ error: H5Fclose(file); H5Sclose(space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_attr_open.c b/examples/h5dsm_attr_open.c index dd79f2e..c0f54c5 100644 --- a/examples/h5dsm_attr_open.c +++ b/examples/h5dsm_attr_open.c @@ -7,7 +7,6 @@ int main(int argc, char *argv[]) { H5VL_daosm_snap_id_t snap_id; (void)MPI_Init(&argc, &argv); - (void)daos_init(); if(argc < 6 || argc > 7) PRINTF_ERROR("argc must be 6 or 7\n"); @@ -16,10 +15,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 */ @@ -62,9 +65,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -74,9 +79,9 @@ error: H5Oclose(obj); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_attr_read.c b/examples/h5dsm_attr_read.c index 8909535..52aeecd 100644 --- a/examples/h5dsm_attr_read.c +++ b/examples/h5dsm_attr_read.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(); /* Seed random number generator */ srand(time(NULL)); @@ -22,10 +21,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 */ @@ -85,9 +88,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -97,9 +102,9 @@ error: H5Oclose(obj); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_attr_write.c b/examples/h5dsm_attr_write.c index 15f5ad1..e130613 100644 --- a/examples/h5dsm_attr_write.c +++ b/examples/h5dsm_attr_write.c @@ -10,7 +10,6 @@ int main(int argc, char *argv[]) { int i, j; (void)MPI_Init(&argc, &argv); - (void)daos_init(); /* Seed random number generator */ srand(time(NULL)); @@ -22,10 +21,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 file */ @@ -79,9 +82,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -91,9 +96,9 @@ error: H5Oclose(obj); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_dset_create.c b/examples/h5dsm_dset_create.c index 15106c8..a0a8fb7 100644 --- a/examples/h5dsm_dset_create.c +++ b/examples/h5dsm_dset_create.c @@ -8,7 +8,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"); @@ -17,10 +16,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; /* Set up dataspace */ @@ -54,9 +57,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -66,9 +71,9 @@ error: H5Fclose(file); H5Sclose(space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } 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; } 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; } diff --git a/examples/h5dsm_dset_read.c b/examples/h5dsm_dset_read.c index 21a811a..91d1c8c 100644 --- a/examples/h5dsm_dset_read.c +++ b/examples/h5dsm_dset_read.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(); /* Seed random number generator */ srand(time(NULL)); @@ -22,10 +21,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 */ @@ -71,9 +74,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -82,9 +87,9 @@ error: H5Dclose(dset); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_dset_rpartial.c b/examples/h5dsm_dset_rpartial.c index c5b46c8..9888de4 100644 --- a/examples/h5dsm_dset_rpartial.c +++ b/examples/h5dsm_dset_rpartial.c @@ -15,7 +15,6 @@ int main(int argc, char *argv[]) { int i, j; (void)MPI_Init(&argc, &argv); - (void)daos_init(); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -33,10 +32,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 */ @@ -126,9 +129,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -139,9 +144,9 @@ error: H5Sclose(file_space); H5Sclose(mem_space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_dset_w1m.c b/examples/h5dsm_dset_w1m.c index 42b1281..54640d8 100644 --- a/examples/h5dsm_dset_w1m.c +++ b/examples/h5dsm_dset_w1m.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; /* Create file */ @@ -91,9 +94,11 @@ int main(int argc, char *argv[]) { free(buf); buf = NULL; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -105,11 +110,11 @@ error: H5Fclose(nfile); H5Sclose(space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; free(buf); - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_dset_wpartial.c b/examples/h5dsm_dset_wpartial.c index 79dc521..0056443 100644 --- a/examples/h5dsm_dset_wpartial.c +++ b/examples/h5dsm_dset_wpartial.c @@ -15,7 +15,6 @@ int main(int argc, char *argv[]) { int i, j; (void)MPI_Init(&argc, &argv); - (void)daos_init(); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -33,10 +32,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 file */ @@ -113,9 +116,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -126,9 +131,9 @@ error: H5Sclose(file_space); H5Sclose(mem_space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_dset_write.c b/examples/h5dsm_dset_write.c index 1ca34b8..bc31278 100644 --- a/examples/h5dsm_dset_write.c +++ b/examples/h5dsm_dset_write.c @@ -10,7 +10,6 @@ int main(int argc, char *argv[]) { int i, j; (void)MPI_Init(&argc, &argv); - (void)daos_init(); /* Seed random number generator */ srand(time(NULL)); @@ -22,10 +21,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 file */ @@ -65,9 +68,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -76,9 +81,9 @@ error: H5Dclose(dset); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_file_create.c b/examples/h5dsm_file_create.c index 9d34dec..cbf8e8e 100644 --- a/examples/h5dsm_file_create.c +++ b/examples/h5dsm_file_create.c @@ -6,7 +6,6 @@ int main(int argc, char *argv[]) { hid_t file = -1, fapl = -1; (void)MPI_Init(&argc, &argv); - (void)daos_init(); if(argc != 3) PRINTF_ERROR("argc != 3\n"); @@ -15,10 +14,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; /* Create file */ @@ -31,9 +34,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -41,9 +46,9 @@ error: H5E_BEGIN_TRY { H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_file_open.c b/examples/h5dsm_file_open.c index 3a1d399..a0e377d 100644 --- a/examples/h5dsm_file_open.c +++ b/examples/h5dsm_file_open.c @@ -16,10 +16,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 */ @@ -40,8 +44,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); + (void)MPI_Finalize(); return 0; @@ -50,9 +57,9 @@ error: H5E_BEGIN_TRY { H5Fclose_ff(file, -1); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_group_create.c b/examples/h5dsm_group_create.c index e60be79..3a6ab97 100644 --- a/examples/h5dsm_group_create.c +++ b/examples/h5dsm_group_create.c @@ -7,7 +7,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"); @@ -16,10 +15,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 file */ @@ -47,9 +50,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -58,9 +63,9 @@ error: H5Gclose(grp); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_group_open.c b/examples/h5dsm_group_open.c index 3d5ad02..e8835a0 100644 --- a/examples/h5dsm_group_open.c +++ b/examples/h5dsm_group_open.c @@ -8,7 +8,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"); @@ -17,10 +16,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 */ @@ -49,9 +52,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -60,9 +65,9 @@ error: H5Gclose(grp); H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_link_exists.c b/examples/h5dsm_link_exists.c index 4b04acb..e6ba47b 100644 --- a/examples/h5dsm_link_exists.c +++ b/examples/h5dsm_link_exists.c @@ -9,7 +9,6 @@ int main(int argc, char *argv[]) { htri_t link_exists; (void)MPI_Init(&argc, &argv); - (void)daos_init(); if(argc < 4 || argc > 5) PRINTF_ERROR("argc must be 4 or 5\n"); @@ -18,10 +17,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 */ @@ -50,9 +53,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -60,9 +65,9 @@ error: H5E_BEGIN_TRY { H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_slink_create.c b/examples/h5dsm_slink_create.c index b1919f5..6e8fa70 100644 --- a/examples/h5dsm_slink_create.c +++ b/examples/h5dsm_slink_create.c @@ -7,7 +7,6 @@ int main(int argc, char *argv[]) { H5VL_daosm_snap_id_t snap_id; (void)MPI_Init(&argc, &argv); - (void)daos_init(); if(argc < 5 || argc > 6) PRINTF_ERROR("argc must be 5 or 6\n"); @@ -16,10 +15,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 file */ @@ -45,9 +48,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -55,9 +60,9 @@ error: H5E_BEGIN_TRY { H5Fclose(file); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } diff --git a/examples/h5dsm_ttconv.c b/examples/h5dsm_ttconv.c index 1fb2af4..6aa927e 100644 --- a/examples/h5dsm_ttconv.c +++ b/examples/h5dsm_ttconv.c @@ -32,7 +32,6 @@ int main(int argc, char *argv[]) { int i; (void)MPI_Init(&argc, &argv); - (void)daos_init(); /* Seed random number generator */ srand(time(NULL)); @@ -44,10 +43,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; /* Create file */ @@ -885,9 +888,11 @@ int main(int argc, char *argv[]) { if(H5Pclose(fapl) < 0) ERROR; + if(H5VLdaosm_term() < 0) + ERROR; + printf("Success\n"); - (void)daos_fini(); (void)MPI_Finalize(); return 0; @@ -913,9 +918,9 @@ error: H5Tclose(mem_type_c); H5Sclose(space); H5Pclose(fapl); + H5VLdaosm_term(); } H5E_END_TRY; - (void)daos_fini(); (void)MPI_Finalize(); return 1; } |