diff options
author | Ray Lu <songyulu@hdfgroup.org> | 2019-01-08 23:59:03 (GMT) |
---|---|---|
committer | Ray Lu <songyulu@hdfgroup.org> | 2019-01-08 23:59:03 (GMT) |
commit | 44a67451be8dfc4f7b2bede29f2b8bf865ac1787 (patch) | |
tree | 10bcf864079217940454c2abff7371bd58c349ba /config | |
parent | d3b107d1a42c26b2b94dc498b8f3ba0940bc60e4 (diff) | |
parent | b02de315b93ac29d2483a91d526b110a25073505 (diff) | |
download | hdf5-44a67451be8dfc4f7b2bede29f2b8bf865ac1787.zip hdf5-44a67451be8dfc4f7b2bede29f2b8bf865ac1787.tar.gz hdf5-44a67451be8dfc4f7b2bede29f2b8bf865ac1787.tar.bz2 |
Merge pull request #1450 in HDFFV/hdf5 from ~SONGYULU/hdf5_ray:TRILAB-98-dt_arith-and-cpp_testhdf5-tests to develop
* commit 'b02de315b93ac29d2483a91d526b110a25073505':
NNSA Tri-LabsTRILAB-98: Another two test cases out.
NNSA Tri-Labs TRILAB-98: Taking out a few more test cases.
NNSA Tri-Labs TRILAB-98 dt_arith and cpp_testhdf5 tests fail on sierra.llnl.gov: According to the group decision, simply provide a macro to disable some failing test cases on sierra (IBM power9 cpu). All failing cases involve long double data type.
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 5 | ||||
-rw-r--r-- | config/cmake/ConversionTests.c | 24 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 3 |
3 files changed, 32 insertions, 0 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 459346e..c1abeed 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -247,6 +247,11 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctl # H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") # ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# some long double values +# +H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values") +# ---------------------------------------------------------------------- # Check if pointer alignments are enforced # H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index c2748b2..6d597a0 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -287,3 +287,27 @@ main () #endif +#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int HDF_NO_UBSAN main(void) +{ + FILE *fp; + char cpu[64]; + + fp = popen("uname -m", "r"); + + fgets(cpu, sizeof(cpu)-1, fp); + + pclose(fp); + + if(strncmp(cpu, "ppc64le", 7) == 0) + return 0; + + return 1; +} + +#endif diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 1678466..a740df2 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -460,6 +460,9 @@ with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ +/* Define if your system is power6 and cannot convert some long double values. */ +#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@ |