Hello, I am trying to compile a C++ source using OneAPI and MKL libraries under MacOS
I provide the following path for CMake for finding libraries
The code uses the following libraries:
list(APPEND MKL_LIBS "mkl_core" "mkl_gf_lp64" "mkl_gnu_thread" "pthread")
The mkl_core and pthread seem to be located successfully but cmake fails to locate mkl_gf_lp64 and mkl_gnu_thread and compilation fails with errors like this:
-- Seeking OneAPI libraries... -- Seeking for mkl_core in default path: /opt/intel/oneapi/mkl/latest... -- OK: mkl_core_LIB library successfully found -- Seeking for mkl_gf_lp64 in default path: /opt/intel/oneapi/mkl/latest... CMake Error at CMakeLists.txt:379 (message): OneAPI mkl_gf_lp64 library not found
How can I know if these libraries are installed with OneAPI base and HPC toolkits? Should I install these two libraries in a separate package?
I'd appreciate it if you could help me to resolve this issue.
Thanks for reaching out to us.
>>How can I know if these libraries are installed with OneAPI base and HPC toolkits?
We suggest you to make use of Link Line Advisor tool which helps you to see the recommended libraries for your use case and it shows them along with the path of the particular library in which they are present.
Here is the link for the tool:
I could see this mkl_gnu_thread library can be found for the Linux environment if we select GNU compilers with OpenMP threaded interface but not for macOS, so I guess this is the reason for the errors that you are getting as missing libraries.
But the GNU compilers (gcc/gfortran) are compatible with the OpenMP RTL of the Intel compiler.
For more details please refer
So try with the suggestions of the Link line advisor and see if it helps in resolving the issue, else you can get back to us.
>>... using link advisor helped me to replace the libraries with available ones under Mac and compile the code successfully.
Thanks for the confirmation.
Glad to know that the provided information helped you.
As the issue is resolved, we are closing this thread. Please post a new question if you need any additional information from Intel as this thread will no longer be monitored.