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.

fatal error: 'mkl.h' file not found

A_P
Beginner
435 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
421 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=l...

 

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

 

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

 

Let us know if you face any issues.

 

Regards,

Vidya.

 

VidyalathaB_Intel
Moderator
397 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.


VidyalathaB_Intel
Moderator
380 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.


Reply