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

Exception Unhandled at KernelBase.dll using MKL functions

Sci222
Beginner
1,164 Views

There is code for example:

 

#include "mkl.h"
#include <exception>
#include <iostream>
 
int main(int argc, char* argv[])
{
int VecLen = 10;
MKL_Complex8 *VecCol = new MKL_Complex8[VecLen];
MKL_Complex8 *VecColRes = new MKL_Complex8[VecLen];
 
for (int i = 0; i < VecLen; i++)
{
VecCol[i] = { (float)VecLen - i,(float)i };
}
 
try
{
vcExp(VecLen, VecCol, VecColRes);
}
catch (std::exception& e)
{
std::cout << e.what() << std::endl;
}
 
return 0;
}
 
Screenshot with the code in Visual Studio is attached.
Problem is unhandled exception is appeared in line where vcExp() function is using.
Text of the error is "Unhandled exception at 0x00007FFFB952B699 (KernelBase.dll) in Sandbox project.exe: 0xC06D007E: Module not found (parameters: 0x0000003E4A2FF660)." Screenshot of the error is attached.
 
I had this problem is real project, and it occures only in run-time. I replaced this vcExp() function from MKL with exp function from IPP ippsExp_32fc_A24(). And it worked. But then i got same problem in this real project but in line with DftiCommitDescriptor() function from MKL. Of course i can replace all MKL functions with IPP functions, but i want to figure out why is that happening.
 
I use Community Version of Visual Studio 2022 and latest version of MKL. Please help me to find out what is wrong with MKL here! Thank you in advance!
Labels (1)
0 Kudos
5 Replies
Sci222
Beginner
1,027 Views

Also what can be important. The real project with all MKL functions works correctly on computer, where program was originally writed. But when executable file is build and dragged on another computer with all needed DLLs the error occured. Can it be because of some OS difference or maybe CPU difference? Please give me any thoughts. OS on both of computers is Windows 10 pro. CPU on PC where programm was originally made is Intel Core i7-6700K, and other PC has Intel Core i9-14900KF.

0 Kudos
henricryden
Beginner
897 Views

It seems that you don't find the shared libraries (DLL files) on that other computer. Try static linking.

0 Kudos
Mark_L_Intel
Moderator
685 Views

Hello @Sci222,

  I agree with @henricryden analysis.  It sounds like you’re encountering a runtime issue wit oneMKL.

 The error message “Unhandled exception at 0x00007FFFB952B699 (KernelBase.dll) in Sandbox project.exe: 0xC06D007E: Module not found” suggests that there might be a problem with the MKL DLLs not being found or loaded correctly. 

 

Please look at the similar issue previously reported and how it was resolved at this link

 

Mark_L_Intel
Moderator
507 Views

Hello @Sci222,

    Have you resolved your issue?  

0 Kudos
Mark_L_Intel
Moderator
377 Views

Hello @Sci222,

 

    Intel will no longer monitor this post due to no responses. Thank you for participating in the oneMKL Forum.    

0 Kudos
Reply