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

Getting started with custom MKL dll

Weeks__John
Novice
1,219 Views

I have just installed Intel Parallel Studio XE 2020 update 2, and I would like to build a custom dll for MKL. It seems like there may be a problem with installation, and I seem to be pretty clueless. If there is some detailed description that assumes no knowledge, point me at it!

Can I copy the libintel64.sln and supporting folders/files to a location in my user folders? Seems like I should, and it seems bad to alter the files in the installation directory.

I changed the listed library to mkl_intel_ilp64.lib to support the ilp64 interface. Regradless, trying to build I get errors that the libraries can't be found:

Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'mkl_intel_lp64.lib' lp64_parallel C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.2.254\windows\mkl\tools\builder\MSVS_Projects\VS2019\libintel64\lp64_parallel\LINK 1

It appears that the path the libraries depends on a variable MKLROOT. My guess is that it has not been correctly set. How does it get set? Is it part of the initialization process described the Before You Begin document? That is, run psxevars.bat. I need to build both 32- and 64-bit applications, so I ran it twice. Is that OK?

I am using VS 2019 community edition.

0 Kudos
1 Solution
Weeks__John
Novice
1,169 Views

Well, naturally, the answer is simple...

 

I looked again at the MKL documentation, and found this:

"Set the  MKLROOT environment variable with the installation directory of the  Intel® MKL version you are going to use."

So I created the MKLROOT environment variable in the system settings, and guessed that the path I needed is "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.2.254\windows\mklC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.2.254\windows\mkl". Now I can build the example solution AFTER RESTARTING visual studio.

On to the next problem...

View solution in original post

0 Kudos
2 Replies
Weeks__John
Novice
1,170 Views

Well, naturally, the answer is simple...

 

I looked again at the MKL documentation, and found this:

"Set the  MKLROOT environment variable with the installation directory of the  Intel® MKL version you are going to use."

So I created the MKLROOT environment variable in the system settings, and guessed that the path I needed is "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.2.254\windows\mklC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.2.254\windows\mkl". Now I can build the example solution AFTER RESTARTING visual studio.

On to the next problem...

0 Kudos
MRajesh_intel
Moderator
915 Views

Hi,

 

Thanks for accepting as a Solution!

 

As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

 

Have a Good day.

 

Regards

Rajesh

 

0 Kudos
Reply