Make file for intel64 compiler
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Make file for intel64 compiler
- This topic has 2 replies, 2 voices, and was last updated 4 years, 4 months ago by duldul.
-
AuthorPosts
-
June 9, 2020 at 3:46 am #5025duldulParticipant
Hello,
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-1I 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.
Thanking you.Regards
DuldulJune 9, 2020 at 10:13 am #5026AdrianKeymasterI suspect that you did not change the
CXX
variable toicpc -D__aligned__=ignored
. This would explain why you still getg++
errors. For reference see the contents of aconfig.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_DEBUGCXXFLAGS := $(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 compilerLDFLAGS :=
PARALLEL_MODE := OFF
#PARALLEL_MODE := MPI
#PARALLEL_MODE := OMP
#PARALLEL_MODE := HYBRIDMPIFLAGS :=
OMPFLAGS := -fopenmpBUILDTYPE := precompiled
#BUILDTYPE := genericI hope that this will solve the problem.
June 9, 2020 at 12:07 pm #5027duldulParticipantThank 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.Regards
Duldul -
AuthorPosts
- You must be logged in to reply to this topic.