diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2006-01-09 05:14:54 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2006-01-09 05:14:54 (GMT) |
commit | 6cda54bdec4071715935b8195a259237285813b0 (patch) | |
tree | 291f706205a76daf5aa806da8f6d5d4435d225ae /test/h5test.c | |
parent | c8f5be4e3cc18ac9883dcd2a4ed3591ca978461c (diff) | |
download | hdf5-6cda54bdec4071715935b8195a259237285813b0.zip hdf5-6cda54bdec4071715935b8195a259237285813b0.tar.gz hdf5-6cda54bdec4071715935b8195a259237285813b0.tar.bz2 |
[svn-r11871] Purpose:
Bug fix.
Description:
getenv_all will be called even when it is NOT an MPI application.
Solution:
Moved the use of getenv_all("HDF5_NOCLEANUP") to fix_name so that it will
be invoked only if a parallel driver is used.
Platforms tested:
hand tested in copper.
Diffstat (limited to 'test/h5test.c')
-rw-r--r-- | test/h5test.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/h5test.c b/test/h5test.c index aeeb58f..40d9210 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -145,13 +145,7 @@ h5_cleanup(const char *base_name[], hid_t fapl) int retval=0; hid_t driver; - if (GetTestCleanup() && -#ifdef H5_HAVE_PARALLEL - !getenv_all(MPI_COMM_WORLD, 0, "HDF5_NOCLEANUP") -#else - !HDgetenv("HDF5_NOCLEANUP") -#endif - ){ + if (GetTestCleanup()){ for (i = 0; base_name[i]; i++) { if (h5_fixname(base_name[i], fapl, filename, sizeof(filename)) == NULL) continue; @@ -327,6 +321,11 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) prefix = HDF5_PARAPREFIX; #endif /* HDF5_PARAPREFIX */ } + + /* check NOCLEANUP environment setting. */ + if (getenv_all(MPI_COMM_WORLD, 0, "HDF5_NOCLEANUP")){ + SetTestNoCleanup(); + } #endif /* H5_HAVE_PARALLEL */ } else { /* @@ -339,6 +338,11 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) if (!prefix) prefix = HDF5_PREFIX; #endif /* HDF5_PREFIX */ + + /* check NOCLEANUP environment setting. */ + if (HDgetenv("HDF5_NOCLEANUP")){ + SetTestNoCleanup(); + } } /* Prepend the prefix value to the base name */ |