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

MKL Linking

JohnNichols
Valued Contributor III
358 Views

Dear Fellow Programmers:

I am lost - the MKL library includes a set of routines held in the REDIST folders. Intel supplied a nice make file to compile PARDISO as called from C#. The make file I can run from a folder on the desktop using a Intel 64 Visual Studio Mode console screen, and it runs perfectly, with REDIST added to the path.

But if I go and execute the file from the Windows folder, I get an error on the DLL location.

If I copy the DLL's over to the folder, it runs. 

What happens to the path between running from the console location and the windows folder ie the two locations, it is still set because if I use a console I can rerun the program without hassles?

JMN

0 Kudos
7 Replies
mecej4
Honored Contributor III
358 Views

If the directory containing the MKL redistributables (specifically, the MKL DLLs) is not in the system path, you will not be able to run a program that requires those DLLs by opening the icon of the program in the Windows explorer. When you open the IFort command window, the batch file that is run to launch that console adds the MKL DLL directories to PATH.

You can add the path to the DLLs to the system PATH variable in the Computer->Properties->Advanced->Environmental Variables settings window, if you wish.

0 Kudos
JohnNichols
Valued Contributor III
358 Views

I can copy the DLL's from the MKL directory to the debug directory and the program runs quite nicely and correctly - a bit of a hassle but not excessive.

I tried adding the MKL directory holding the IA64 DLL's to the path command, I made sure I had the correct directory, I made sure the path command had changed and I rebooted the computer.  It still will not find the DLL's.

 

I can also get it to work quite nicely in the Intel Console Boot Windows.

Very strange.

JMN

0 Kudos
TimP
Honored Contributor III
358 Views

If you have IA64 dlls on PATH they will be ignored unless you are running on Itanium.  The dlls must match the .exe (ia32 32-bit, intel64/X64).  As far as I know Itanium Windows is no longer supported, although you might have some old components.

0 Kudos
Ying_H_Intel
Employee
358 Views

Hi John,

Right, the Path is a problem. Please see https://software.intel.com/en-us/articles/some-more-additional-tips-how-to-call-mkl-from-your-c-code/

Please make sure to add mkl intel64 dll path and libiomp5md.dll's path into system environment variable PATH if you run intel64 c# program.

Best Regards,

Ying

 

0 Kudos
JohnNichols
Valued Contributor III
358 Views

Dear Ying:

Right, the Path is a problem. Please see https://software.intel.com/en-us/articles/some-more-additional-tips-how-to-call-mkl-from-your-c-code/

-------------------------------------

I have that printed out from last week and sitting on my desk - next to my FORTRAN Bible. Thanks.  The IA64 bit architecture is an interesting problem.  It is just as easy to copy over the DLL's as long as you know why and not just think you are crazy because you have to.

JMN

0 Kudos
mecej4
Honored Contributor III
358 Views

JMN: I am pretty sure that you do not use an IA64 system (a.k.a. "Itanium" or, jocularly in some magazines, "Itanic"). If so, it is best for you to excise the acronym IA64 from your vocabulary., and use "x64" or "Intel-64" or "amd64" instead.

0 Kudos
JohnNichols
Valued Contributor III
358 Views

Intel64 - thanks

0 Kudos
Reply