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

Link MKL 9.0 to VC++ 2008 express edition in Windows 8

Aram_K_
Beginner
458 Views

Hi. I need to link the MK libraray to my project. On Windows Vista (32 bit) it was somehow easy:

1) goto Tools->Options->VC++ Directories and add 'C:\Program Files\Intel\MKL\9.0\include' in "Include files" and 'C:\Program Files\Intel\MKL\9.0\ia32\lib' in 'Library files'.

2) add the neccessary files (libguide40.lib libguide.lib mkl_c_dll.lib mkl_ia32.lib mkl_lapack.lib mkl_s_dll.lib mkl_solver.lib) to the Project->Properties->Linker->Command Line.

Now it doesn't work, because of 64 bit platform. I changed the library path to C:\Program Files\Intel\MKL\9.0\ia64\lib, but it didn't even compile. Then I added the ia32 files as well, now it compiles, but fails to  run (MKL FATAL ERROR: Cannot load mkl_lapack64.dll). What should I do?

P.S. On my VS configuration options there is only one platform - Win32. Can it be the reason? How to solve that?

P.P.S. I know the question is stupid, and probably someone has asked this already, but please do not judge to strictly, I am just a beginner.

0 Kudos
9 Replies
crispybits
Beginner
458 Views

I've only used MKL v10 and VS2010 but:

Are you sure you want ia64, not em64t? ia64 is Itanium which is not common.

You should make a new configuration for 64 bit. I don't think VC++ 2008 comes with a 64 bit compiler so you'll nee to install the Windows 7.1 SDK first if there's no x64 option in the configuration platform dropdown box. This is almost certainly the first thing you'll have to do.

Change Configuration Properties -> General -> Platform toolset from v90 or v100 to Windows 7.1 SDK.

Put all the dlls it needs in the bin folder where you're running it from to make sure it can find them.

0 Kudos
Gennady_F_Intel
Moderator
458 Views

ia64 means aka Itanium. You need to select libraries from emt64 directory.

0 Kudos
Aram_K_
Beginner
458 Views

When I add only em64t files, it doesn't compile. It compiles only if I add mkl_c_dll.lib from ia32 folder. And after running it says 'can't find mkl_lapack64.dll'

0 Kudos
Gennady_F_Intel
Moderator
458 Views

that's because of you linked with the dynamic libs. In that case you need to add to the system's path the directory where these libs are located. please do that or link with static libraries.

0 Kudos
Gennady_F_Intel
Moderator
458 Views

btw, you need to know that this version is obsoleted and no longer supported. Moreover, this version is not optimized for all modern microarchitectures.  We would recommend you to try the latest 11.1 version. The eval version available for 30days. 

0 Kudos
SergeyKostrov
Valued Contributor II
458 Views
>>...When I add only em64t files, it doesn't compile. It compiles only if I add mkl_c_dll.lib from ia32 folder. And after running it says >>'can't find mkl_lapack64.dll' In case of Express Editions of Visual Studios you need to set paths to folders with libraries and executables ( DLLs ) manually ( as Windows envorinment variables ).
0 Kudos
Aram_K_
Beginner
458 Views

I don't link with dll-s, only with libs. The corresponding path is of course added in VC++ directories->Library files.

0 Kudos
SergeyKostrov
Valued Contributor II
458 Views
The runtime error was ( from the 1st post ): ... MKL FATAL ERROR: Cannot load mkl_lapack64.dll ... and this is because MKL's mkl_core.dll or mkl_rt.dll could not find mkl_lapack64.dll. Please also verify that mkl_lapack64.dll exists in Redist\ia64 folder.
0 Kudos
TimP
Honored Contributor III
458 Views

You never answered with confirmation that when you said 64-bit platform you meant Itanium, which has become quite unusual, and seems to contradict your statement about ability to run when linked against "32-bit files" (32-bit MKL?).  If you were running Windows on Itanium (which I think went off support) you would have no 32-bit development tools.

No 64-bit compiler "comes with" VS2008 Express, so you would not be able to link any 64-bit libraries against that 32-bit compiler.  You did state clearly that you were trying to use at least the OpenMP dll of MKL.  VS2008 Pro has an optional installation of X64 C++ compiler which could link against the Intel64/em64t MKL libraries.  The 32-bit compiler/link combination will pass over 64-bit .lib and  ignore them.

0 Kudos
Reply