Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit d7e6daf

Browse files
committed
configury: do not build usempif08 is PMPI is not built
this is a revamp of commit open-mpi/ompi@2d1a8fa Thanks Jeff for the review !
1 parent 7c935a2 commit d7e6daf

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

config/ompi_setup_mpi_fortran.m4

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,21 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
367367

368368
# We need to have ignore TKR functionality to build the mpi_f08
369369
# module
370-
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS &&
370+
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
371371
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
372372
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
373373
OMPI_FORTRAN_F08_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
374374
OMPI_FORTRAN_F08_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
375375
])
376376

377-
# F08 bindings require the usempi PMPI profiling bindings
378-
AS_IF([test "$WANT_MPI_PROFILING" -eq 0],
379-
[OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
380-
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
381-
AC_MSG_WARN([PMPI is not built, cannot build usempif08 bindings])])
377+
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
378+
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
379+
[ # If we don't have PMPI, we won't build mpi_f08 at all
380+
AC_MSG_CHECKING([whether PMPI is enabled])
381+
AS_IF([test $WANT_MPI_PROFILING -eq 1],
382+
[AC_MSG_RESULT([yes])],
383+
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
384+
AC_MSG_RESULT([no])])])
382385

383386
# The overall "_BIND_C" variable will be set to 1 if we have all
384387
# the necessary forms of BIND(C)

0 commit comments

Comments
 (0)