Linker error with intel/19.0.5 on macOS Catalina

9 views
Skip to first unread message

Franco Milicchio

unread,
Dec 11, 2019, 11:59:16 AM12/11/19
to deal.II User Group
Dear all,

I have read the following posts on Intel's compiler version 19.0.5 on macOS Catalina 10.15.1:

Now I can complete the CMake phase, but compilation fails with a linker error with std::string:

[  1%] Linking CXX executable ../../bin/expand_instantiations
Undefined symbols for architecture x86_64:
  "__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcm", referenced from:
      __Z15read_whole_fileRNSt3__113basic_istreamIcNS_11char_traitsIcEEEE in expand_instantiations.cc.o
      __Z15remove_commentsNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in expand_instantiations.cc.o

In my installation, I have PETSc, SLEPc, Intel's TBB, disabled C++17, and I am compiling in release mode. The linker call is the following, be aware that DEAL_II_SETUP_DEFAULT_COMPILER is set to ON:

/opt/intel/bin/icpc   -Wl,-search_paths_first -Wl,-headerpad_max_install_names -shared-intel -qopenmp CMakeFiles/expand_instantiations_exe.dir/expand_instantiations.cc.o  -o ../../bin/expand_instantiations 

PETSc and SLEPc use Intel's MKL, and of course, Intel's compilers. Has anyone encountered a similar problem?

One little doubt in addition to that: I'd like to set -Ofast, but setting that with DEAL_II_CXX_FLAGS_RELEASE (which I use to set some tuning like SIMD optimizations) goes in conflict with the default -O2 set by the script.

Is there a "correct" way of specifying the Release optimization level in the Deal.II CMake scripts?

Thanks for any suggestion!
    Franco

Franco Milicchio

unread,
Dec 13, 2019, 8:14:51 AM12/13/19
to deal.II User Group
After some forum search, the workaround is horrible: do not use Intel compiler for Deal.II. 

PETSc and SLEPc compile and link just fine, but as it happens, the linking phase with Intel and Xcode is quite messy, and they do not support Xcode 11 or macOS Catalina, but hopefully, they will in the future.

References:
Reply all
Reply to author
Forward
0 new messages