From 0ea42d66677ffac366aec707fa448793ac5be6b6 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 27 Mar 2015 15:28:03 -0500 Subject: [svn-r26624] Description: Bring r26584 from trunk to 1.8 branch: Bring r26485 from the autotools_rework branch to the trunk: Remove the ULONG_TO_FLOAT_ACCURATE macro/define, we no longer support the Sandia system where it was necessary. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days) --- config/cmake/ConfigureChecks.cmake | 9 ----- config/cmake/ConversionTests.c | 32 ---------------- config/cmake/H5pubconf.h.in | 4 -- configure | 77 +------------------------------------- configure.ac | 49 ------------------------ src/H5Tpkg.h | 2 +- src/H5config.h.in | 4 -- test/dt_arith.c | 2 - 8 files changed, 2 insertions(+), 177 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index eaf2431..74fbd28 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -260,15 +260,6 @@ ENDMACRO (H5MiscConversionTest) # ---------------------------------------------------------------------- # Set the flag to indicate that the machine can accurately convert -# 'unsigned long' to 'float' values. -# (This flag should be set for all machines, except for Pathscale compiler -# on Sandia's Linux machine where the compiler interprets 'unsigned long' -# values as negative when the first bit of 'unsigned long' is on during -# the conversion to float.) -# -H5ConversionTests (H5_ULONG_TO_FLOAT_ACCURATE "Checking IF accurately converting unsigned long to float values") -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine can accurately convert # 'unsigned (long) long' values to 'float' and 'double' values. # (This flag should be set for all machines, except for the SGIs) and Solaris # 64-bit machines, where the short program below tests if round-up is diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index 7238af0..e157909 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -410,38 +410,6 @@ done: #endif -#ifdef H5_ULONG_TO_FLOAT_ACCURATE_TEST - -int main(void) -{ - int ret = 0; - unsigned long l1; - unsigned long l2; - unsigned long l3; - float f1; - float f2; - float f3; - - - if(sizeof(unsigned long)==8) { - l1 = 0xffffffffffffffffUL; - l2 = 0xffffffffffff0000UL; - l3 = 0xf000000000000000UL; - - f1 = (float)l1; - f2 = (float)l2; - f3 = (float)l3; - - if((f1 < 0) || (f2 < 0) || (f3 < 0)) - ret = 1; - } - -done: - exit(ret); -} - -#endif - #ifdef H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_TEST #include diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index f0d7590..4b955be 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -669,10 +669,6 @@ correct precision. */ #cmakedefine H5_ULLONG_TO_LDOUBLE_PRECISION @H5_ULLONG_TO_LDOUBLE_PRECISION@ -/* Define if your system accurately converting unsigned long to float values. - */ -#cmakedefine H5_ULONG_TO_FLOAT_ACCURATE @H5_ULONG_TO_FLOAT_ACCURATE@ - /* Define if your system can accurately convert unsigned (long) long values to floating-point values. */ #cmakedefine H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE @H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE@ diff --git a/configure b/configure index b4c06fd..b92edec 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 26585 2015-03-25 19:30:27Z koziol . +# From configure.ac Id: configure.ac 26588 2015-03-25 19:56:23Z koziol . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for HDF5 1.8.15-snap13. # @@ -28123,81 +28123,6 @@ $as_echo "no" >&6; } ;; esac -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## 'unsigned long' to 'float' values. -## (This flag should be set for all machines, except for Pathscale compiler -## on Sandia's Linux machine where the compiler interprets 'unsigned long' -## values as negative when the first bit of 'unsigned long' is on during -## the conversion to float.) -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long to float values" >&5 -$as_echo_n "checking if accurately converting unsigned long to float values... " >&6; } - -if ${hdf5_cv_ulong_to_float_accurate+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int main(void) - { - int ret = 0; - unsigned long l1; - unsigned long l2; - unsigned long l3; - float f1; - float f2; - float f3; - - - if(sizeof(unsigned long)==8) { - l1 = 0xffffffffffffffffUL; - l2 = 0xffffffffffff0000UL; - l3 = 0xf000000000000000UL; - - f1 = (float)l1; - f2 = (float)l2; - f3 = (float)l3; - - if((f1 < 0) || (f2 < 0) || (f3 < 0)) - ret = 1; - } - -done: - exit(ret); - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_ulong_to_float_accurate=yes -else - hdf5_cv_ulong_to_float_accurate=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - - -if test ${hdf5_cv_ulong_to_float_accurate} = "yes"; then - -$as_echo "#define ULONG_TO_FLOAT_ACCURATE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine can accurately convert diff --git a/configure.ac b/configure.ac index 60876f5..0faf468 100644 --- a/configure.ac +++ b/configure.ac @@ -2557,55 +2557,6 @@ case "`uname`" in ;; esac -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## 'unsigned long' to 'float' values. -## (This flag should be set for all machines, except for Pathscale compiler -## on Sandia's Linux machine where the compiler interprets 'unsigned long' -## values as negative when the first bit of 'unsigned long' is on during -## the conversion to float.) -## -AC_MSG_CHECKING([if accurately converting unsigned long to float values]) - -AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], - [AC_TRY_RUN([ - int main(void) - { - int ret = 0; - unsigned long l1; - unsigned long l2; - unsigned long l3; - float f1; - float f2; - float f3; - - - if(sizeof(unsigned long)==8) { - l1 = 0xffffffffffffffffUL; - l2 = 0xffffffffffff0000UL; - l3 = 0xf000000000000000UL; - - f1 = (float)l1; - f2 = (float)l2; - f3 = (float)l3; - - if((f1 < 0) || (f2 < 0) || (f3 < 0)) - ret = 1; - } - -done: - exit(ret); - } - ], [hdf5_cv_ulong_to_float_accurate=yes], [hdf5_cv_ulong_to_float_accurate=no],)]) - -if test ${hdf5_cv_ulong_to_float_accurate} = "yes"; then - AC_DEFINE([ULONG_TO_FLOAT_ACCURATE], [1], - [Define if your system accurately converting unsigned long to float values.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine can accurately convert diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 3b56ac4..24debe9 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -127,7 +127,7 @@ /* Define an internal macro for converting unsigned long to float. * Pathscale compiler on Sandia's Linux machine has some problem. * 64-bit Solaris does different rounding. */ -#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FLOAT_ACCURATE && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \ +#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \ (!H5_WANT_DATA_ACCURACY) #define H5T_CONV_INTERNAL_ULONG_FLT 1 #endif diff --git a/src/H5config.h.in b/src/H5config.h.in index 00fb8be..67c2bb0 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -580,10 +580,6 @@ correct precision. */ #undef ULLONG_TO_LDOUBLE_PRECISION -/* Define if your system accurately converting unsigned long to float values. - */ -#undef ULONG_TO_FLOAT_ACCURATE - /* Define if your system can accurately convert unsigned (long) long values to floating-point values. */ #undef ULONG_TO_FP_BOTTOM_BIT_ACCURATE diff --git a/test/dt_arith.c b/test/dt_arith.c index 7bf203f..b90169f 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5141,9 +5141,7 @@ run_int_fp_conv(const char *name) nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_FLOAT); nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_DOUBLE); -#if H5_ULONG_TO_FLOAT_ACCURATE nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_FLOAT); -#endif nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_DOUBLE); #endif -- cgit v0.12