From 93730771fd599fde7b57fb78ad346d655602cb6a Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Wed, 28 Aug 2019 17:01:51 +0000 Subject: [PATCH] add some verbose messages on finalize routines for DAOS and DFS drivers. Signed-off-by: Mohamad Chaarawi --- README_DAOS | 2 +- src/aiori-DAOS.c | 8 +++++++- src/aiori-DFS.c | 12 +++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README_DAOS b/README_DAOS index 33d9464..9467989 100644 --- a/README_DAOS +++ b/README_DAOS @@ -3,7 +3,7 @@ Building The DAOS library must be installed on the system. -./bootsrap +./bootstrap ./configure --prefix=iorInstallDir --with-daos=DIR --with-cart=DIR One must specify "--with-daos=/path/to/daos/install and --with-cart". When that diff --git a/src/aiori-DAOS.c b/src/aiori-DAOS.c index 870aa68..16d386a 100644 --- a/src/aiori-DAOS.c +++ b/src/aiori-DAOS.c @@ -306,7 +306,7 @@ DAOS_Fini() if (rank == 0) { uuid_t uuid; - INFO(VERBOSE_1, "Destroying Container %s", o.cont); + INFO(VERBOSE_1, "Destroying DAOS Container %s", o.cont); uuid_parse(o.cont, uuid); rc = daos_cont_destroy(poh, uuid, 1, NULL); } @@ -319,12 +319,18 @@ DAOS_Fini() } } + if (rank == 0) + INFO(VERBOSE_1, "Disconnecting from DAOS POOL.."); + rc = daos_pool_disconnect(poh, NULL); DCHECK(rc, "Failed to disconnect from pool %s", o.pool); MPI_CHECK(MPI_Barrier(MPI_COMM_WORLD), "barrier error"); usleep(20000 * rank); + if (rank == 0) + INFO(VERBOSE_1, "Finalizing DAOS.."); + rc = daos_fini(); DCHECK(rc, "Failed to finalize daos"); diff --git a/src/aiori-DFS.c b/src/aiori-DFS.c index ef89f41..17a344d 100755 --- a/src/aiori-DFS.c +++ b/src/aiori-DFS.c @@ -140,7 +140,7 @@ ior_aiori_t dfs_aiori = { do { \ int _rc = (rc); \ \ - if (_rc < 0) { \ + if (_rc != 0) { \ fprintf(stderr, "ERROR (%s:%d): %d: %d: " \ format"\n", __FILE__, __LINE__, rank, _rc, \ ##__VA_ARGS__); \ @@ -153,7 +153,7 @@ do { \ do { \ int _rc = (rc); \ \ - if (_rc < 0) { \ + if (_rc != 0) { \ fprintf(stderr, "ERROR (%s:%d): %d: %d: " \ format"\n", __FILE__, __LINE__, rank, _rc, \ ##__VA_ARGS__); \ @@ -470,12 +470,18 @@ DFS_Finalize() if (rc) DCHECK(rc, "Failed to destroy container %s (%d)", o.cont, rc); - daos_pool_disconnect(poh, NULL); + if (rank == 0 && verbose >= VERBOSE_1) + printf("Disconnecting from DAOS POOL\n"); + + rc = daos_pool_disconnect(poh, NULL); DCHECK(rc, "Failed to disconnect from pool"); MPI_CHECK(MPI_Barrier(MPI_COMM_WORLD), "barrier error"); usleep(20000 * rank); + if (rank == 0 && verbose >= VERBOSE_1) + printf("Finalizing DAOS..\n"); + rc = daos_fini(); DCHECK(rc, "Failed to finalize DAOS"); }