summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorSongyu Lu <songyulu@hdfgroup.org>2019-01-08 02:28:37 (GMT)
committerSongyu Lu <songyulu@hdfgroup.org>2019-01-08 02:28:37 (GMT)
commit75c105a2a442b9a0cd42d7aa1e95da55ae8e4804 (patch)
tree717122a86f3eb3aa679de88d25447dd0ce663b11 /config/cmake
parent7bf6d847ae36940f1b1147820356795c7764dbeb (diff)
downloadhdf5-75c105a2a442b9a0cd42d7aa1e95da55ae8e4804.zip
hdf5-75c105a2a442b9a0cd42d7aa1e95da55ae8e4804.tar.gz
hdf5-75c105a2a442b9a0cd42d7aa1e95da55ae8e4804.tar.bz2
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/cmake')
-rw-r--r--config/cmake/ConfigureChecks.cmake5
-rw-r--r--config/cmake/ConversionTests.c24
-rw-r--r--config/cmake/H5pubconf.h.in3
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 c42d93a..dfc6677 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@