1
1
I'm contributing patches for configure.ac and f90_check_type.m4.
The problem was that f90_check_type returned an exit code
and not all compilers actually do this.  The fix tries to compile the
type and fails if it can't.  The problem is that some compilers will
happily return a default kind if the particular kind is not supported.
So the real test is whether the size of the datatype is as expected.

This commit was SVN r6101.
Этот коммит содержится в:
Jeff Squyres 2005-06-20 18:19:23 +00:00
родитель 463a7191d9
Коммит c6f812ec7f
2 изменённых файлов: 11 добавлений и 12 удалений

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

@ -23,7 +23,7 @@ AC_MSG_CHECKING([if FORTRAN compiler supports $1])
cat > conftestf.f90 <<EOF
program main
if ($1 .lt. 0) stop 1
$1 :: x
end program
EOF
@ -32,12 +32,10 @@ EOF
#
OMPI_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -o conftest conftestf.f90],
OMPI_LOG_COMMAND([./conftest],
[HAPPY=1
AC_MSG_RESULT([yes])],
[HAPPY=0
AC_MSG_RESULT([no])]), [HAPPY=0
AC_MSG_RESULT([no])])
AC_MSG_RESULT([no])])
str="$2=$HAPPY"
eval $str

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

@ -556,7 +556,7 @@ else
# If we want modern Fortran support, then get supported types and sizes
OMPI_F90_CHECK_TYPE(selected_int_kind(2), OMPI_HAVE_F90_INTEGER1)
OMPI_F90_CHECK_TYPE(integer(selected_int_kind(2)), OMPI_HAVE_F90_INTEGER1)
if test "$OMPI_HAVE_F90_INTEGER1" = "1"; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}1 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}1 "
@ -570,7 +570,7 @@ else
OMPI_ALIGNMENT_F90_LOGICAL1)
fi
OMPI_F90_CHECK_TYPE(selected_int_kind(4), OMPI_HAVE_F90_INTEGER2)
OMPI_F90_CHECK_TYPE(integer(selected_int_kind(4)), OMPI_HAVE_F90_INTEGER2)
if test "$OMPI_HAVE_F90_INTEGER2" = "1"; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}2 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}2 "
@ -584,7 +584,7 @@ else
OMPI_ALIGNMENT_F90_LOGICAL2)
fi
OMPI_F90_CHECK_TYPE(selected_int_kind(9), OMPI_HAVE_F90_INTEGER4)
OMPI_F90_CHECK_TYPE(integer(selected_int_kind(9)), OMPI_HAVE_F90_INTEGER4)
if test "$OMPI_HAVE_F90_INTEGER4" = "1"; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}4 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}4 "
@ -598,7 +598,7 @@ else
OMPI_ALIGNMENT_F90_LOGICAL4)
fi
OMPI_F90_CHECK_TYPE(selected_int_kind(18), OMPI_HAVE_F90_INTEGER8)
OMPI_F90_CHECK_TYPE(integer(selected_int_kind(18)), OMPI_HAVE_F90_INTEGER8)
if test "$OMPI_HAVE_F90_INTEGER8" = "1"; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}8 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}8 "
@ -612,7 +612,8 @@ else
OMPI_ALIGNMENT_F90_LOGICAL8)
fi
OMPI_F90_CHECK_TYPE(selected_int_kind(19), OMPI_HAVE_F90_INTEGER16)
OMPI_F90_CHECK_TYPE(integer(selected_int_kind(19)),
OMPI_HAVE_F90_INTEGER16)
if test "$OMPI_HAVE_F90_INTEGER16" = "1"; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}16 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}16 "
@ -626,7 +627,7 @@ else
OMPI_ALIGNMENT_F90_LOGICAL16)
fi
OMPI_F90_CHECK_TYPE(selected_real_kind(6), OMPI_HAVE_F90_REAL4)
OMPI_F90_CHECK_TYPE(real(selected_real_kind(6)), OMPI_HAVE_F90_REAL4)
if test "$OMPI_HAVE_F90_REAL4" = "1"; then
OMPI_HAVE_F90_COMPLEX8=1
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}4 "
@ -648,7 +649,7 @@ else
OMPI_RANGE_F90_COMPLEX8)
fi
OMPI_F90_CHECK_TYPE(selected_real_kind(15), OMPI_HAVE_F90_REAL8)
OMPI_F90_CHECK_TYPE(real(selected_real_kind(15)), OMPI_HAVE_F90_REAL8)
if test "$OMPI_HAVE_F90_REAL8" = "1"; then
OMPI_HAVE_F90_COMPLEX16=1
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}8 "
@ -671,7 +672,7 @@ else
OMPI_RANGE_F90_COMPLEX16)
fi
OMPI_F90_CHECK_TYPE(selected_real_kind(31), OMPI_HAVE_F90_REAL16)
OMPI_F90_CHECK_TYPE(real(selected_real_kind(31)), OMPI_HAVE_F90_REAL16)
if test "$OMPI_HAVE_F90_REAL16" = "1"; then
OMPI_HAVE_F90_COMPLEX32=1
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}16 "