Skip to content

Commit 8fb23ec

Browse files
authored
Refactor Make.nrel to use MPT for MPI with the Intel compiler on Eagle. (AMReX-Codes#2861)
1 parent 6f9a46c commit 8fb23ec

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

Tools/GNUMake/sites/Make.nrel

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,32 @@ else ifeq ($(which_computer), rhodes)
4040
endif
4141
endif
4242

43-
# Account for Intel-MPI, MPICH, OpenMPI, and HPE MPT
4443
ifeq ($(USE_MPI),TRUE)
44+
CXX := mpicxx
45+
CC := mpicc
46+
FC := mpif90
47+
F90 := mpif90
4548
ifeq ($(COMP), intel)
46-
CXX := mpiicpc
47-
CC := mpiicc
48-
FC := mpiifort
49-
F90 := mpiifort
50-
else
51-
CXX := mpicxx
52-
CC := mpicc
53-
FC := mpif90
54-
F90 := mpif90
55-
ifneq ($(findstring mpich, $(shell $(F90) -show 2>&1)),)
56-
mpif90_link_flags := $(shell $(F90) -link_info)
57-
LIBRARIES += $(wordlist 2,1024,$(mpif90_link_flags))
58-
else ifneq ($(findstring Open MPI, $(shell $(F90) -showme:version 2>&1)),)
59-
mpif90_link_flags := $(shell $(F90) -showme:link)
60-
LIBRARIES += $(mpif90_link_flags)
61-
else
62-
# MPT case (no option available to query link flags)
63-
LIBRARIES += -lmpi
49+
ifeq ($(which_computer), eagle)
50+
# Always assume MPT on Eagle
51+
export MPICXX_CXX := icpc
52+
export MPICC_CC := icc
53+
export MPIF90_F90 := ifort
54+
else ifeq ($(which_computer), rhodes)
55+
CXX := mpiicpc
56+
CC := mpiicc
57+
FC := mpiifort
58+
F90 := mpiifort
6459
endif
6560
endif
61+
ifneq ($(findstring mpich, $(shell $(F90) -show 2>&1)),)
62+
mpif90_link_flags := $(shell $(F90) -link_info)
63+
LIBRARIES += $(wordlist 2,1024,$(mpif90_link_flags))
64+
else ifneq ($(findstring Open MPI, $(shell $(F90) -showme:version 2>&1)),)
65+
mpif90_link_flags := $(shell $(F90) -showme:link)
66+
LIBRARIES += $(mpif90_link_flags)
67+
else
68+
# MPT case (no option available to query link flags)
69+
LIBRARIES += -lmpi
70+
endif
6671
endif

0 commit comments

Comments
 (0)