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

Windows 7/8 64bits, intel mkl 32/64bits installed, 32bits win32 console project ====> PROBLEM

Pierre_L_4
Beginner
535 Views

Hello all,

I have seen these two topics

http://software.intel.com/en-us/forums/topic/283594

http://software.intel.com/en-us/forums/topic/401425#comment-1764824

strongly related to the problem I currently have with the MKL. This problem appears on windows 7 or 8, both 64bits, with intel cluster studio 32 & 64 bits installed + its sp1 udpdate, when I am trying to build a 32 bits dll using the MKL, especially functions from the VSL. (I will give more precisions later in this post.)

In C:\Program Files (x86)\Intel I have :

12/11/2013 22:54 <DIR> .
12/11/2013 22:54 <DIR> ..
10/11/2013 23:54 <JUNCTION> Advisor XE
10/11/2013 23:55 <DIR> Advisor XE 2013
16/10/2013 11:41 <DIR> Bluetooth
10/11/2013 23:29 <DIR> Composer XE
12/11/2013 21:19 <DIR> Composer XE 2013
12/11/2013 21:33 <DIR> Composer XE 2013 SP1
12/11/2013 21:22 <DIR> ics
10/11/2013 23:24 <DIR> icsxe
12/11/2013 21:23 <DIR> imb
16/10/2013 11:34 <DIR> InfInst
10/11/2013 23:48 <JUNCTION> Inspector XE
10/11/2013 23:49 <DIR> Inspector XE 2013
16/10/2013 11:41 <DIR> Intel(R) Integrated Clock Controller Service
13/10/2013 14:11 <DIR> Intel(R) Processor Graphics
16/10/2013 11:35 <DIR> Intel(R) Rapid Storage Technology
13/10/2013 14:11 <DIR> Media SDK
12/11/2013 21:38 <DIR> MPI
16/10/2013 11:41 <DIR> OpenCL SDK
12/11/2013 22:54 0 toto.txt
12/11/2013 21:23 <DIR> Trace Analyzer and Collector
10/11/2013 23:41 <JUNCTION> VTune Amplifier XE
10/11/2013 23:41 <DIR> VTune Amplifier XE 2013
24/10/2013 12:05 <DIR> WiFi

I have not installed personnaly all of this, as my both win 7 & 8 are on my pro laptops. Only thing I did was, I was told, to launch the shortcut to "C:\Windows\SysWOW64\cmd.exe /K "C:\Program Files (x86)\Intel\icsxe\2013.0.028\bin\ictvars.bat" that was on the desktop.

In my work, I am supposed to use the VSL from intel MKL to generate special kind or random numbers. I am doing this in c++ under visual studio 2008, 2010 or 2012, and I must generate an ATL COM dll that will be called from VBA or C# by the people that will use my code.

I first tried the VSL in a simple console project, just to see

#include "stdafx.h"
#include <iostream>
#include <mkl.h>
#include <mkl_vsl.h>
#include <mkl_vsl_functions.h>

int _tmain(int argc, _TCHAR* argv[])
{
VSLStreamStatePtr stream;
vslNewStream(&stream, VSL_BRNG_SFMT19937, 777);
double pUNIF = 0.0;
vdRngUniform(VSL_RNG_METHOD_UNIFORM_STD_ACCURATE, stream, 1, &pUNIF, 0.0, 1.0);
vslDeleteStream(&stream);
std::cout << pUNIF << std::endl;
std::cout << "END" << std::endl;
system("pause");
return 0;
}

I put in properties --> configurations properties --> VC++ directories

- exectuable directories : C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\redist\ia32\mkl;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\bin;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\bin\ia32;$(ExecutablePath)

- include directories : C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\include\ia32;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\include;$(IncludePath)

- library directories : C:\Program Files (x86)\Intel\Composer XE 2013 SP1\compiler\lib\ia32;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\lib\ia32;$(LibraryPath)

In properties --> configurations properties --> linker --> input I tried to put :

mkl_core_dll.lib
mkl_intel_thread_dll.lib
mkl_intel_c_dll.lib

and to add here mkl_sequential_dll.lib or mkl_rt.lib

In the system PATH environment variable I put this :

C:\Program Files (x86)\Intel\Composer XE\redist\ia32\mkl;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;C:\Program Files (x86)\Intel\Composer XE\compiler\lib\ia32;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\compiler\lib\ia32;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\mkl\include\ia32;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\mkl\include;

