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

VS 2019 Debugger reports missing dll and does not start!

jirina
New Contributor I
3,578 Views

I installed oneAPI 2021.1, I was able to compile and link my project that uses MKL, however, as soon as I start debugging, a system error is issued: "The code execution cannot proceed because mkl_intel_thread.1.dll was not found. Reinstalling the program may fix the problem."

I am using Visual Studio 2019 and I did not get this error with Parallel Studio XE 2020 Update 4. PS XE 2020 was uninstalled, computer restarted, then oneAPI installed, computer restarted, so I currently have only oneAPI.

What should I do to make debugging work with oneAPI?

These are compiler settings for my project: /nologo /debug:full /MP /Od /I"%MKLROOT%" /I"\include" /fixed /extend_source:132 /Qopenmp /fpscomp:general /Qdiag-disable:8290,8291,5462,10434 /warn:declarations /warn:truncated_source /warn:noalignments /warn:interfaces /assume:byterecl /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc160.pdb" /traceback /check:pointer /check:bounds /check:uninit /check:format /check:output_conversion /check:stack /libs:dll /threads /dbglibs /Qmkl:parallel /c

These are linker settings: /OUT:"x64\Debug\MyApp.exe" /INCREMENTAL:NO /NOLOGO /DELAYLOAD:"MyAppx64.dll" /MANIFEST /MANIFESTFILE:"x64\Debug\MyApp.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Test\x64\Debug\MyApp.pdb" /SUBSYSTEM:CONSOLE /STACK:1000000000 /IMPLIB:"D:\Test\x64\Debug\MyApp.lib" delayimp.lib ..\DLL\x64\MyAppx64.lib mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib

0 Kudos
1 Solution
mecej4
Honored Contributor III
3,559 Views

As a temporary workaround, open the OneAPI Intel64 command window from the Start menu, and try to run the EXE that you wish to debug. If it runs, and you do not see the message about the DLL not being found, all that you have to do is to start VS from that command window by typing the command DEVENV, rather than from elsewhere such as a shortcut on the desktop or from the Start menu.,

If this suggestion works out, you can add the path to the DLL in question (i.e., add ...\OneAPI\mkl\latest\redist\intel64) to the effective run time path in the project properties.

View solution in original post

9 Replies
mecej4
Honored Contributor III
3,560 Views

As a temporary workaround, open the OneAPI Intel64 command window from the Start menu, and try to run the EXE that you wish to debug. If it runs, and you do not see the message about the DLL not being found, all that you have to do is to start VS from that command window by typing the command DEVENV, rather than from elsewhere such as a shortcut on the desktop or from the Start menu.,

If this suggestion works out, you can add the path to the DLL in question (i.e., add ...\OneAPI\mkl\latest\redist\intel64) to the effective run time path in the project properties.

jirina
New Contributor I
3,545 Views

Thank you very much for pointing me in the right direction. Your suggestion to start VS from the OneAPI Intel64 command window made Debugger work well. Adding the path to missing DLLs to project properties (Debugging -> Environment) worked well too.

0 Kudos
RahulV_intel
Moderator
3,521 Views

Hi @jirina,

 

Thanks for reporting this issue. The issue is reproducible. Thanks to @mecej4  for providing the workaround. Please note that I have escalated this issue to the concerned team to get it fixed.

 

Regards,

Rahul

0 Kudos
Yvan
Novice
3,375 Views

Hi, I am facing the same issue as @jirina but unlike this user, when I follow @mecej4 's solution to run the EXE from the OneAPI Intel64 command window I still get the following error:

 

The code execution cannot proceed because mkl_intel_thread.dll was not found. Reinstalling the program may fix the problem.

 

Any idea to solve the issue? Thanks, Yvan

 

 

0 Kudos
mecej4
Honored Contributor III
3,340 Views

The file mkl_intel_thread.dll is not part of the OneAPI MKL distribution, so your issue is not the same.

You probably have some library, such as the IMSL or another third party library, or an older library that you created, that has a dependence on mkl_intel_thread.dll. When you link your EXE or DLL using such an older library, the linking will succeed (the DLL does not have to be available at link time), but execution will fail.

0 Kudos
Yvan
Novice
3,340 Views

Indeed, I downloaded IMSL Fortran Numerical Library 2020 (after obtaining a license) which I was able to link to API Intel Fortran Compiler via Visual Studio 2019. But I still get the error mentioned above. Do you know how I should proceed?

 

 

0 Kudos
mecej4
Honored Contributor III
3,309 Views

You should probably ask for help in an IMSL forum. I do not have experience with IMSL 2020, and I am not aware of whether the IMSL 2020 distribution includes MKL DLLs.

If IMSL 2020 was intended to be used with MKL 2020, you may try the corresponding redistributables. Note that I am only making a guess here, and it is better to ask Roguewave/Perforce for advice.

0 Kudos
RahulV_intel
Moderator
3,260 Views

Hi All,


The missing DLL issue will be fixed in the next oneAPI update.


Thanks,

Rahul


0 Kudos
RahulV_intel
Moderator
3,199 Views

Hi All,


The missing DLL issue has been fixed in the latest release of the oneAPI base toolkit 2021.2. So, I will go ahead and close this thread from my end. Intel will no longer monitor this thread. Further interactions on this thread will be considered community only.


Thanks,

Rahul


0 Kudos
Reply