Skip to content

Reply To: Make file for intel64 compiler

#5026
Adrian
Keymaster

I suspect that you did not change the CXX variable to icpc -D__aligned__=ignored. This would explain why you still get g++ errors. For reference see the contents of a config.mk file modified to use ICC:

#CXX := g++
CXX := icpc -D__aligned__=ignored
#CXX := mpiCC
#CXX := mpic++

CC := icc # necessary for zlib, for Intel use icc

#OPTIM := -O3 -Wall -march=native -mtune=native # for gcc
OPTIM := -O3 -Wall -xHost # for Intel compiler
#OPTIM := -O3 -Wall -xHost -ipo # optional for Intel compiler
DEBUG := -g -Wall -DOLB_DEBUG

CXXFLAGS := $(OPTIM)
#CXXFLAGS := $(DEBUG)

# compilation requires support for C++14
# works in:
# * gcc 5 or later (https://gcc.gnu.org/projects/cxx-status.html#cxx14)
# * icc 17.0 or later (https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler)
# * clang 3.4 or later (https://clang.llvm.org/cxx_status.html#cxx14)
CXXFLAGS += -std=c++14

#ARPRG := ar
ARPRG := xiar # mandatory for intel compiler

LDFLAGS :=

PARALLEL_MODE := OFF
#PARALLEL_MODE := MPI
#PARALLEL_MODE := OMP
#PARALLEL_MODE := HYBRID

MPIFLAGS :=
OMPFLAGS := -fopenmp

BUILDTYPE := precompiled
#BUILDTYPE := generic

I hope that this will solve the problem.