summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-01-06 14:52:25 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-01-06 14:52:25 (GMT)
commit16ec39276000b6e06e12dba66bce52e4dba5be04 (patch)
tree4a430d1b70af9b47a7ace1a140b27a9e5a0ec42b /test
parent63e69411fd5b98927b969594db2a18301cd6b6bd (diff)
downloadhdf5-16ec39276000b6e06e12dba66bce52e4dba5be04.zip
hdf5-16ec39276000b6e06e12dba66bce52e4dba5be04.tar.gz
hdf5-16ec39276000b6e06e12dba66bce52e4dba5be04.tar.bz2
[svn-r11866] Purpose:
bug fix 504 Description: testpar/t_mpi would hang if $HDF5_NOCLEANUP is set. E.g., % env HDF5_NOCLEANUP=yes mpirun -np 3 ./t_mpi This happened because the environment variables are not exported to all mpi processes by the mpirun command. So, some attempted to do cleanup while others don't and some hang waiting for others to act. Solution: Instead individual program checking getenv, they all just called h5_cleanup no matter. h5_cleanup now uses getenv_all to check the $HDF5_NOCLEANUP if it is in parallel mode. Platforms tested: h5committested, tested pp in heping too.
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c
index e2caea9..aeeb58f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -145,7 +145,13 @@ h5_cleanup(const char *base_name[], hid_t fapl)
int retval=0;
hid_t driver;
- if (!HDgetenv("HDF5_NOCLEANUP")) {
+ if (GetTestCleanup() &&
+#ifdef H5_HAVE_PARALLEL
+ !getenv_all(MPI_COMM_WORLD, 0, "HDF5_NOCLEANUP")
+#else
+ !HDgetenv("HDF5_NOCLEANUP")
+#endif
+ ){
for (i = 0; base_name[i]; i++) {
if (h5_fixname(base_name[i], fapl, filename, sizeof(filename)) == NULL)
continue;