Skip to content

Make file for intel64 compiler

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Make file for intel64 compiler

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5025
    duldul
    Participant

    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-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.
    Thanking you.

    Regards
    Duldul

    #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.

    #5027
    duldul
    Participant

    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.

    Regards
    Duldul

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.