Make file for intel64 compiler
June 9, 2020 at 3:46 am #5025duldulParticipant
I am trying to compile the library with intel64 (intel_2019.u0) compiler, and getting an error that ” g++: error: unrecognized command line option ‘-std=c++14’ “. This is because of g++ version used there is 4.8.5 while recommended is 5 or higher. I am using olb1.3-1
I don’t know how to play with makefiles so please tell me if I can do anything with “-std=c++14”.
Secondly I tried changing config.mk according to instructions given in the file for intel compilers.
line 31 CC := icc # necessary for zlib, for Intel use icc
line 33 #OPTIM := -O3 -Wall -march=native -mtune=native # for gcc
line 34 OPTIM := -O3 -Wall -xHost # for Intel compiler
line 48 #ARPRG := ar
line 49 ARPRG := xiar # mandatory for intel compiler
After this also I got the same error.
If I remove the line 46 (below):
line 46 # CXXFLAGS += -std=c++14
then the erro is “g++: error: language Host not recognized”
Please tell me what I need to do for the library to be compiled with intel compilers.
DuldulJune 9, 2020 at 10:13 am #5026AdrianKeymaster
I suspect that you did not change the
icpc -D__aligned__=ignored. This would explain why you still get
g++errors. For reference see the contents of a
config.mkfile 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
PARALLEL_MODE := OFF
#PARALLEL_MODE := MPI
#PARALLEL_MODE := OMP
#PARALLEL_MODE := HYBRID
OMPFLAGS := -fopenmp
BUILDTYPE := precompiled
#BUILDTYPE := generic
I hope that this will solve the problem.June 9, 2020 at 12:07 pm #5027duldulParticipant
Thank you Adrian
What you suspect is correct. I was missing this point, now I can compile the library with intel compilers.
Thank you very much.
- You must be logged in to reply to this topic.