Skip to content

Commit

Permalink
GNU Make: No need to query mpif90 if Fortran is not used. (AMReX-Code…
Browse files Browse the repository at this point in the history
…s#2852)

This minimize potential issues.
  • Loading branch information
WeiqunZhang authored Jun 23, 2022
1 parent fc0d646 commit 4872676
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Tools/GNUMake/sites/Make.unknown
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ifeq ($(USE_MPI),TRUE)

ifeq ($(LINK_WITH_FORTRAN_COMPILER),TRUE)
MPI_OTHER_COMP := mpicxx
else ifeq ($(BL_NO_FORT),TRUE)
MPI_OTHER_COMP := mpicxx
else
MPI_OTHER_COMP := mpif90
endif
Expand All @@ -55,7 +57,10 @@ ifeq ($(USE_MPI),TRUE)
mpi_link_flags := $(filter-out $(mpi_filter), $(mpi_link_flags))
endif

LIBRARIES += $(mpi_link_flags) $(mpicxx_link_libs)
LIBRARIES += $(mpi_link_flags)
ifneq ($(MPI_OTHER_COMP),mpicxx)
LIBRARIES += $(mpicxx_link_libs)
endif

# OpenMPI specific flag
# Uncomment if statement if flag causes issue with another compiler.
Expand Down

0 comments on commit 4872676

Please sign in to comment.