summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-31 13:05:40 (GMT)
committerGitHub <noreply@github.com>2023-10-31 13:05:40 (GMT)
commitebc1651425e6052824bae82b2a8016f9a8af4ff2 (patch)
tree048b62ae076c1c7d5d3c33e8c5c048e7ad314ba6
parentea3b6fd12b4fb50c1d891e1408e99060b8afacd1 (diff)
downloadhdf5-ebc1651425e6052824bae82b2a8016f9a8af4ff2.zip
hdf5-ebc1651425e6052824bae82b2a8016f9a8af4ff2.tar.gz
hdf5-ebc1651425e6052824bae82b2a8016f9a8af4ff2.tar.bz2
Fix parallel driver check in h5_fixname_real (#3808)
-rw-r--r--test/h5test.c8
1 files 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