Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

fatal error: 'mkl.h' file not found

A_P
Beginner
1,770 Views

Hi, this the first time I’m trying to run C++ code in command line and I need to use mkl.h library. I have downloaded the oneAPI base toolkit but I don't know how to make the command line knows the downloaded library.

 

I am using terminal on macos system.

0 Kudos
3 Replies
VidyalathaB_Intel
Moderator
1,756 Views

Hi,

 

Thanks for reaching out to us.

 

You can follow the link line advisor suggestions for successfully compiling and linking your application with MKL.

 

Link Line advisor tool helps you to get the compiling and linking options with respect to your environment.

 

Here is the link for the link line advisor tool:

https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html?wapkw=link%20line%20advisor#gs.pzy22d

 

Another way is to simply include the -qmkl option in your command

 

Reference link:

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-macos-developer-guide/top/linking-your-application-with-onemkl/linking-quick-start/using-the-qmkl-compiler-option.html

 

icpc -qmkl <filename.cpp>

 

(icpc is the Intel compiler for C++ language and you can get this by downloading oneAPI HPC Toolkit)

Before this, you need to run the setvars.sh script file(command: source /opt/intel/oneapi/setvars.sh) to set the environment variables

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-macos-developer-guide/top/getting-started/setting-environment-variables.html

 

Let us know if you face any issues.

 

Regards,

Vidya.

 

0 Kudos
VidyalathaB_Intel
Moderator
1,732 Views

Hi,


Reminder:


Could you please provide us with an update regarding the issue? If it is resolved, please confirm whether we can close this thread from our end.


Regards,

Vidya.


0 Kudos
VidyalathaB_Intel
Moderator
1,715 Views

Hi,


As we haven't heard back from you, we assume that your issue is resolved with the provided information in the previous posts and hence 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.


0 Kudos
Reply