Now, when I build the project, everything is fine,

But, when I run with F5 the exectuable in debug mode, I have an error telling me that the 

mkl_intel_thread.dll is missing or that the mkl_sequential.dll is missing or that the mkl_rt.dll is missing, even if I put them in properties --> configurations properties --> linker --> input and even if I put "C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\redist\ia32\mkl;" in executable directories as well as in library directories.

As I cannot even succeed in properly linking in a simple console project, I would really appreciate help to solve this problem before tackling the ATL/COM dll one. (On this one, I have downloaded the project from http://software.intel.com/en-us/forums/topic/401425#comment-1764824 and experienced the very same errors than descibed there...)

If anyone can help, thx in advance,

Regards,

Pierre

0 Kudos
4 Replies
mecej4
Honored Contributor III
536 Views

You have added the compiler INCLUDE and LIB directories in your PATH. That is not useful. Secondly, you have added the paths to the MKL DLLs from two different releases of MKL to PATH. There is little reason to do this and, in fact, if the DLLs are not backward compatible, your executables may not run properly.

The MKL Link Line Advisor can be useful to you in selecting which versions of the MKL libraries to use.

0 Kudos
Pierre_L_4
Beginner
536 Views

I have suppressed compiler include and lib directories from my path, which left only references to redist\ia32\mkl, but indeed for different version ; I have then suppressed eveything different from 2013 SP1, so that I only have now

C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;

in my path. And now also, I have the same error : mkl_intel_thread.dll missing, even if I have reference to

C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;

 in my path as well as in the executables and library directories from the properties of my visual studio solution.

I have just used the MKL line advisor : which type of linking is mine ? I don't what static linking for sure, so I put dynamic, as "single dynamic library" must be an intel term i never heard of. The advisor force me to choose an MPI library, but I don't care about MPI... I nevertheless choose Intel MPI. For the architecture I'm under win 7 or 8 64bits, but I want my executable to be a 32 bits, so I choose 32 bits. I was then advise to link to :

 mkl_scalapack_core_dll.lib mkl_cdft_core_dll.lib mkl_intel_c_dll.lib mkl_core_dll.lib mkl_sequential_dll.lib mkl_blacs_intelmpi_dll.lib impi.lib

Which didn't change my problem, as I had then the same "mkl_sequential.dll" is missing, even if I'm pointing to it.

0 Kudos
Pierre_L_4
Beginner
536 Views

I make it finally work with :

PATH system containing the following unique reference to the mkl :

"C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;"

and with following properties set in visual studio :

in properties --> configurations properties --> VC++ directories

- exectuable directories : C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\redist\ia32\mkl;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\bin;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\bin\ia32;$(ExecutablePath)

- include directories : C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\include\ia32;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\include;$(IncludePath)

- library directories : C:\Program Files (x86)\Intel\Composer XE 2013 SP1\compiler\lib\ia32;C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\mkl;C:\Program Files %28x86%29\Intel\Composer XE 2013 SP1\mkl\lib\ia32;$(LibraryPath)

In properties --> configurations properties --> linker --> input I added to what was already set by MVS the following :

mkl_intel_c.lib
mkl_intel_thread.lib
mkl_core.lib
libiomp5md.lib

With the same configuration, I make also the zipped project from

http://software.intel.com/en-us/forums/topic/401425#comment-1764824

work.

One last thing : no bloody configuration of the intel link advisor advised to me the list of libs I put in properties --> configurations properties --> linker --> input... fact that could question the utility of this advisor.

Question : this configuration is working, but I would be glad if an intel mkl specialist could tell me if it 1) optimal 2) minimal.

Thx in advance. 

0 Kudos
Ying_H_Intel
Employee
536 Views

Hi Pierre,

Thanks for closing the problem.   Right, the configuration

1) Include path

2) library path

3) list

mkl_intel_c.lib
mkl_intel_thread.lib
mkl_core.lib
libiomp5md.lib  in input

(the exec setting in VC is not needed as it doesn't work as your first try)

4) check the Path environment  and make sure mkl library path and openmp path libiomp5md.dll are there.

is optimal and minimal.  

 (and if you have MKL intergrated into MSVC, you can save the step 1-3 by one property option, it is another topic)

I checked the link advisor and find there is a little problem ( -ldl is incorrect). we will fix it.

Thanks for the report.

Regards,

Ying

 http://software.intel.com/en-us/articles/intel-mkl-103-getting-started

0 Kudos
Reply