Merge pull request #73 from tom91136/master

Added support for Cray, PGI, and Armclang for Kokkos and OpenMP
This commit is contained in:
Tom Deakin 2020-07-14 14:02:18 +01:00 committed by GitHub
commit d28df3b71e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -36,15 +36,18 @@ ifndef COMPILER
define compiler_help define compiler_help
Set COMPILER to change flags (defaulting to GNU). Set COMPILER to change flags (defaulting to GNU).
Available compilers are: Available compilers are:
GNU INTEL GNU INTEL CRAY PGI ARMCLANG
endef endef
$(info $(compiler_help)) $(info $(compiler_help))
COMPILER=GNU COMPILER=GNU
endif endif
COMPILER_ARMCLANG = armclang++
COMPILER_GNU = g++ COMPILER_GNU = g++
COMPILER_INTEL = icpc -qopt-streaming-stores=always COMPILER_INTEL = icpc -qopt-streaming-stores=always
COMPILER_CRAY = CC
COMPILER_PGI = pgc++
CXX = $(COMPILER_$(COMPILER)) CXX = $(COMPILER_$(COMPILER))
ifndef TARGET ifndef TARGET
@ -67,6 +70,14 @@ CXXFLAGS = -O3
LINKFLAGS = # empty for now LINKFLAGS = # empty for now
ifeq ($(COMPILER), GNU)
ifeq ($(DEVICE), OpenMP)
CXXFLAGS += -fopenmp
LINKFLAGS += -fopenmp
endif
endif
include $(KOKKOS_PATH)/Makefile.kokkos include $(KOKKOS_PATH)/Makefile.kokkos
kokkos-stream: $(OBJ) $(KOKKOS_LINK_DEPENDS) kokkos-stream: $(OBJ) $(KOKKOS_LINK_DEPENDS)

View File

@ -3,7 +3,7 @@ ifndef COMPILER
define compiler_help define compiler_help
Set COMPILER to change flags (defaulting to GNU). Set COMPILER to change flags (defaulting to GNU).
Available compilers are: Available compilers are:
CLANG CRAY GNU INTEL XL PGI NEC CLANG CRAY GNU INTEL XL PGI NEC ARMCLANG
endef endef
$(info $(compiler_help)) $(info $(compiler_help))
@ -21,6 +21,7 @@ $(info $(target_help))
TARGET=CPU TARGET=CPU
endif endif
COMPILER_ARMCLANG = armclang++
COMPILER_GNU = g++ COMPILER_GNU = g++
COMPILER_INTEL = icpc COMPILER_INTEL = icpc
COMPILER_CRAY = CC COMPILER_CRAY = CC
@ -40,6 +41,7 @@ FLAGS_NEC = -O4 -finline -std=c++11
CXXFLAGS = $(FLAGS_$(COMPILER)) CXXFLAGS = $(FLAGS_$(COMPILER))
# OpenMP flags for CPUs # OpenMP flags for CPUs
OMP_ARMCLANG_CPU = -fopenmp
OMP_GNU_CPU = -fopenmp OMP_GNU_CPU = -fopenmp
OMP_INTEL_CPU = -qopenmp OMP_INTEL_CPU = -qopenmp
OMP_CRAY_CPU = -fopenmp OMP_CRAY_CPU = -fopenmp