diff options
-rw-r--r-- | src/H5FDmpio.c | 27 | ||||
-rw-r--r-- | src/H5FDsec2.c | 1 | ||||
-rw-r--r-- | src/H5FDsplitter.c | 1 |
3 files changed, 14 insertions, 15 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 67b01f1..c72578d 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -214,21 +214,22 @@ H5FD_mpio_init(void) FUNC_ENTER_NOAPI(H5I_INVALID_HID) /* Register the MPI-IO VFD, if it isn't already */ - if (H5I_VFL != H5I_get_type(H5FD_MPIO_g)) + if (H5I_VFL != H5I_get_type(H5FD_MPIO_g)) { H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g, sizeof(H5FD_class_t), FALSE); - /* Check if MPI driver has been loaded dynamically */ - env = HDgetenv(HDF5_DRIVER); - if (env && !HDstrcmp(env, "mpio")) { - int mpi_initialized = 0; - - /* Initialize MPI if not already initialized */ - if (MPI_SUCCESS != MPI_Initialized(&mpi_initialized)) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, H5I_INVALID_HID, "can't check if MPI is initialized") - if (!mpi_initialized) { - if (MPI_SUCCESS != MPI_Init(NULL, NULL)) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't initialize MPI") - H5FD_mpi_self_initialized = TRUE; + /* Check if MPI driver has been loaded dynamically */ + env = HDgetenv(HDF5_DRIVER); + if (env && !HDstrcmp(env, "mpio")) { + int mpi_initialized = 0; + + /* Initialize MPI if not already initialized */ + if (MPI_SUCCESS != MPI_Initialized(&mpi_initialized)) + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, H5I_INVALID_HID, "can't check if MPI is initialized") + if (!mpi_initialized) { + if (MPI_SUCCESS != MPI_Init(NULL, NULL)) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't initialize MPI") + H5FD_mpi_self_initialized = TRUE; + } } } diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 77cc58e..46f5fd4 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -1080,7 +1080,6 @@ H5FD__sec2_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT /* Sanity checks */ HDassert(file); - HDassert(H5FD_SEC2 == file->pub.driver_id); switch (op_code) { /* Unknown op code */ diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index b64a2b5..31438cd 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -1316,7 +1316,6 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void * /* Sanity checks */ HDassert(file); - HDassert(H5FD_SPLITTER == file->pub.driver_id); switch (op_code) { /* Unknown op code */ |