1
1

1. Added tests for Fortran 90 types and sizes.

2. Added creation of src/mpi/f90/fortran_sizes.h.

This commit was SVN r3925.
Этот коммит содержится в:
Craig E Rasmussen 2005-01-07 21:21:46 +00:00
родитель 51092cd7f5
Коммит 019b769568
3 изменённых файлов: 193 добавлений и 46 удалений

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

@ -32,6 +32,9 @@ sinclude(config/f77_get_alignment.m4)
sinclude(config/f77_get_fortran_handle_max.m4)
sinclude(config/f77_get_sizeof.m4)
sinclude(config/f90_check_type.m4)
sinclude(config/f90_get_sizeof.m4)
sinclude(config/ompi_case_sensitive_fs_setup.m4)
sinclude(config/ompi_check_optflags.m4)
sinclude(config/ompi_config_subdir.m4)

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

@ -25,6 +25,8 @@ EXTRA_DIST = \
f77_find_ext_symbol_convention.m4 \
f77_get_alignment.m4 \
f77_get_sizeof.m4 \
f90_check_type.m4 \
f90_get_sizeof.m4 \
mca_acinclude.m4 \
mca_configure.ac \
mca_make_configure.pl \

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

@ -343,13 +343,6 @@ OMPI_ALIGNMENT_FORTRAN_DBLPREC=0
OMPI_ALIGNMENT_FORTRAN_COMPLEX=0
OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX=0
#
# lists of supported Fortran types
#
OMPI_FORTRAN_IKINDS=""
OMPI_FORTRAN_RKINDS=""
OMPI_FORTRAN_CKINDS=""
OMPI_SETUP_F77
OMPI_F77_FIND_EXT_SYMBOL_CONVENTION($OMPI_F77)
@ -397,47 +390,8 @@ else
OMPI_F77_GET_ALIGNMENT(DOUBLE PRECISION, OMPI_ALIGNMENT_FORTRAN_DBLPREC)
OMPI_F77_GET_ALIGNMENT(COMPLEX, OMPI_ALIGNMENT_FORTRAN_COMPLEX)
OMPI_F77_GET_ALIGNMENT(DOUBLE COMPLEX, OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX)
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER1" == "1" ; then
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}1 "
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER2" == "1" ; then
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}2 "
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER4" == "1" ; then
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}4 "
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER8" == "1" ; then
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}8 "
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER16" == "1" ; then
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}16 "
fi
if test "$OMPI_HAVE_FORTRAN_REAL4" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}4 "
fi
if test "$OMPI_HAVE_FORTRAN_REAL8" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}8 "
fi
if test "$OMPI_HAVE_FORTRAN_REAL16" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}16 "
fi
if test "$OMPI_HAVE_FORTRAN_COMPLEX8" == "1" ; then
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}8 "
fi
if test "$OMPI_HAVE_FORTRAN_COMPLEX16" == "1" ; then
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}16 "
fi
if test "$OMPI_HAVE_FORTRAN_COMPLEX32" == "1" ; then
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}32 "
fi
AC_SUBST(OMPI_FORTRAN_IKINDS)
AC_SUBST(OMPI_FORTRAN_RKINDS)
AC_SUBST(OMPI_FORTRAN_CKINDS)
AC_DEFINE_UNQUOTED(OMPI_HAVE_FORTRAN_INTEGER1, $OMPI_HAVE_FORTRAN_INTEGER1,
[Whether we have FORTRAN INTEGER1 or not])
@ -530,8 +484,195 @@ AM_CONDITIONAL(WANT_PMPI_F77_BINDINGS_LAYER,
# Fortran 90 setup
#
OMPI_HAVE_F90_INTEGER1=0
OMPI_HAVE_F90_INTEGER2=0
OMPI_HAVE_F90_INTEGER4=0
OMPI_HAVE_F90_INTEGER8=0
OMPI_HAVE_F90_INTEGER16=0
OMPI_HAVE_F90_REAL4=0
OMPI_HAVE_F90_REAL8=0
OMPI_HAVE_F90_REAL16=0
OMPI_HAVE_F90_COMPLEX8=0
OMPI_HAVE_F90_COMPLEX16=0
OMPI_HAVE_F90_COMPLEX32=0
OMPI_SIZEOF_F90_INT=0
OMPI_SIZEOF_F90_REAL=0
OMPI_SIZEOF_F90_DBLPREC=0
OMPI_SIZEOF_F90_COMPLEX=0
OMPI_SIZEOF_F90_DBLCOMPLEX=0
OMPI_SIZEOF_F90_INT1=0
OMPI_SIZEOF_F90_INT2=0
OMPI_SIZEOF_F90_INT4=0
OMPI_SIZEOF_F90_INT8=0
OMPI_SIZEOF_F90_INT16=0
OMPI_SIZEOF_F90_REAL4=0
OMPI_SIZEOF_F90_REAL8=0
OMPI_SIZEOF_F90_REAL16=0
OMPI_SIZEOF_F90_COMPLEX8=0
OMPI_SIZEOF_F90_COMPLEX16=0
OMPI_SIZEOF_F90_COMPLEX32=0
#
# lists of supported Fortran types
#
OMPI_FORTRAN_LKINDS=""
OMPI_FORTRAN_IKINDS=""
OMPI_FORTRAN_RKINDS=""
OMPI_FORTRAN_CKINDS=""
OMPI_SETUP_F90
if test "$OMPI_WANT_F90_BINDINGS" = "0" ; then
OMPI_SIZEOF_F90_LOGICAL=$ac_cv_sizeof_int
OMPI_SIZEOF_F90_INT=$ac_cv_sizeof_int
OMPI_SIZEOF_F90_REAL=$ac_cv_sizeof_float
OMPI_SIZEOF_F90_DBLPREC=$ac_cv_sizeof_double
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(selected_int_kind(4), OMPI_HAVE_F90_INTEGER2)
OMPI_F90_CHECK_TYPE(selected_int_kind(9), OMPI_HAVE_F90_INTEGER4)
OMPI_F90_CHECK_TYPE(selected_int_kind(18), OMPI_HAVE_F90_INTEGER8)
OMPI_F90_CHECK_TYPE(selected_int_kind(19), OMPI_HAVE_F90_INTEGER16)
OMPI_F90_CHECK_TYPE(selected_real_kind(6), OMPI_HAVE_F90_REAL4)
OMPI_F90_CHECK_TYPE(selected_real_kind(15), OMPI_HAVE_F90_REAL8)
OMPI_F90_CHECK_TYPE(selected_real_kind(31), OMPI_HAVE_F90_REAL16)
OMPI_F90_GET_SIZEOF(integer, OMPI_SIZEOF_F90_INT)
OMPI_F90_GET_SIZEOF(real, OMPI_SIZEOF_F90_REAL)
OMPI_F90_GET_SIZEOF(real(kind(1.D0)), OMPI_SIZEOF_F90_DBLPREC)
OMPI_F90_GET_SIZEOF(complex, OMPI_SIZEOF_F90_COMPLEX)
OMPI_F90_GET_SIZEOF(complex(kind(1.D0)), OMPI_SIZEOF_F90_DBLCOMPLEX)
OMPI_F90_GET_SIZEOF(integer(selected_int_kind(2)), OMPI_SIZEOF_F90_INT1)
OMPI_F90_GET_SIZEOF(integer(selected_int_kind(4)), OMPI_SIZEOF_F90_INT2)
OMPI_F90_GET_SIZEOF(integer(selected_int_kind(9)), OMPI_SIZEOF_F90_INT4)
OMPI_F90_GET_SIZEOF(integer(selected_int_kind(18)), OMPI_SIZEOF_F90_INT8)
OMPI_F90_GET_SIZEOF(integer(selected_int_kind(19)), OMPI_SIZEOF_F90_INT16)
OMPI_F90_GET_SIZEOF(real(selected_real_kind(6)), OMPI_SIZEOF_F90_REAL4)
OMPI_F90_GET_SIZEOF(real(selected_real_kind(15)), OMPI_SIZEOF_F90_REAL8)
OMPI_F90_GET_SIZEOF(real(selected_real_kind(31)), OMPI_SIZEOF_F90_REAL16)
OMPI_F90_GET_SIZEOF(complex(selected_real_kind(6)),
OMPI_SIZEOF_F90_COMPLEX8)
OMPI_F90_GET_SIZEOF(complex(selected_real_kind(15)),
OMPI_SIZEOF_F90_COMPLEX16)
OMPI_F90_GET_SIZEOF(complex(selected_real_kind(31)),
OMPI_SIZEOF_F90_COMPLEX32)
fi
#
# Check sizes against what is expected and fix things up
#
if test "$OMPI_SIZEOF_F90_INT1" != "1" ; then
OMPI_SIZEOF_F90_INT1=0
OMPI_HAVE_F90_INTEGER1=0
fi
if test "$OMPI_SIZEOF_F90_INT2" != "2" ; then
OMPI_SIZEOF_F90_INT2=0
OMPI_HAVE_F90_INTEGER2=0
fi
if test "$OMPI_SIZEOF_F90_INT4" != "4" ; then
OMPI_SIZEOF_F90_INT4=0
OMPI_HAVE_F90_INTEGER4=0
fi
if test "$OMPI_SIZEOF_F90_INT8" != "8" ; then
OMPI_SIZEOF_F90_INT8=0
OMPI_HAVE_F90_INTEGER8=0
fi
if test "$OMPI_SIZEOF_F90_INT16" != "16" ; then
OMPI_SIZEOF_F90_INT16=0
OMPI_HAVE_F90_INTEGER16=0
fi
if test "$OMPI_SIZEOF_F90_REAL4" != "4" ; then
OMPI_SIZEOF_F90_REAL4=0
OMPI_HAVE_F90_REAL4=0
fi
if test "$OMPI_SIZEOF_F90_REAL8" != "8" ; then
OMPI_SIZEOF_F90_REAL8=0
OMPI_HAVE_F90_REAL8=0
fi
if test "$OMPI_SIZEOF_F90_REAL16" != "16" ; then
OMPI_SIZEOF_F90_REAL16=0
OMPI_HAVE_F90_REAL16=0
fi
if test "$OMPI_SIZEOF_F90_COMPLEX8" != "8" ; then
OMPI_SIZEOF_F90_COMPLEX8=0
OMPI_HAVE_F90_COMPLEX8=0
fi
if test "$OMPI_SIZEOF_F90_COMPLEX16" != "16" ; then
OMPI_SIZEOF_F90_COMPLEX16=0
OMPI_HAVE_F90_COMPLEX16=0
fi
if test "$OMPI_SIZEOF_F90_COMPLEX32" != "32" ; then
OMPI_SIZEOF_F90_COMPLEX32=0
OMPI_HAVE_F90_COMPLEX32=0
fi
if test "$OMPI_HAVE_F90_INTEGER1" == "1" ; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}1 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}1 "
fi
if test "$OMPI_HAVE_F90_INTEGER2" == "1" ; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}2 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}2 "
fi
if test "$OMPI_HAVE_F90_INTEGER4" == "1" ; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}4 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}4 "
fi
if test "$OMPI_HAVE_F90_INTEGER8" == "1" ; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}8 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}8 "
fi
if test "$OMPI_HAVE_F90_INTEGER16" == "1" ; then
OMPI_FORTRAN_LKINDS="${OMPI_FORTRAN_LKINDS}16 "
OMPI_FORTRAN_IKINDS="${OMPI_FORTRAN_IKINDS}16 "
fi
if test "$OMPI_HAVE_F90_REAL4" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}4 "
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}4 "
fi
if test "$OMPI_HAVE_F90_REAL8" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}8 "
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}8 "
fi
if test "$OMPI_HAVE_F90_REAL16" == "1" ; then
OMPI_FORTRAN_RKINDS="${OMPI_FORTRAN_RKINDS}16 "
OMPI_FORTRAN_CKINDS="${OMPI_FORTRAN_CKINDS}16 "
fi
AC_SUBST(OMPI_FORTRAN_LKINDS)
AC_SUBST(OMPI_FORTRAN_IKINDS)
AC_SUBST(OMPI_FORTRAN_RKINDS)
AC_SUBST(OMPI_FORTRAN_CKINDS)
AC_SUBST(OMPI_SIZEOF_F90_INT1)
AC_SUBST(OMPI_SIZEOF_F90_INT2)
AC_SUBST(OMPI_SIZEOF_F90_INT4)
AC_SUBST(OMPI_SIZEOF_F90_INT8)
AC_SUBST(OMPI_SIZEOF_F90_INT16)
AC_SUBST(OMPI_SIZEOF_F90_REAL4)
AC_SUBST(OMPI_SIZEOF_F90_REAL8)
AC_SUBST(OMPI_SIZEOF_F90_REAL16)
AC_SUBST(OMPI_SIZEOF_F90_COMPLEX8)
AC_SUBST(OMPI_SIZEOF_F90_COMPLEX16)
AC_SUBST(OMPI_SIZEOF_F90_COMPLEX32)
##################################
# Header files
@ -1167,6 +1308,7 @@ AC_CONFIG_FILES([
src/mpi/f77/profile/Makefile
src/mpi/f90/Makefile
src/mpi/f90/fortran_kinds.sh
src/mpi/f90/fortran_sizes.h
src/mpi/runtime/Makefile
src/tools/Makefile