[svn-r8009] Purpose:

Bug fix

Description:
    Add special-case handling to floating-point conversion tests to avoid
problems with denormalized values on Cray T3E & T90 platforms.  (Still not
working on Cray SV1, but at least it's closer).

Solution:
    Detect denormalized values and don't try to operate on them on the Crays.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray T3E (hubble.cray.com)
    Cray T90 (gypsy.cray.com)
This commit is contained in:
Quincey Koziol 2003-12-31 15:36:37 -05:00
parent b0b020d422
commit 4da7b1ee9b
8 changed files with 614 additions and 635 deletions

View File

@ -136,6 +136,10 @@ esac
# `ll' or if the format would be `%qd' set it to `q'.
#hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
# Hard set the flag to indicate that converting denormalized floating-point
# values doesn't work.
hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
# The default Fortran 90 compiler
#

View File

@ -137,6 +137,10 @@ ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
# `ll' or if the format would be `%qd' set it to `q'.
#hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
# Hard set the flag to indicate that converting denormalized floating-point
# values doesn't work.
hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
# The default Fortran 90 compiler
#

View File

@ -137,6 +137,10 @@ esac
# `ll' or if the format would be `%qd' set it to `q'.
#hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
# Hard set the flag to indicate that converting denormalized floating-point
# values doesn't work.
hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
# The default Fortran 90 compiler
#

26
configure vendored
View File

@ -30548,7 +30548,9 @@ rm -f conftest.$ac_objext conftest.$ac_ext
for ac_func in fork gethostname getpwuid getrusage
for ac_func in fork frexpf frexpl gethostname getpwuid getrusage
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@ -33239,6 +33241,28 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking if converting denormalized floating-point values is possible" >&5
echo $ECHO_N "checking if converting denormalized floating-point values is possible... $ECHO_C" >&6
if test "${hdf5_cv_convert_denormal_float+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
hdf5_cv_convert_denormal_float=yes
fi
if test ${hdf5_cv_convert_denormal_float} = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define CONVERT_DENORMAL_FLOAT 1
_ACEOF
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`"

View File

@ -1647,7 +1647,7 @@ AC_MSG_RESULT([no]))
dnl ----------------------------------------------------------------------
dnl Check for functions.
dnl
AC_CHECK_FUNCS(fork gethostname getpwuid getrusage)
AC_CHECK_FUNCS(fork frexpf frexpl gethostname getpwuid getrusage)
AC_CHECK_FUNCS(BSDgettimeofday longjmp setsysinfo sigaction)
AC_CHECK_FUNCS(signal snprintf vsnprintf strdup system waitpid)
@ -2363,6 +2363,23 @@ if test 1 = 2; then
[Define if shared writing must be disabled (CodeWarrior only)])
fi
dnl ----------------------------------------------------------------------
dnl Set the flag to indicate that the machine can handle converting
dnl denormalized floating-point values.
dnl (This flag should be set for all machines, except for the Crays, where
dnl the cache value is set in it's config file)
dnl
AC_MSG_CHECKING([if converting denormalized floating-point values is possible])
AC_CACHE_VAL([hdf5_cv_convert_denormal_float], [hdf5_cv_convert_denormal_float=yes])
if test ${hdf5_cv_convert_denormal_float} = "yes"; then
AC_DEFINE([CONVERT_DENORMAL_FLOAT], [1],
[Define if your system can handle converting denormalized floating-point values.])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl ----------------------------------------------------------------------
dnl Set some variables for general configuration information to be saved
dnl and installed with the libraries.

View File

@ -1,5 +1,9 @@
/* src/H5config.h.in. Generated from configure.in by autoheader. */
/* Define if your system can handle converting denormalized floating-point
values. */
#undef CONVERT_DENORMAL_FLOAT
/* Define if `dev_t' is a scalar */
#undef DEV_T_IS_SCALAR
@ -39,6 +43,12 @@
/* Define if we want flexible parallel HDF5 support */
#undef HAVE_FPHDF5
/* Define to 1 if you have the `frexpf' function. */
#undef HAVE_FREXPF
/* Define to 1 if you have the `frexpl' function. */
#undef HAVE_FREXPL
/* Define to 1 if you have the `fseek64' function. */
#undef HAVE_FSEEK64

View File

@ -605,6 +605,17 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDfree(M) free(M)
#define HDfreopen(S,M,F) freopen(S,M,F)
#define HDfrexp(X,N) frexp(X,N)
/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
#ifdef H5_HAVE_FREXPF
#define HDfrexpf(X,N) frexpf(X,N)
#else /* H5_HAVE_FREXPF */
#define HDfrexpf(X,N) frexp(X,N)
#endif /* H5_HAVE_FREXPF */
#ifdef H5_HAVE_FREXPL
#define HDfrexpl(X,N) frexpl(X,N)
#else /* H5_HAVE_FREXPL */
#define HDfrexpl(X,N) frexp(X,N)
#endif /* H5_HAVE_FREXPL */
/* fscanf() variable arguments */
#define HDfseek(F,O,W) fseek(F,O,W)
#define HDfsetpos(F,P) fsetpos(F,P)

File diff suppressed because it is too large Load Diff