diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-01-02 16:55:37 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-01-02 16:55:37 (GMT) |
commit | 602bdd1c6ae61f845d135a5c98a90de11e8b06a7 (patch) | |
tree | c734865bb209b2eeb27e8771bdf9cea3e7d6a7c2 /src/H5FDmpio.c | |
parent | 3e445ef12939610ef8c42bff38760ac1a9f3fca6 (diff) | |
parent | af21ce90d9465e805807f17da21f93e64e03492a (diff) | |
download | hdf5-602bdd1c6ae61f845d135a5c98a90de11e8b06a7.zip hdf5-602bdd1c6ae61f845d135a5c98a90de11e8b06a7.tar.gz hdf5-602bdd1c6ae61f845d135a5c98a90de11e8b06a7.tar.bz2 |
Merge branch 'develop' into parallel_vds_develop
Diffstat (limited to 'src/H5FDmpio.c')
-rw-r--r-- | src/H5FDmpio.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 47e3e0e..0b58ebe 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -206,15 +206,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5FD_mpio_init + * Function: H5FD_mpio_init * - * Purpose: Initialize this driver by registering the driver with the - * library. + * Purpose: Initialize this driver by registering the driver with the + * library. * - * Return: Success: The driver ID for the mpio driver. - * Failure: Negative. + * Return: Success: The driver ID for the mpio driver + * Failure: H5I_INVALID_HID * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, August 5, 1999 * *------------------------------------------------------------------------- @@ -225,10 +225,10 @@ H5FD_mpio_init(void) #ifdef H5FDmpio_DEBUG static int H5FD_mpio_Debug_inited = 0; #endif /* H5FDmpio_DEBUG */ - const char *s; /* String for environment variables */ - hid_t ret_value; /* Return value */ + const char *s; /* String for environment variables */ + hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + 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)) @@ -236,8 +236,10 @@ H5FD_mpio_init(void) /* Allow MPI buf-and-file-type optimizations? */ s = HDgetenv("HDF5_MPI_OPT_TYPES"); - if(s && HDisdigit(*s)) - H5FD_mpi_opt_types_g = (hbool_t)HDstrtol(s, NULL, 0); + if(s && HDisdigit(*s)) { + long env_val = HDstrtol(s, NULL, 0); + H5FD_mpi_opt_types_g = (0 == env_val) ? FALSE : TRUE; + } #ifdef H5FDmpio_DEBUG if(!H5FD_mpio_Debug_inited) { @@ -245,12 +247,12 @@ H5FD_mpio_init(void) s = HDgetenv("H5FD_mpio_Debug"); if(s) { /* Set debug mask */ - while(*s) { - H5FD_mpio_Debug[(int)*s]++; - s++; - } /* end while */ + while(*s) { + H5FD_mpio_Debug[(int)*s]++; + s++; + } /* end while */ } /* end if */ - H5FD_mpio_Debug_inited++; + H5FD_mpio_Debug_inited++; } /* end if */ #endif /* H5FDmpio_DEBUG */ @@ -338,6 +340,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator") /* Initialize driver specific properties */ + HDmemset(&fa, 0, sizeof(H5FD_mpio_fapl_t)); fa.comm = comm; fa.info = info; |