Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust build for upstream Mpich and OpenMPI modules on Perlmutter. #3486

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions Tools/GNUMake/sites/Make.nersc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ ifeq ($(which_computer),$(filter $(which_computer),perlmutter))
endif
endif

ifeq ($(USE_CUDA),TRUE)
ifdef MPICH_ROOT
CFLAGS += -Xcompiler='$(filter-out -Wl%, $(wordlist 2,1024,$(shell mpicc -show 2> /dev/null)))'
CXXFLAGS += -Xcompiler='$(filter-out -Wl%, $(wordlist 2,1024,$(shell mpicxx -show 2> /dev/null)))'
else ifdef OPENMPI_ROOT
CFLAGS += -Xcompiler='$(filter-out -Wl%, $(wordlist 2,1024,$(shell mpicc -show 2> /dev/null)))'
CXXFLAGS += -Xcompiler='$(filter-out -Wl%, $(wordlist 2,1024,$(shell mpicxx -show 2> /dev/null)))'
else
CFLAGS += -Xcompiler='$(wordlist 2,1024,$(shell cc -craype-verbose 2> /dev/null))'
CXXFLAGS += -Xcompiler='$(wordlist 2,1024,$(shell CC -craype-verbose 2> /dev/null))'
endif
else ifeq ($(USE_MPI),FALSE)
CFLAGS += $(wordlist 2,1024,$(shell cc -craype-verbose 2> /dev/null))
CXXFLAGS += $(wordlist 2,1024,$(shell CC -craype-verbose 2> /dev/null))
endif

ifeq ($(USE_CUDA),TRUE)
ifdef NPE_VERSION
CFLAGS += -Xcompiler='$(filter-out -Wl%, $(wordlist 2,1024,$(shell mpicc -show 2> /dev/null)))'
Expand Down Expand Up @@ -64,13 +80,20 @@ ifeq ($(which_computer),$(filter $(which_computer),perlmutter))

comm := ,
ifneq ($(BL_NO_FORT),TRUE)
ifdef NPE_VERSION
ifdef MPICH_ROOT
# Set to mpicxx to avoid this warning:
# cc1plus: warning: command-line option '-fallow-argument-mismatch' is valid for Fortran but not for C++
# Can just be filtered out, or is cxx fine?
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(wordlist 2,1024,$(shell mpicxx -show)))
else ifdef OPENMPI_ROOT
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(wordlist 2,1024,$(shell mpifort -show)))
else
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(shell ftn --cray-print-opts=libs))
endif
else
ifdef NPE_VERSION
ifdef MPICH_ROOT
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(wordlist 2,1024,$(shell mpicxx -show)))
else ifdef OPENMPI_ROOT
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(wordlist 2,1024,$(shell mpicxx -show)))
else
LIBRARIES += $(subst -Wl$(comm),-Xlinker=,$(shell CC --cray-print-opts=libs))
Expand Down
Loading