diff --git a/config/ompi_configure_options.m4 b/config/ompi_configure_options.m4 index 8378db0034..a3b33a3d34 100644 --- a/config/ompi_configure_options.m4 +++ b/config/ompi_configure_options.m4 @@ -104,69 +104,60 @@ AM_CONDITIONAL(WANT_PERUSE, test "$WANT_PERUSE" = "1") AC_MSG_CHECKING([if want Fortran MPI bindings]) AC_ARG_ENABLE(mpi-fortran, AC_HELP_STRING([--enable-mpi-fortran], - [specify which Fortran MPI bindings to build: all (or yes), none (or no), mpifh (build only mpif.h support), usempi (build mpif.h and the mpi module), or usempif08 (build mpifh, the mpi module, and the mpi_f08 module) (default: "all" if Fortran compiler found)])) + [specify which Fortran MPI bindings to build: yes, none (or no), best-effort, mpifh (build only mpif.h support), usempi (build mpif.h and the mpi module), or usempif08 (or all, build mpifh, the mpi module, and the mpi_f08 module) (default: "yes" if Fortran compiler found)])) + +OMPI_FORTRAN_NO_BINDINGS=0 +OMPI_FORTRAN_MPIFH_BINDINGS=1 +OMPI_FORTRAN_USEMPI_BINDINGS=2 +OMPI_FORTRAN_USEMPIF08_BINDINGS=3 + +OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS +OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS -OMPI_FORTRAN_USER_REQUESTED=0 case "x$enable_mpi_fortran" in - x) - AC_MSG_RESULT([yes (all/default)]) - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=1 + x|xbest-effort) + AC_MSG_RESULT([ (try)]) + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS ;; - xyes|xall) - AC_MSG_RESULT([yes (all)]) - OMPI_FORTRAN_USER_REQUESTED=1 - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=1 + xyes) + AC_MSG_RESULT([yes (default)]) + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS ;; + xall|xusempif08) + AC_MSG_RESULT([all (usempif08)]) + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS + ;; + xno|xnone) AC_MSG_RESULT([no (none)]) - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=0 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=0 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=0 + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS ;; xmpifh) AC_MSG_RESULT([yes (mpif.h)]) - OMPI_FORTRAN_USER_REQUESTED=1 - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=0 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=0 + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS ;; xusempi) AC_MSG_RESULT([yes (mpif.h, mpi module)]) - OMPI_FORTRAN_USER_REQUESTED=1 - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=0 - ;; - - xusempif08) - AC_MSG_RESULT([yes (mpif.h, mpi and mpi_f08 modules)]) - OMPI_FORTRAN_USER_REQUESTED=1 - OMPI_WANT_FORTRAN_MPIFH_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPI_BINDINGS=1 - OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS=1 + OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS + OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS ;; *) AC_MSG_RESULT([unknown: $binding]) - AC_MSG_WARN([--enable-mpi-fortran only one of the following values: all, none, mpifh, usempi, or usempif08]) + AC_MSG_WARN([--enable-mpi-fortran only one of the following values: yes, all, none, best-effort, mpifh, usempi, or usempif08]) AC_MSG_ERROR([Cannot continue]) ;; esac -AS_IF([test $OMPI_WANT_FORTRAN_MPIFH_BINDINGS -eq 1 || \ - test $OMPI_WANT_FORTRAN_USEMPI_BINDINGS -eq 1 || \ - test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1], - [OMPI_WANT_FORTRAN_BINDINGS=1], - [OMPI_WANT_FORTRAN_BINDINGS=0]) - # # MPI profiling # @@ -263,7 +254,7 @@ AC_ARG_ENABLE(mpi-f08-subarray-prototype, AC_HELP_STRING([--enable-mpi-f08-subarray-prototype], [Use the PROTOTYPE and SEVERLY FUNCTIONALITY-LIMITED Fortran 08 'use mpi_f08' implementation that supports subarrrays (via Fortran descriptors). This option will disable the normal 'use mpi_f08' implementation and *only* build the prototype implementation.])) OMPI_BUILD_FORTRAN_F08_SUBARRAYS=0 -AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 0], +AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -lt $OMPI_FORTRAN_USEMPIF08_BINDINGS], [AC_MSG_RESULT([none (use mpi_f08 disabled)])], [AS_IF([test "$enable_mpi_f08_subarray_prototype" = "yes"], [OMPI_BUILD_FORTRAN_F08_SUBARRAYS=1 diff --git a/config/ompi_find_mpi_aint_count_offset.m4 b/config/ompi_find_mpi_aint_count_offset.m4 index 647b06b498..b84dad355c 100644 --- a/config/ompi_find_mpi_aint_count_offset.m4 +++ b/config/ompi_find_mpi_aint_count_offset.m4 @@ -15,6 +15,8 @@ # Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. +# Copyright (c) 2014 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([OMPI_FIND_MPI_AINT_COUNT_OFFSET],[ _OMPI_FIND_MPI_OFFSET_TYPE if test "$ompi_fortran_happy" == "1" && \ - test "$OMPI_WANT_FORTRAN_BINDINGS" == "1"; then + test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS"; then _OMPI_FIND_MPI_INTEGER_KIND _OMPI_FIND_MPI_ADDRESS_KIND _OMPI_FIND_MPI_COUNT_KIND diff --git a/config/ompi_fortran_check.m4 b/config/ompi_fortran_check.m4 index 2bf5102611..f96f1707bc 100644 --- a/config/ompi_fortran_check.m4 +++ b/config/ompi_fortran_check.m4 @@ -47,7 +47,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [ # Fortran compiler. This allows us to call this macro, even if # there is no Fortran compiler. If we have no Fortran compiler, # then just set a bunch of defaults. - if test $OMPI_WANT_FORTRAN_BINDINGS -eq 1; then + if test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS; then OMPI_FORTRAN_CHECK_TYPE([$1], [ofc_have_type=1], [ofc_have_type=0]) else AC_MSG_CHECKING([if Fortran compiler supports $1]) diff --git a/config/ompi_fortran_check_logical_array.m4 b/config/ompi_fortran_check_logical_array.m4 index c74227a0a0..a358cbbb79 100644 --- a/config/ompi_fortran_check_logical_array.m4 +++ b/config/ompi_fortran_check_logical_array.m4 @@ -24,7 +24,9 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_LOGICAL_ARRAY],[ AC_CACHE_CHECK([for correct handling of Fortran logical arrays], logical_array_var, - [if test "$1" = "none" || test $OMPI_WANT_FORTRAN_BINDINGS -eq 0 || test $ompi_fortran_happy -eq 0; then + [if test "$1" = "none" || \ + test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \ + test $ompi_fortran_happy -eq 0; then value=skipped else # Fortran module @@ -107,7 +109,7 @@ EOF [value=no])]) fi AS_VAR_SET(logical_array_var, [$value]) - ]) + ]) AS_VAR_COPY([ompi_fortran_logical_array_correct], [logical_array_var]) if test "$ompi_fortran_logical_array_correct" = "no" ; then diff --git a/config/ompi_fortran_check_real16_c_equiv.m4 b/config/ompi_fortran_check_real16_c_equiv.m4 index 545cfa45b2..2a40bcae04 100644 --- a/config/ompi_fortran_check_real16_c_equiv.m4 +++ b/config/ompi_fortran_check_real16_c_equiv.m4 @@ -31,52 +31,54 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[ # We have to do this as a cache check for cross-compilation platforms AC_CACHE_CHECK([for C type matching bit representation of REAL*16], real16_matches_c_var, - [AS_IF([test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" && test "$OMPI_HAVE_FORTRAN_REAL16" = "1"],[ - # AC_CACHE_CHECK automatically does its own AC_MSG_CHECKING, so close it out - AC_MSG_RESULT([pending]) + [AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ + test "$OMPI_HAVE_FORTRAN_REAL16" = "1"], + [ + # AC_CACHE_CHECK automatically does its own AC_MSG_CHECKING, so close it out + AC_MSG_RESULT([pending]) - # First check the type that we found was the same length in C - AC_MSG_CHECKING([if $OMPI_FORTRAN_REAL16_C_TYPE == REAL*16]) - OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([$OMPI_FORTRAN_REAL16_C_TYPE], [L]) - # If that didn't work, see if we have a compiler-specific - # type that might work - AS_IF([test "$happy" = "no"], - [AC_MSG_RESULT([$happy]) - # Intel compiler has a special type that should work - AS_IF([test "$opal_cv_c_compiler_vendor" = "intel"], - [AC_MSG_CHECKING([if intel compiler _Quad == REAL*16]) - CFLAGS_save="$CFLAGS" - CFLAGS="$CFLAGS -Qoption,cpp,--extended_float_types" - OPAL_UNIQ([CFLAGS]) - OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([_Quad], [q]) - AS_IF([test "$happy" = "yes"], - [OMPI_FORTRAN_REAL16_C_TYPE="_Quad" - AC_MSG_RESULT([works!])], - [CFLAGS="$CFLAGS_save" - AC_MSG_RESULT([does not work])]) - ]) - AS_IF([test "$opal_cv_c_compiler_vendor" = "gnu" && test "$ac_cv_type___float128" = "yes"], - [AC_MSG_CHECKING([if gnu compiler __float128 == REAL*16]) - OPAL_UNIQ([CFLAGS]) - OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([__float128], [q]) - AS_IF([test "$happy" = "yes"], - [OMPI_FORTRAN_REAL16_C_TYPE="__float128" - AC_MSG_RESULT([works!])], - [AC_MSG_RESULT([does not work])]) - ]) - # We have to [re-]print a new message here, because - # AC_CACHE_CHECK will automatically AC_MSG_RESULT - AC_MSG_CHECKING([for C type matching bit representation of REAL*16]) - ]) - AS_VAR_SET(real16_matches_c_var, [$happy]) - ],[ - # No fortran bindings or no REAL*16 - AS_IF([test "$OMPI_WANT_FORTRAN_BINDINGS" = "0"], - [msg="skipped (no Fortran MPI bindings)"], - [msg="skipped (no REAL*16)"]) - AS_VAR_SET(real16_matches_c_var, [$msg]) + # First check the type that we found was the same length in C + AC_MSG_CHECKING([if $OMPI_FORTRAN_REAL16_C_TYPE == REAL*16]) + OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([$OMPI_FORTRAN_REAL16_C_TYPE], [L]) + # If that didn't work, see if we have a compiler-specific + # type that might work + AS_IF([test "$happy" = "no"], + [AC_MSG_RESULT([$happy]) + # Intel compiler has a special type that should work + AS_IF([test "$opal_cv_c_compiler_vendor" = "intel"], + [AC_MSG_CHECKING([if intel compiler _Quad == REAL*16]) + CFLAGS_save="$CFLAGS" + CFLAGS="$CFLAGS -Qoption,cpp,--extended_float_types" + OPAL_UNIQ([CFLAGS]) + OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([_Quad], [q]) + AS_IF([test "$happy" = "yes"], + [OMPI_FORTRAN_REAL16_C_TYPE="_Quad" + AC_MSG_RESULT([works!])], + [CFLAGS="$CFLAGS_save" + AC_MSG_RESULT([does not work])]) + ]) + AS_IF([test "$opal_cv_c_compiler_vendor" = "gnu" -a "$ac_cv_type___float128" = "yes"], + [AC_MSG_CHECKING([if gnu compiler __float128 == REAL*16]) + OPAL_UNIQ([CFLAGS]) + OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([__float128], [q]) + AS_IF([test "$happy" = "yes"], + [OMPI_FORTRAN_REAL16_C_TYPE="__float128" + AC_MSG_RESULT([works!])], + [AC_MSG_RESULT([does not work])]) + ]) + # We have to [re-]print a new message here, because + # AC_CACHE_CHECK will automatically AC_MSG_RESULT + AC_MSG_CHECKING([for C type matching bit representation of REAL*16]) + ]) + AS_VAR_SET(real16_matches_c_var, [$happy]) + ],[ + # No fortran bindings or no REAL*16 + AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS"], + [msg="skipped (no Fortran MPI bindings)"], + [msg="skipped (no REAL*16)"]) + AS_VAR_SET(real16_matches_c_var, [$msg]) + ]) ]) - ]) AS_VAR_COPY([ompi_real16_matches_c], [real16_matches_c_var]) AS_VAR_POPDEF([real16_matches_c_var]) diff --git a/config/ompi_fortran_find_ext_symbol_convention.m4 b/config/ompi_fortran_find_ext_symbol_convention.m4 index 47300cdeb9..80a8d1f907 100644 --- a/config/ompi_fortran_find_ext_symbol_convention.m4 +++ b/config/ompi_fortran_find_ext_symbol_convention.m4 @@ -34,7 +34,8 @@ AC_DEFUN([OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION], [ AC_CACHE_CHECK([$FORTRAN external symbol convention], [ompi_cv_fortran_external_symbol], - [if test "$FC" = "none" || test "$OMPI_WANT_FORTRAN_BINDINGS" = "0"; then + [if test "$FC" = "none" || \ + test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS"; then ompi_cv_fortran_external_symbol="skipped" else cat >conftest.f <32 characters. OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # If we don't have TYPE, BIND(C, name="foo"), we won't build mpi_f08 at all OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME( [ # If we got here, we have all the required forms of @@ -405,74 +415,74 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ OMPI_FORTRAN_HAVE_BIND_C=1 OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=1], [OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0 - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])]) + OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])]) # Per https://svn.open-mpi.org/trac/ompi/ticket/4590, if the # Fortran compiler doesn't support PROCEDURE in the way we # want/need, disable the mpi_f08 module. OMPI_FORTRAN_HAVE_PROCEDURE=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler support "procedure" OMPI_FORTRAN_CHECK_PROCEDURE( [OMPI_FORTRAN_HAVE_PROCEDURE=1], [OMPI_FORTRAN_HAVE_PROCEDURE=0 - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])]) + OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])]) OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler have optional arguments? OMPI_FORTRAN_CHECK_OPTIONAL_ARGS( [OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=1], [OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0 - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])]) + OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])]) OMPI_FORTRAN_HAVE_C_FUNLOC=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler supports c_funloc per # TS 29113 subclause 8.1 ? OMPI_FORTRAN_CHECK_C_FUNLOC( [OMPI_FORTRAN_HAVE_C_FUNLOC=1], [OMPI_FORTRAN_HAVE_C_FUNLOC=0 - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])]) + OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])]) OMPI_FORTRAN_HAVE_PRIVATE=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler support "private" OMPI_FORTRAN_CHECK_PRIVATE( [OMPI_FORTRAN_HAVE_PRIVATE=1], [OMPI_FORTRAN_HAVE_PRIVATE=0])]) OMPI_FORTRAN_HAVE_PROTECTED=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler support "protected" OMPI_FORTRAN_CHECK_PROTECTED( [OMPI_FORTRAN_HAVE_PROTECTED=1], [OMPI_FORTRAN_HAVE_PROTECTED=0])]) OMPI_FORTRAN_HAVE_ABSTRACT=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler support "abstract" OMPI_FORTRAN_CHECK_ABSTRACT( [OMPI_FORTRAN_HAVE_ABSTRACT=1], [OMPI_FORTRAN_HAVE_ABSTRACT=0])]) OMPI_FORTRAN_HAVE_ASYNCHRONOUS=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Does the compiler support "asynchronous" OMPI_FORTRAN_CHECK_ASYNCHRONOUS( [OMPI_FORTRAN_HAVE_ASYNCHRONOUS=1], [OMPI_FORTRAN_HAVE_ASYNCHRONOUS=0])]) OMPI_FORTRAN_F08_HANDLE_SIZE=4 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # How big are derived types with a single INTEGER? OMPI_FORTRAN_GET_SIZEOF([type, BIND(C) :: test_mpi_handle integer :: MPI_VAL @@ -485,8 +495,8 @@ end type test_mpi_handle], OMPI_FORTRAN_F08_PREDECL='!' OMPI_FORTRAN_F08_TYPE=real OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=0 - AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ - test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ + test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # Look for Fortran 2008 assumed rank syntax OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK( [ # If we have assumed rank, we can build the use @@ -533,14 +543,23 @@ end type test_mpi_handle], # implementation, but for now, I'm just hard-wiring # OMPI_FORTRAN_NEED_WRAPPER_ROUTINES to 1 when we're # building the F08 wrappers. - OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=$OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS + if test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS; then + OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1 + else + OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0 + fi AC_MSG_CHECKING([if building Fortran 'use mpi_f08' bindings]) - AS_IF([test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1], + AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [OMPI_FORTRAN_USEMPIF08_LIB=-lmpi_usempif08 AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) + [OMPI_TRY_FORTRAN_BINDIGS=$OMPI_FORTRAN_USEMPI_BINDINGS + AC_MSG_RESULT([no])]) + # If Fortran bindings is requested, make sure at least one can be built + AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -gt $OMPI_BUILD_FORTRAN_BINDINGS], + [AC_MSG_ERROR([Cannot build requested Fortran bindings, aborting])]) + # ------------------- # mpif.h final setup # ------------------- @@ -606,15 +625,12 @@ end type test_mpi_handle], AM_CONDITIONAL(BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER, [( test $WANT_MPI_PROFILING -eq 0 || test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 ) && \ - test $OMPI_BUILD_FORTRAN_MPIFH_BINDINGS -eq 1]) + test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS]) AM_CONDITIONAL(BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER, - [test $OMPI_BUILD_FORTRAN_MPIFH_BINDINGS -eq 1 && \ + [test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS && \ test $WANT_MPI_PROFILING -eq 1]) - AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS, - $OMPI_BUILD_FORTRAN_MPIFH_BINDINGS, - [Whether we will build the MPI Fortran mpif.h bindings or not]) AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS, - [test $OMPI_BUILD_FORTRAN_MPIFH_BINDINGS -eq 1]) + [test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS]) # ------------------- # use mpi final setup @@ -636,9 +652,6 @@ end type test_mpi_handle], AC_DEFINE_UNQUOTED([OMPI_FORTRAN_IGNORE_TKR_TYPE], [$type], [Type declaration for FORTRAN ignore parameter TKR behavior]) - AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS, - $OMPI_BUILD_FORTRAN_USEMPI_BINDINGS, - [Whether we will build the MPI Fortran "use mpi" bindings or not]) AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_IGNORE_TKR, [$OMPI_FORTRAN_HAVE_IGNORE_TKR], [Whether the Fortran compiler supports ignore TKR functionality or not]) @@ -648,15 +661,15 @@ end type test_mpi_handle], # ompi/mpi/fortran/use-mpi*/Makefile.ams be safe, too. # True if we're building either "use mpi" bindings AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS, - [test $OMPI_BUILD_FORTRAN_USEMPI_BINDINGS -eq 1 || \ + [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS || \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1]) # True if we're building the old TKR-style bindings AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS, - [test $OMPI_BUILD_FORTRAN_USEMPI_BINDINGS -eq 1 && \ + [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 0]) # True if we're building the new ignore-TKR-style bindings AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS, - [test $OMPI_BUILD_FORTRAN_USEMPI_BINDINGS -eq 1 && \ + [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1]) # ------------------- @@ -697,9 +710,6 @@ end type test_mpi_handle], [How many bytes the mpi_f08 TYPE(MPI_) handles will be]) # These go into ompi/info/param.c - AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS, - $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS, - [For ompi_info: Whether we will build the MPI Fortran "use mpi_f08" bindings or not]) AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK, [$OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK], [For ompi_info: Whether the Fortran compiler supports the Fortran 2008 "assumed rank" syntax or not]) @@ -771,5 +781,9 @@ end type test_mpi_handle], # might as well have ompi/mpi/fortran/use-mpi-f08/Makefile.am be # safe, too. AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS, - [test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1]) + [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS]) + + AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_BINDINGS, + $OMPI_BUILD_FORTRAN_BINDINGS, + [The level of fortran bindings to be built]) ]) diff --git a/config/opal_config_pthreads.m4 b/config/opal_config_pthreads.m4 index 9cd3336f8c..db12c6ba56 100644 --- a/config/opal_config_pthreads.m4 +++ b/config/opal_config_pthreads.m4 @@ -218,7 +218,9 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_PLAIN_FC], [ # # Fortran compiler # -if test "$opal_pthread_fortran_success" = "0" && test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" && test $ompi_fortran_happy -eq 1; then +if test "$opal_pthread_fortran_success" = "0" && \ + test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ + test $ompi_fortran_happy -eq 1; then AC_MSG_CHECKING([if Fortran compiler and POSIX threads work as is]) AC_LANG_PUSH(C) @@ -322,7 +324,9 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [ # # Fortran compiler # -if test "$opal_pthread_fortran_success" = "0" && test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" && test $ompi_fortran_happy -eq 1; then +if test "$opal_pthread_fortran_success" = "0" && \ + test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ + test $ompi_fortran_happy -eq 1; then for pf in $pflags; do AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $pf]) FCFLAGS="$orig_FCFLAGS $pf" @@ -507,7 +511,9 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_LIBS_FC],[ # # Fortran compiler # -if test "$opal_pthread_fortran_success" = "0" && test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" && test $ompi_fortran_happy -eq 1; then +if test "$opal_pthread_fortran_success" = "0" && \ + test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ + test $ompi_fortran_happy -eq 1; then if test ! "$opal_pthread_c_success" = "0" && test ! "$PTHREAD_LIBS" = "" ; then AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $PTHREAD_LIBS]) LIBS="$orig_LIBS $PTHREAD_LIBS" @@ -650,7 +656,8 @@ CXXCPPFLAGS="$orig_CXXCPPFLAGS" LDFLAGS="$orig_LDFLAGS" LIBS="$orig_LIBS" -if test "$OMPI_WANT_FORTRAN_BINDINGS" != "1" || test $ompi_fortran_happy -ne 1; then +if test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS" || \ + test $ompi_fortran_happy -ne 1; then opal_pthread_fortran_success=1 fi diff --git a/config/opal_setup_wrappers.m4 b/config/opal_setup_wrappers.m4 index 87d5438d4e..4fe3f18b15 100644 --- a/config/opal_setup_wrappers.m4 +++ b/config/opal_setup_wrappers.m4 @@ -440,7 +440,7 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[ AC_SUBST([OMPI_WRAPPER_CXX_LIB]) AC_SUBST([OMPI_WRAPPER_CXX_REQUIRED_FILE]) - if test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" ; then + if test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" ; then OMPI_WRAPPER_FORTRAN_REQUIRED_FILE="" else OMPI_WRAPPER_FORTRAN_REQUIRED_FILE="not supported" diff --git a/config/oshmem_configure_options.m4 b/config/oshmem_configure_options.m4 index d884afad18..69d05b613e 100644 --- a/config/oshmem_configure_options.m4 +++ b/config/oshmem_configure_options.m4 @@ -133,13 +133,14 @@ AC_HELP_STRING([--enable-oshmem-fortran], [enable OSHMEM Fortran bindings (default: enabled if Fortran compiler found)])) if test "$enable_oshmem" != "no" && test "$enable_oshmem_fortran" != "no"; then # If no OMPI FORTRAN, bail - AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -eq 0 && test "$enable_oshmem_fortran" = "yes"], - [AC_MSG_RESULT([bad value OMPI_WANT_FORTRAN_BINDINGS: ($OMPI_WANT_FORTRAN_BINDINGS)]) + AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS && \ + test "$enable_oshmem_fortran" = "yes"], + [AC_MSG_RESULT([bad value OMPI_TRY_FORTRAN_BINDINGS: ($OMPI_TRY_FORTRAN_BINDINGS)]) AC_MSG_WARN([Your request to --enable-oshmem-fortran can only be satisfied if fortran support is enabled in OMPI. You see this message because OMPI fortran support has been explicitly disabled via --disable-mpi-fortran and OSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran. Configure will abort because you, a human, have asked for something that cannot be provided.]) AC_MSG_ERROR([Cannot continue])]) - if test $OMPI_WANT_FORTRAN_BINDINGS -eq 1; then + if test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) diff --git a/configure.ac b/configure.ac index b9091f4ba6..e7e259b48b 100644 --- a/configure.ac +++ b/configure.ac @@ -578,7 +578,7 @@ m4_ifdef([project_ompi], [OMPI_SETUP_MPI_FORTRAN], [ompi_fortran_happy=0]) AM_CONDITIONAL(OSHMEM_BUILD_FORTRAN_BINDINGS, [test "$enable_oshmem" = "yes" && \ test "$ompi_fortran_happy" = "1" && \ - test "$OMPI_WANT_FORTRAN_BINDINGS" = "1" && \ + test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ test "$enable_oshmem_fortran" != "no"]) # checkpoint results @@ -1212,7 +1212,7 @@ fi # do this for C++, because even if we're not building the MPI C++ # bindings, we *do* still want to setup the mpicxx wrapper if we have # a C++ compiler. -AS_IF([test "$OMPI_WANT_FORTRAN_BINDINGS" != "1"],[F77=no FC=no]) +AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS"],[F77=no FC=no]) LT_INIT([dlopen win32-dll]) diff --git a/ompi/include/ompi_config.h b/ompi/include/ompi_config.h index 087d58ecc8..a7a2c1fa08 100644 --- a/ompi/include/ompi_config.h +++ b/ompi/include/ompi_config.h @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -54,11 +56,4 @@ # endif # endif -/* Convenience */ -#if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS || OMPI_BUILD_FORTRAN_USEMPI_BINDINGS || OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -#define OMPI_BUILD_FORTRAN_BINDINGS 1 -#else -#define OMPI_BUILD_FORTRAN_BINDINGS 0 -#endif - #endif diff --git a/ompi/tools/ompi_info/param.c b/ompi/tools/ompi_info/param.c index dca5dfc76e..12f40c2027 100644 --- a/ompi/tools/ompi_info/param.c +++ b/ompi/tools/ompi_info/param.c @@ -156,7 +156,7 @@ void ompi_info_do_config(bool want_all) /* setup the strings that don't require allocations*/ cxx = OMPI_BUILD_CXX_BINDINGS ? "yes" : "no"; - if (OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPI_BINDINGS) { if (OMPI_FORTRAN_HAVE_IGNORE_TKR) { fortran_usempi = "yes (full: ignore TKR)"; } else { @@ -165,7 +165,7 @@ void ompi_info_do_config(bool want_all) } else { fortran_usempi = "no"; } - fortran_usempif08 = OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS ? "yes" : "no"; + fortran_usempif08 = OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS ? "yes" : "no"; fortran_have_f08_assumed_rank = OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK ? "yes" : "no"; fortran_build_f08_subarrays = OMPI_BUILD_FORTRAN_F08_SUBARRAYS ? @@ -197,7 +197,7 @@ void ompi_info_do_config(bool want_all) /* Build a string describing what level of compliance the mpi_f08 module has */ char f08_msg[1024]; - if (OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS) { /* Do we have everything? (not including PROTECTED, which isn't *needed* for the mpi_f08 module compliance -- it's @@ -255,9 +255,9 @@ void ompi_info_do_config(bool want_all) cprofiling = OMPI_ENABLE_MPI_PROFILING ? "yes" : "no"; cxxprofiling = (OMPI_BUILD_CXX_BINDINGS && OMPI_ENABLE_MPI_PROFILING) ? "yes" : "no"; cxxexceptions = (OMPI_BUILD_CXX_BINDINGS && OMPI_HAVE_CXX_EXCEPTION_SUPPORT) ? "yes" : "no"; - fortran_mpifh_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_MPIFH_BINDINGS) ? "yes" : "no"; - fortran_usempi_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) ? "yes" : "no"; - fortran_usempif08_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) ? "yes" : "no"; + fortran_mpifh_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) ? "yes" : "no"; + fortran_usempi_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPI_BINDINGS) ? "yes" : "no"; + fortran_usempif08_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS) ? "yes" : "no"; have_dl = OPAL_HAVE_DL_SUPPORT ? "yes" : "no"; #if OMPI_RTE_ORTE mpirun_prefix_by_default = ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ? "yes" : "no"; @@ -269,7 +269,7 @@ void ompi_info_do_config(bool want_all) topology_support = OPAL_HAVE_HWLOC ? "yes" : "no"; /* setup strings that require allocation */ - if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { (void)asprintf(&fortran_mpifh, "yes (%s)", (OPAL_HAVE_WEAK_SYMBOLS ? "all" : (OMPI_FORTRAN_CAPS ? "caps" : @@ -453,9 +453,7 @@ void ompi_info_do_config(bool want_all) /* May or may not have the other Fortran sizes */ - if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS || - OMPI_BUILD_FORTRAN_USEMPI_BINDINGS || - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { opal_info_out("Fort have integer1", "compiler:fortran:have:integer1", OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no"); opal_info_out("Fort have integer2", "compiler:fortran:have:integer2", diff --git a/oshmem/tools/oshmem_info/param.c b/oshmem/tools/oshmem_info/param.c index 999fa06150..6299e79d23 100644 --- a/oshmem/tools/oshmem_info/param.c +++ b/oshmem/tools/oshmem_info/param.c @@ -146,7 +146,7 @@ void oshmem_info_do_config(bool want_all) /* setup the strings that don't require allocations*/ cxx = OMPI_BUILD_CXX_BINDINGS ? "yes" : "no"; - if (OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPI_BINDINGS) { if (OMPI_FORTRAN_HAVE_IGNORE_TKR) { fortran_usempi = "yes (full: ignore TKR)"; } else { @@ -155,7 +155,7 @@ void oshmem_info_do_config(bool want_all) } else { fortran_usempi = "no"; } - fortran_usempif08 = OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS ? "yes" : "no"; + fortran_usempif08 = OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS ? "yes" : "no"; fortran_have_f08_assumed_rank = OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK ? "yes" : "no"; fortran_build_f08_subarrays = OMPI_BUILD_FORTRAN_F08_SUBARRAYS ? @@ -174,7 +174,7 @@ void oshmem_info_do_config(bool want_all) /* Build a string describing what level of compliance the mpi_f08 module has */ char f08_msg[1024]; - if (OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS) { /* Do we have everything? */ if (OMPI_BUILD_FORTRAN_F08_SUBARRAYS && @@ -230,9 +230,9 @@ void oshmem_info_do_config(bool want_all) cprofiling = OMPI_ENABLE_MPI_PROFILING ? "yes" : "no"; cxxprofiling = (OMPI_BUILD_CXX_BINDINGS && OMPI_ENABLE_MPI_PROFILING) ? "yes" : "no"; cxxexceptions = (OMPI_BUILD_CXX_BINDINGS && OMPI_HAVE_CXX_EXCEPTION_SUPPORT) ? "yes" : "no"; - fortran_mpifh_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_MPIFH_BINDINGS) ? "yes" : "no"; - fortran_usempi_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) ? "yes" : "no"; - fortran_usempif08_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) ? "yes" : "no"; + fortran_mpifh_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) ? "yes" : "no"; + fortran_usempi_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPI_BINDINGS) ? "yes" : "no"; + fortran_usempif08_profiling = (OMPI_ENABLE_MPI_PROFILING && OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS) ? "yes" : "no"; have_dl = OPAL_HAVE_DL_SUPPORT ? "yes" : "no"; #if OMPI_RTE_ORTE mpirun_prefix_by_default = ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ? "yes" : "no"; @@ -244,7 +244,7 @@ void oshmem_info_do_config(bool want_all) topology_support = OPAL_HAVE_HWLOC ? "yes" : "no"; /* setup strings that require allocation */ - if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { (void)asprintf(&fortran_mpifh, "yes (%s)", (OPAL_HAVE_WEAK_SYMBOLS ? "all" : (OMPI_FORTRAN_CAPS ? "caps" : @@ -401,9 +401,7 @@ void oshmem_info_do_config(bool want_all) /* May or may not have the other Fortran sizes */ - if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS || - OMPI_BUILD_FORTRAN_USEMPI_BINDINGS || - OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) { + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { opal_info_out("Fort have integer1", "compiler:fortran:have:integer1", OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no"); opal_info_out("Fort have integer2", "compiler:fortran:have:integer2",