Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
6680 Discussions

OneAPI compiler fails to locate libraries "mkl_gf_lp64", "mkl_gnu_thread"

SMehrp
New Contributor I
489 Views

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

 

 

 

/opt/intel/oneapi/mkl/latest/lib
/opt/intel/oneapi/mkl/latest/include

 

 

 

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.

 

 

 

Labels (2)
0 Kudos
3 Replies
VidyalathaB_Intel
Moderator
458 Views

Hi Saeid,

 

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:

https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.x88y...

 

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

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-macos-developer-guide/top/linki...

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-macos-developer-guide/top/appen...

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.

 

Regards,

Vidya.

 

SMehrp
New Contributor I
409 Views

HI Vidya,

Thanks for the response, using link advisor helped me to replace the libraries with available ones under Mac and compile the code successfully.

Thanks!

VidyalathaB_Intel
Moderator
391 Views

Hi Saeid,


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


Regards,

Vidya.


Reply