Skip to content
Permalink
Browse files

build system: set variable CXXOMPFLAGS needed by DBCSR

If omitted, DBCSR's C++ code gets compiled without OpenMP support,
leading to race conditions (observed on OLCF's Summit)
Add this variable to the toolchain as well as to the relevant arch
files.

Fixes #338
  • Loading branch information...
shoshijak authored and alazzaro committed May 7, 2019
1 parent 4d39f47 commit bd8dc147d0536926c78ca2e9075878bd136bf16d
@@ -13,6 +13,7 @@ GPUVER = K20X

CPPFLAGS =
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
DFLAGS = -D__FFTW3 -D__parallel -D__SCALAPACK -D__HAS_smm_dnn -D__ACC -D__DBCSR_ACC
CFLAGS = $(DFLAGS)
FCFLAGS = $(DFLAGS) -O3 -fopenmp -mavx -funroll-loops -ftree-vectorize \
@@ -14,6 +14,7 @@ GPUVER = K20X

CPPFLAGS =
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
DFLAGS = -D__GEMINI -D__FFTW3 -D__parallel -D__SCALAPACK -D__HAS_smm_dnn -D__ACC -D__DBCSR_ACC
CFLAGS = $(DFLAGS)
FCFLAGS = $(DFLAGS) -O3 -fopenmp -march=bdver1 -funroll-loops -ftree-vectorize \
@@ -19,6 +19,7 @@ GPUVER = K20X

CPPFLAGS =
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
DFLAGS = -D__GFORTRAN -D__parallel -D__SCALAPACK -D__BLACS -D__FFTSG -D__LIBINT -D__ACC -D__DBCSR_ACC -D__HAS_smm_dnn -D__HWLOC
GFLAGS = -g -fopenmp -O3 $(DFLAGS)
FCFLAGS = -ffree-form -fcray-pointer $(GFLAGS)
@@ -26,6 +26,7 @@ DFLAGS = -D__CUDAPW -D__FFTW3
CFLAGS = -O2
CPPFLAGS = -traditional -C $(DFLAGS) -P -I/opt/intel/mkl/10.0.1.014/include/fftw
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
NVFLAGS = $(DFLAGS) -Xcompiler='-fopenmp' --std=c++11
FCFLAGS = $(DFLAGS) -O2 -xW
MKLPATH = /opt/intel/mkl/10.0.1.014/lib/em64t/
@@ -29,6 +29,7 @@ DFLAGSCU = $(DFLAGSBASE) -Dcpu_d_gemm=dgemm -Dcpu_d_symm=dsymm
CFLAGS = -O2
CPPFLAGS = -traditional -C $(DFLAGS) -P -I/opt/intel/mkl/10.0.1.014/include/fftw
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
CPPFLAGSCU = -traditional -C $(DFLAGSCU) -P -I/opt/intel/mkl/10.0.1.014/include/fftw
NVFLAGS = $(DFLAGS) -arch sm_13 -deviceemu -Xcompiler='-fopenmp' --std=c++11
FCFLAGS = $(DFLAGS) -O2 -xW
@@ -11,6 +11,7 @@ GPUVER = K20X

CPPFLAGS =
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp
DFLAGS = -D__parallel -D__SCALAPACK -D__ACC -D__DBCSR_ACC
FCFLAGS = -g -O3 -ffree-form $(DFLAGS) -I$(GFORTRAN_INC)
LDFLAGS = $(FCFLAGS)
@@ -9,6 +9,7 @@ GPUVER = K20X

CPPFLAGS =
CXXFLAGS = -O3 -I${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = -fopenmp

#https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html

@@ -159,6 +159,7 @@ gen_arch_file() {
#
CXX = \${CC}
CXXFLAGS = \${CXXFLAGS} -I\\\${CUDA_PATH}/include -std=c++11
CXXOMPFLAGS = IF_OMP(-fopenmp|)
GPUVER = \${GPUVER}
NVCC = \${NVCC} -D__GNUC__=4 -D__GNUC_MINOR__=9
NVFLAGS = \${NVFLAGS}

0 comments on commit bd8dc14

Please sign in to comment.
You can’t perform that action at this time.