From ebc1651425e6052824bae82b2a8016f9a8af4ff2 Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Tue, 31 Oct 2023 08:05:40 -0500 Subject: Fix parallel driver check in h5_fixname_real (#3808) --- test/h5test.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/h5test.c b/test/h5test.c index 3046375..ef580cf 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -457,7 +457,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu const char *suffix = _suffix; size_t i, j; hid_t driver = H5I_INVALID_HID; - int isppdriver = 0; /* if the driver is MPI parallel */ + bool isppdriver = false; /* if the driver is MPI parallel */ if (!base_name || !fullname || size < 1) return NULL; @@ -516,10 +516,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu } } - /* Must first check fapl is not H5P_DEFAULT (-1) because H5FD_XXX - * could be of value -1 if it is not defined. - */ - isppdriver = ((H5P_DEFAULT != fapl) || driver_env_var) && (H5FD_MPIO == driver); + if (h5_using_parallel_driver(fapl, &isppdriver) < 0) + return NULL; /* Check HDF5_NOCLEANUP environment setting. * (The #ifdef is needed to prevent compile failure in case MPI is not -- cgit v0.12