Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

VML crashes in DLL projects

w32
Beginner
258 Views
My custom DLL contains comuptation with VML functions call. MKL 9.0 is linked to DLL throw mkl_c.lib and libguide.lib.
But when app calls my DLL computation code, process is crached in any vml functions. Debuger shows exception (access violation) in TLS read code.

Example (vml code for cpu specific GetMode function):

mov ecx,dword ptr ds:[2CC31BCh] (this is __tls_index)
mov edx,dword ptr fs:[2Ch]
mov ebx,dword ptr [edx+ecx*4] (exception (ecx == 0 and edx == 0))


Can you help me?
0 Kudos
6 Replies
Andrey_N_Intel
Employee
258 Views

Thank you for your question. Could youlink your DLL to mkl_c_dll.lib? This should help. Please, let us know how it works for you.

w32
Beginner
258 Views
Thanks, mkl_c_dll.lib resolves problem.

But now my DLL use dynamic MKL dlls and total size of application is very large (~40Mb). How can i decrease size?
Andrey_N_Intel
Employee
258 Views
If your application contains calls to VML functions only you might want to link your DLL tomkl_vml_*.dll, msvcr71.dll,and libguide40.dll. Please, let's know how it works for you. Thanks.
w32
Beginner
258 Views
No. My DLL uses some LAPACK funtions.
Andrey_N_Intel
Employee
258 Views
You could link your application also to mkl_lapack32.dll or mkl_lapack64.dll (depending on the data type you use) in addition to the VML related dlls.
w32
Beginner
258 Views
Thank you.
Reply