Search code examples
openmpwindows-subsystem-for-linuxdynamic-linkingintel-mkl

Symbol lookup error with Intel MKL on WSL


I have a C++ project and built it with CMake. I have no problem on Windows. However when I tried it on WSL I got symbol lookup error: /opt/intel/oneapi/mkl/latest/lib/libmkl_intel_thread.so.2: undefined symbol: omp_get_num_procs. On configuration I am not getting any error.

In PATH I have /opt/intel/oneapi/2024.0/lib/. I have:

  • MKL_ROOT=/opt/intel/oneapi/mkl/latest/
  • IPP_ROOT=/opt/intel/oneapi/ipp/latest
  • LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

as environment variables.

Note:

WSL Ubuntu 22.04.3 LTS. WSL 2

I get no error or warning while building. I have also successfully run different tests where I don't use MKL.


Solution

  • Problem was on WSL some runtime libs of openMP does not installed when installed essentials. So run:

    sudo apt install libomp-dev