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

SDL-Interface under x64 crashes

Andreas_Rost
Beginner
486 Views
Hi @all,

I've got a problem with the new SDL interface.
Have a look at the following code fragment:

mkl_set_interface_layer(MKL_INTERFACE_ILP64);
mkl_set_progress(mkl_progress_);

I'm linking with the mkl_rt.lib.
When running at a 32bit system, all works fine.
But on x64 the call to mkl_set_progress() crashes.

In order to test just calling another MKL function I tried to replace it with a call to

ipiv = (MKL_INT*)mkl_malloc(dim*sizeof(MKL_INT),16);

which crashes too.

When I replace the mkl_rt.lib with the three static Libs

mkl_intel_ilp64.lib mkl_intel_thread.lib mkl_core.lib

both calls work fine...

Any ideas what goes wrong?
Regards
Andreas

0 Kudos
7 Replies
Konstantin_A_Intel
486 Views
Hi Andreas,
The first idea is to check whether PATH and LIB env. variables refer to the correct path where Intel64 DLLs reside or not. Because in another case the program will crash exactly at the very first call to an MKL function located in any dynamic lib.
Regards,
Konstantin
0 Kudos
Andreas_Rost
Beginner
486 Views
Hi Konstantin,

thanks for your answer.

The machine my application crashes on isn't the one, on which I develop.
So the LIB and PATH env. variables shouldn't have any influence - shouldn't they?
(LIB actually doesn't exist at all and PATH is set to c:\windows\system32 as its first entry)

Anyway there is only one x64 version of mkl_rt.dll inside c:\windows\system32, which is definitively used by my app (if I rename the dll temporarily, my app doesn't start any longer).

So the reason for the crash should lay somewhere else...

Regards,
Andreas
0 Kudos
Gennady_F_Intel
Moderator
486 Views
Andreas,
Can you give us the example? and
What MKL version you are using? --Gennady
0 Kudos
Andreas_Rost
Beginner
486 Views
Hi Gennady,

my MKL version is 10.3.2.1

To give you an example is pretty difficult because our app is an dynamic link library working as an AutoCAD extension. Y would have to have AutoCAD installed and install our app additionally...

Regards
Andreas
0 Kudos
Vladimir_Petrov__Int
New Contributor III
486 Views
Hi Andreas,

A couple of clarifying questions:
1. Do you have the rest of required MKL dlls (e.g. libimalloc.dll mkl_mc3.dll mkl_core.dll mkl_intel_thread.dll) somewhere in the PATH?
2. Do you compile your code with -DMKL_ILP64?

Bset regards,
-Vladimir
0 Kudos
Andreas_Rost
Beginner
486 Views
Hi Vladimir,

You gave me the right hint.
It were the above mentioned (and missing) 4 DLLs which produced the crash.
So the issue is resolved for me - thanks!

But a recommendation / request:

I've used the Dependency Walker to obtain all the DLLs requested for using the MKL and it showed the mkl_rt.dll only. Why don't you load the other DLLs just the way mkl_rt.dll does.
This would prevent any applications from starting if they are missing and produce an error message instead of a crash. Besides all of them would be listed in a tool like Dependency Walker.

And it would be a good idea to give an overview in the documentation, which of the DLLs of the redist directory are needed under which circumstances.

Regards & Thanks
Andreas
0 Kudos
Gennady_F_Intel
Moderator
486 Views
Andreas,
ok. thanks for the remarks. we will add some notes about this issue into the userguide.
--Gennady
0 Kudos
Reply