1
1

Fix the fortran 90 checks in two ways:

- Make the F90 checks use the identical types to the F77 checks (e.g.,
  INTEGER*4, as opposed to potential selected_int_kind() equivalents)
- Comment out the F77 and F90 alignment check failure -- there is some
  confusion here; some vendors apparently told Craig R. yesterday that
  they change the alignments of types based on whether the instance is
  a standalone variable, in an array, or a member of a struct.  

More investigation is needed (and potentially clarification for MPI
users -- this could be quite problematic!), but this alignment test is
otherwise hosing the nightlies, so it needs to be taken out for the
moment.

This commit was SVN r9031.
Этот коммит содержится в:
Jeff Squyres 2006-02-14 13:05:37 +00:00
родитель 0e90bed329
Коммит 65161c1dfe
2 изменённых файлов: 39 добавлений и 35 удалений

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

@ -17,7 +17,7 @@ dnl
dnl $HEADER$
dnl
# OMPI_F90_CHECK(F90 type, F77 type, expected size, want range and precision)
# OMPI_F90_CHECK(Fortran type, expected size, want range and precision)
#----------------------------------------------------------------------------
# Check Fortran type/kind combinations, including:
# - whether compiler supports or not
@ -30,8 +30,8 @@ dnl
# types to search is a comma-seperated list of values
AC_DEFUN([OMPI_F90_CHECK], [
ofc_fortran_type="$1"
ofc_expected_size="$3"
ofc_want_range="$4"
ofc_expected_size="$2"
ofc_want_range="$3"
ofc_have_type=0
ofc_type_size=$ac_cv_sizeof_int
@ -71,19 +71,19 @@ AC_DEFUN([OMPI_F90_CHECK], [
else
# If this type has an F77 counterpart, see if it's
# supported.
[ofc_f77_have_type=$OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_])
[ofc_f77_have_type=$OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])
if test "$ofc_f77_have_type" = "0"; then
AC_MSG_WARN([*** Corresponding Fortran 77 type ($2) not supported])
AC_MSG_WARN([*** Corresponding Fortran 77 type ($1) not supported])
AC_MSG_WARN([*** Skipping Fortran 90 type ($1)])
else
# Check the size of this type against its F77 counterpart
[ofc_f77_sizeof=$OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_])
[ofc_f77_sizeof=$OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])
if test "$ofc_f77_sizeof" != ""; then
AC_MSG_CHECKING([if Fortran 77 and 90 type sizes match])
if test "$ofc_f77_sizeof" != "$ofc_type_size"; then
AC_MSG_RESULT([no])
AC_MSG_WARN([*** Fortran 77 size for $2 ($ofc_f77_sizeof) does not match])
AC_MSG_WARN([*** Fortran 77 size for $1 ($ofc_f77_sizeof) does not match])
AC_MSG_WARN([*** Fortran 90 size for $1 ($ofc_type_size)])
AC_MSG_ERROR([*** Cannot continue])
else
@ -94,14 +94,18 @@ AC_DEFUN([OMPI_F90_CHECK], [
# Get the alignment of the type and check against its F77
# counterpart
OMPI_F90_GET_ALIGNMENT([$1], [ofc_type_alignment])
ofc_f77_alignment=$[OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_])
ofc_f77_alignment=$[OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])
if test "$ofc_f77_alignment" != ""; then
AC_MSG_CHECKING([if Fortran 77 and 90 type alignments match])
if test "$ofc_f77_alignment" != "$ofc_type_alignment"; then
AC_MSG_RESULT([no])
AC_MSG_WARN([*** Fortran 77 alignment for $2 ($ofc_f77_alignment) does not match])
AC_MSG_WARN([*** Fortran 77 alignment for $1 ($ofc_f77_alignment) does not match])
AC_MSG_WARN([*** Fortran 90 alignment for $1 ($ofc_type_alignment)])
AC_MSG_ERROR([*** Cannot continue])
# JMS Commented out for now so that a) people can continue developing
# with f90, b) we stop breaking "make dist", and c) we can find out
# the Real Deal from Fortran compiler vendors.
# AC_MSG_ERROR([*** Cannot continue])
AC_MSG_WARN([*** OMPI-F90-CHECK macro needs to be updated!])
else
AC_MSG_RESULT([yes])
fi
@ -144,14 +148,14 @@ AC_DEFUN([OMPI_F90_CHECK], [
# AC_DEFINE_UNQUOTED), autoheader won't put them in the
# AC_CONFIG_HEADER (or AM_CONFIG_HEADER, in our case).
AC_DEFINE_UNQUOTED([OMPI_HAVE_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
AC_DEFINE_UNQUOTED([OMPI_HAVE_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
[$ofc_have_type],
[Whether we have Fortran 90 $ofc_type_name or not])
AS_IF([test "$ofc_want_range" != ""],
[AC_DEFINE_UNQUOTED([OMPI_PRECISION_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
[AC_DEFINE_UNQUOTED([OMPI_PRECISION_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
[$ofc_type_precision],
[Precision of Fortran 90 $ofc_type_name])
AC_DEFINE_UNQUOTED([OMPI_RANGE_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$2], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
AC_DEFINE_UNQUOTED([OMPI_RANGE_F90_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
[$ofc_type_range],
[Range of Fortran 90 $ofc_type_name])], [])

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

@ -569,34 +569,34 @@ OMPI_F90_RKINDS=""
OMPI_F90_CKINDS=""
# LOGICAL and friends
OMPI_F90_CHECK([logical], [LOGICAL])
OMPI_F90_CHECK([logical(selected_int_kind(2))], [LOGICAL*1], [1])
OMPI_F90_CHECK([logical(selected_int_kind(4))], [LOGICAL*2], [2])
OMPI_F90_CHECK([logical(selected_int_kind(9))], [LOGICAL*4], [4])
OMPI_F90_CHECK([logical(selected_int_kind(18))], [LOGICAL*8], [8])
OMPI_F90_CHECK([logical(selected_int_kind(19))], [LOGICAL*16], [16])
OMPI_F90_CHECK([LOGICAL])
OMPI_F90_CHECK([LOGICAL*1], [1])
OMPI_F90_CHECK([LOGICAL*2], [2])
OMPI_F90_CHECK([LOGICAL*4], [4])
OMPI_F90_CHECK([LOGICAL*8], [8])
OMPI_F90_CHECK([LOGICAL*16], [16])
# INTEGER and friends
OMPI_F90_CHECK([integer], [INTEGER])
OMPI_F90_CHECK([integer(selected_int_kind(2))], [INTEGER*1], [1])
OMPI_F90_CHECK([integer(selected_int_kind(4))], [INTEGER*2], [2])
OMPI_F90_CHECK([integer(selected_int_kind(9))], [INTEGER*4], [4])
OMPI_F90_CHECK([integer(selected_int_kind(18))], [INTEGER*8], [8])
OMPI_F90_CHECK([integer(selected_int_kind(19))], [INTEGER*16], [16])
OMPI_F90_CHECK([INTEGER])
OMPI_F90_CHECK([INTEGER*1], [1])
OMPI_F90_CHECK([INTEGER*2], [2])
OMPI_F90_CHECK([INTEGER*4], [4])
OMPI_F90_CHECK([INTEGER*8], [8])
OMPI_F90_CHECK([INTEGER*16], [16])
# REAL, DOUBLE PRECISION, REAL*4, *8, *16
OMPI_F90_CHECK([real], [REAL])
OMPI_F90_CHECK([real(kind(1.D0))], [DOUBLE PRECISION], [], [])
OMPI_F90_CHECK([real(selected_real_kind(6))], [REAL*4], [4], [1])
OMPI_F90_CHECK([real(selected_real_kind(15))], [REAL*8], [8], [1])
OMPI_F90_CHECK([real(selected_real_kind(31))], [REAL*16], [16], [1])
OMPI_F90_CHECK([REAL])
OMPI_F90_CHECK([REAL*4], [4], [1])
OMPI_F90_CHECK([REAL*8], [8], [1])
OMPI_F90_CHECK([REAL*16], [16], [1])
OMPI_F90_CHECK([DOUBLE PRECISION], [], [])
# COMPLEX, DOUBLE COMPLEX, COMPLEX*8, *16, *32
OMPI_F90_CHECK([complex], [COMPLEX])
OMPI_F90_CHECK([complex(kind(1.D0))], [DOUBLE COMPLEX], [], [])
OMPI_F90_CHECK([complex(selected_real_kind(6))], [COMPLEX*8], [8], [1])
OMPI_F90_CHECK([complex(selected_real_kind(15))], [COMPLEX*16], [16], [1])
OMPI_F90_CHECK([complex(selected_real_kind(31))], [COMPLEX*32], [32], [1])
OMPI_F90_CHECK([COMPLEX])
OMPI_F90_CHECK([COMPLEX*8], [8], [1])
OMPI_F90_CHECK([COMPLEX*16], [16], [1])
OMPI_F90_CHECK([COMPLEX*32], [32], [1])
OMPI_F90_CHECK([DOUBLE COMPLEX], [], [])
# The OMPI_F90_CKINDS list represents the overall size of the complex
# types -- not the size of the REAL's that make them up. For the