- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using visual studio on windows for my C++ programing, and I'm trying to use the MKL library for the first time. I have never had the chance to install or use it before, which is probably why I'm having difficulties.
I downloaded oneAPI Base Toolkit from this link: Accelerate Fast Math with Intel® oneAPI Math Kernel Library , and installed it. I'm guessing the installation went well as i can now have option to use intel compiler (when I'm right clicking on my project name I have option "use intel openAPI C++ compiler").
I changed the include directory to C:\Program Files (x86)\Intel\oneAPI\mkl\2023.0.0\include , and included the "mkl.h" header file.
I changed the linking directory to C:\Program Files (x86)\Intel\oneAPI\mkl\2023.0.0\lib\intel64 , and added all the lib files in this folder to "Additional dependencies" in the project properties.
I set "Intel Libraries for oneAPI" setting as shown in the attached photo, and I'm trying to compile an example to took from Intel user guide for MKL and I get all these error that also can be seen in the attached photo.
I will be glad if someone can help me with this specific example and with general guidance for a beginner user, it seems that I'll be need to use MKL a lot for my Phd research, so any kind of help will be useful.
Thank you!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
>>can help me with this specific example
Please find the path for complete MKL examples(C:\Program Files (x86)\Intel\oneAPI\mkl\2023.0.0\examples) and also please find this Getting Started link for the Intel MKL
You can use both the Intel oneAPI command prompt as well as Visual Studio for running the MKL examples.
1) If you are using the Intel oneAPI command prompt(which comes when we do windows search), then the oneAPI environment will be initialized. We tried for the axpy.cpp(mkl + dpcpp) example and able to compile with the below command:
For Compiling : dpcpp /Qmkl -I"C:\Program Files (x86)\Intel\oneAPI\mkl\2023.0.0\examples\examples_dpcpp\dpcpp\common" axpy.cpp -lOpenCL -DSYCL_DEVICES_all
For Running : a.exe
2) And, the project properties changes made by you are correct might be wrong in selecting the compiler. If you are using Intel MKL with SYCL code, you can select the Intel DPCPP compiler, or for Core MKL examples you can select the Intel C++ compiler to run. We have tried with an example axpy.cpp(mkl+dpcpp code), please find the attached file and the results of it.
Could you please try the attached project file and let us know if you are facing any errors? If your problem persists, please let us know the Visual Studio version and sub-version you are using.
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. Could you please provide us with an update on your issue?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. This thread will no longer be monitored by Intel. If you need additional information, please start a new question.
Thanks & Regards,
Varsha

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page