1
1
- Check for icc-8.1 segfaulting with varargs.
  - Add check for size of REAL*4,8,16 types and purge,
    if smaller
  - Fix configure-output with regard to checking for c-types 
    for the REAL*-types.

This commit was SVN r5661.
Этот коммит содержится в:
Rainer Keller 2005-05-10 09:09:04 +00:00
родитель 6a565b3fb7
Коммит e06f0723a8
4 изменённых файлов: 79 добавлений и 4 удалений

Просмотреть файл

@ -47,6 +47,7 @@ sinclude(config/ompi_config_asm.m4)
sinclude(config/ompi_case_sensitive_fs_setup.m4)
sinclude(config/ompi_check_optflags.m4)
sinclude(config/ompi_check_icc.m4)
sinclude(config/ompi_config_subdir.m4)
sinclude(config/ompi_config_subdir_args.m4)
sinclude(config/ompi_configure_options.m4)

57
config/ompi_check_icc.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,57 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
dnl All rights reserved.
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
dnl All rights reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OMPI_CHECK_ICC_VARARGS],[
dnl
dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since
dnl va_start was miscompiled...
dnl
AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
AC_TRY_RUN([
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
void func (int c, char * f, ...)
{
va_list arglist;
va_start (arglist, f);
/* vprintf (f, arglist); */
va_end (arglist);
}
int main (int argc, char * argv[])
{
FILE *f;
func (4711, "Help %d [%s]\n", 10, "ten");
f=fopen ("conftestval", "w");
if (!f) exit (1);
return 0;
}
],[ompi_ac_icc_varargs=`test -f conftestval`],[ompi_ac_icc_varargs=1],[ompi_ac_icc_varargs=1])
if test "$ompi_ac_icc_varargs" = "1"; then
AC_MSG_WARN([*** Problem running configure test!])
AC_MSG_WARN([*** Your icc-8.1 compiler seems to miscompile va_start!])
AC_MSG_WARN([*** Please upgrade compiler to at least version 8.1.027])
AC_MSG_ERROR([*** Cannot continue.])
fi
AC_MSG_RESULT([yes])
/bin/rm -f conftest*])dnl

Просмотреть файл

@ -24,7 +24,7 @@ target_name="$2"
types="$3"
# Announce
AC_MSG_CHECKING([for C type corresopnding to $msg])
AC_MSG_CHECKING([for C type corresponding to $msg])
# Put a default answer in there
str="MPI_$target_name='not found'"

Просмотреть файл

@ -272,6 +272,10 @@ if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save"
fi
if test "x$CC" = "xicc"; then
OMPI_CHECK_ICC_VARARGS
fi
# If we want the profiling layer:
# - If the C compiler has weak symbols, use those.
# - If not, then set to compile the code again with #define's in a
@ -441,6 +445,19 @@ else
OMPI_F77_GET_SIZEOF(INTEGER*16, OMPI_SIZEOF_FORTRAN_INTEGER16)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*16)
fi
if test "$OMPI_HAVE_FORTRAN_REAL4" = "1" ; then
OMPI_F77_GET_SIZEOF(REAL*4, OMPI_SIZEOF_FORTRAN_REAL4)
OMPI_F77_PURGE_UNSUPPORTED_KIND(REAL*4)
fi
if test "$OMPI_HAVE_FORTRAN_REAL8" = "1" ; then
OMPI_F77_GET_SIZEOF(REAL*8, OMPI_SIZEOF_FORTRAN_REAL8)
OMPI_F77_PURGE_UNSUPPORTED_KIND(REAL*8)
fi
if test "$OMPI_HAVE_FORTRAN_REAL16" = "1" ; then
OMPI_F77_GET_SIZEOF(REAL*16, OMPI_SIZEOF_FORTRAN_REAL16)
OMPI_F77_PURGE_UNSUPPORTED_KIND(REAL*16)
fi
OMPI_F77_GET_ALIGNMENT(LOGICAL, OMPI_ALIGNMENT_FORTRAN_LOGICAL)
OMPI_F77_GET_ALIGNMENT(INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER)
OMPI_F77_GET_ALIGNMENT(REAL, OMPI_ALIGNMENT_FORTRAN_REAL)
@ -1203,21 +1220,21 @@ if test "$OMPI_F77" != "none"; then
float double long:double)
if test "$OMPI_HAVE_FORTRAN_REAL4" = "1"; then
OMPI_SIZEOF_FORTRAN_REAL4=4
OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL4,
OMPI_FIND_TYPE(Fortran REAL4, FORTRAN_REAL4,
float double long:double)
else
MPI_FORTRAN_REAL4_TYPE=float
fi
if test "$OMPI_HAVE_FORTRAN_REAL8" = "1"; then
OMPI_SIZEOF_FORTRAN_REAL8=8
OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL8,
OMPI_FIND_TYPE(Fortran REAL8, FORTRAN_REAL8,
float double long:double)
else
MPI_FORTRAN_REAL8_TYPE=float
fi
if test "$OMPI_HAVE_FORTRAN_REAL16" = "1"; then
OMPI_SIZEOF_FORTRAN_REAL16=16
OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL16,
OMPI_FIND_TYPE(Fortran REAL16, FORTRAN_REAL16,
float double long:double)
else
MPI_FORTRAN_REAL16_TYPE=float