diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2017-03-15 15:27:10 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2017-03-15 15:27:10 (GMT) |
commit | f8d952f9233b3eb8231460dbd2a8b2212d8e3899 (patch) | |
tree | 93dab3d2435cc8cd9af45878cb2dd41bd34ea969 /src | |
parent | 1da81639f6352598dd6a00f2dd66739e69c1aba9 (diff) | |
download | hdf5-f8d952f9233b3eb8231460dbd2a8b2212d8e3899.zip hdf5-f8d952f9233b3eb8231460dbd2a8b2212d8e3899.tar.gz hdf5-f8d952f9233b3eb8231460dbd2a8b2212d8e3899.tar.bz2 |
Modify H5VL_daosm_init to simply return success if it has already been
called, allowing it to be called multiple times without side effects.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5VLdaosm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5VLdaosm.c b/src/H5VLdaosm.c index a7343b8..b11e49a 100644 --- a/src/H5VLdaosm.c +++ b/src/H5VLdaosm.c @@ -310,13 +310,13 @@ H5VLdaosm_init(MPI_Comm pool_comm, uuid_t pool_uuid, char *pool_grp) FUNC_ENTER_API(FAIL) + /* Check if already initialized */ + if(H5VL_DAOSM_g >= 0) + HGOTO_DONE(SUCCEED) + /* Initialize daos */ (void)daos_init(); - /* Register the DAOS-M VOL, if it isn't already */ - if(H5VL_daosm_init() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize FF DAOS-M VOL plugin") - /* Obtain the process rank and size from the communicator attached to the * fapl ID */ MPI_Comm_rank(pool_comm, &pool_rank); @@ -416,6 +416,10 @@ H5VLdaosm_init(MPI_Comm pool_comm, uuid_t pool_uuid, char *pool_grp) HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, FAIL, "can't get local pool handle: %d", ret) } /* end else */ + /* Register the DAOS-M VOL, if it isn't already */ + if(H5VL_daosm_init() < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize FF DAOS-M VOL plugin") + done: H5MM_xfree(gh_buf_dyn); |