From 050a27ca833345f73f50182d7d35c7bd1eb9a87b Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Fri, 24 Feb 2017 17:37:30 +0000 Subject: [PATCH] Add XL compiler support to OpenMP and RAJA makefiles --- OpenMP.make | 5 ++++- RAJA.make | 13 ++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/OpenMP.make b/OpenMP.make index 32f46ca..28b5326 100644 --- a/OpenMP.make +++ b/OpenMP.make @@ -3,7 +3,7 @@ ifndef COMPILER define compiler_help Set COMPILER to change flags (defaulting to GNU). Available compilers are: - CLANG CRAY GNU INTEL + CLANG CRAY GNU INTEL XL endef $(info $(compiler_help)) @@ -25,12 +25,14 @@ COMPILER_GNU = g++ COMPILER_INTEL = icpc COMPILER_CRAY = CC COMPILER_CLANG = clang++ +COMPILER_XL = xlc++ CXX = $(COMPILER_$(COMPILER)) FLAGS_GNU = -O3 -std=c++11 FLAGS_INTEL = -O3 -std=c++11 -xHOST FLAGS_CRAY = -O3 -hstd=c++11 FLAGS_CLANG = -O3 -std=c++11 +FLAGS_XL = -O5 -qarch=pwr8 -qtune=pwr8 -std=c++11 CXXFLAGS = $(FLAGS_$(COMPILER)) # OpenMP flags for CPUs @@ -38,6 +40,7 @@ OMP_GNU_CPU = -fopenmp OMP_INTEL_CPU = -qopenmp OMP_CRAY_CPU = -homp OMP_CLANG_CPU = -fopenmp=libomp +OMP_XL_CPU = -qsmp=omp -qthreaded # OpenMP flags for NVIDIA OMP_CRAY_NVIDIA = -DOMP_TARGET_GPU diff --git a/RAJA.make b/RAJA.make index bba45f5..01e807a 100644 --- a/RAJA.make +++ b/RAJA.make @@ -12,25 +12,28 @@ endif ifeq ($(TARGET), CPU) COMP=$(CXX) -CXXFLAGS = -O3 -std=c++11 -DRAJA_TARGET_CPU +CXXFLAGS = -DRAJA_TARGET_CPU ifndef COMPILER define compiler_help Set COMPILER to ensure correct OpenMP flags are set. Available compilers are: - INTEL GNU CRAY + INTEL GNU CRAY XL endef $(info $(compiler_help)) endif ifeq ($(COMPILER), INTEL) COMP = icpc -CXXFLAGS += -qopenmp +CXXFLAGS += -O3 -std=c++11 -qopenmp else ifeq ($(COMPILER), GNU) COMP = g++ -CXXFLAGS += -fopenmp +CXXFLAGS += -O3 -std=c++11 -fopenmp else ifeq ($(COMPILER), CRAY) COMP = CC -CXXFLAGS += +CXXFLAGS += -O3 -hstd=c++11 +else ifeq ($(COMPILER), XL) +COMP = xlc++ +CXXFLAGS += -O5 -std=c++11 -qarch=pwr8 -qtune=pwr8 -qsmp=omp -qthreaded endif else ifeq ($(TARGET), GPU)