Update the BIND(C, name="foo") test to see if the compiler supports
names longer than 32 characters. Per discussion on the devel list starting here: http://www.open-mpi.org/community/lists/devel/2014/01/13799.php we need a new litmus test to disqualify older Fortran compilers (e.g., Pathscale 4.0.12) that *seem* to support all the Right Things, but a) do not support BIND(C, name="super_long_name") or b) run into an internal error when compiling our mpi_f08 module. Testing for b) is sketchy at best. But OMPI has some BIND(C) names that are >32 characters, and the same compilers that exhibit b) also seem to not support BIND(C) names that are >32 characters (i.e., a)). Hence, the following BIND(C) test checks to ensure that BIND(C, name="foo") works, where "foo" is actually a name >32 characters. cmr=v1.7.4:reviewer=rhc:subject=Update Fortran configure test to exclude older pathscale/open64 compilers from mpi_f08 This commit was SVN r30421.
This commit is contained in:
parent
01e07f25e0
commit
967550b3ac
@ -96,6 +96,9 @@ end module]])],
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME],[
|
||||
AS_VAR_PUSHDEF([bind_c_type_name_var], [ompi_cv_fortran_have_bind_c_type_name])
|
||||
|
||||
# See comment in ompi_setup_mpi_fortran.m4: it is important that
|
||||
# the bind(c) name in this text is longer than 32 characters.
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports TYPE(type), BIND(C, NAME="name")], bind_c_type_name_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module bindc_test
|
||||
@ -104,7 +107,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME],[
|
||||
integer :: value
|
||||
end type foo
|
||||
|
||||
type(foo), bind(c, name="c_name") :: bar
|
||||
type(foo), bind(c, name="really_long_name_longer_than_32_chars") :: bar
|
||||
end module]])],
|
||||
[AS_VAR_SET(bind_c_type_name_var, yes)],
|
||||
[AS_VAR_SET(bind_c_type_name_var, no)])
|
||||
|
@ -375,6 +375,18 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_TYPE=0
|
||||
OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])])
|
||||
|
||||
# Per discussion on the devel list starting here:
|
||||
# http://www.open-mpi.org/community/lists/devel/2014/01/13799.php
|
||||
# we need a new litmus test to disqualify older Fortran compilers
|
||||
# (e.g., Pathscale 4.0.12) that *seem* to support all the Right
|
||||
# Things, but a) do not support BIND(C, name="super_long_name") or
|
||||
# b) run into an internal error when compiling our mpi_f08 module.
|
||||
# Testing for b) is sketchy at best. But OMPI has some BIND(C)
|
||||
# names that are >32 characters, and the same compilers that
|
||||
# exhibit b) also seem to not support BIND(C) names that are >32
|
||||
# characters (i.e., a)). Hence, the following BIND(C) test checks
|
||||
# to ensure that BIND(C, name="foo") works, where "foo" is
|
||||
# actually a name >32 characters.
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0
|
||||
AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 -a \
|
||||
$OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1],
|
||||
|
Loading…
x
Reference in New Issue
Block a user