Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

mkl_intel_thread.dll missing error

Yvan
Novice
5,315 Views

Hi, I am using Visual Studio 2019 with Intel oneAPI to try to run a Fortran code which calls some routines from IMSL Fortran Numerical Library 2019 (which I have installed with a license). I get the following error message:

 

The code execution cannot proceed because mkl_intel_thread.dll was not found. 

 

I tried to link my project to oneMKL automatically by selecting Project->Properties->Fortran->Librairies->Use Intel Math Kernel Library->Parallel and Sequential (I tried both).

 

I also tried to link my project to oneMKL manually by selecting Project->Properties->Fortran->General->Additional Include Directories-> C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64 together with Debug Information Format: Full and Optimization: Maximize Speed plus Higher Level Optimization.

 

I also tried to place the mkl_intel_thread.dll file directly in my project folder, and added it to the project via VS.

 

Neither attempt was successful. I am not sure what to do now, could someone help me please?

Yvan

 

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
5,284 Views

The MKL install does not add the folder with the MKL DLLs to the system PATH environment variable. You need to do that yourself. I assume you installed MKL from the oneAPI Base tooklkit.

It's the IMSL DLL that is referencing the MKL DLL - changing your project properties isn't going to accomplish anything. If your version of IMSL includes static libraries (you will need to reference a different INCLUDE file), you can try that.

 

View solution in original post

0 Kudos
4 Replies
Steve_Lionel
Honored Contributor III
5,285 Views

The MKL install does not add the folder with the MKL DLLs to the system PATH environment variable. You need to do that yourself. I assume you installed MKL from the oneAPI Base tooklkit.

It's the IMSL DLL that is referencing the MKL DLL - changing your project properties isn't going to accomplish anything. If your version of IMSL includes static libraries (you will need to reference a different INCLUDE file), you can try that.

 
0 Kudos
IvanGonzalez
Beginner
312 Views

Hello Steve. Can you provide a more detailed solution? We are non-experts, and we are encountering this error when attempting to run Python scripts within a conda environment. Any walkthrough or example is greatly appreciated. We are using Windows

 

Here the message:

###
INTEL oneMKL ERROR: The specified module could not be found. mkl_intel_thread.2.dll.
Intel oneMKL FATAL ERROR: Cannot load mkl_intel_thread.2.dll.

running command 'C:\Users\User\Anaconda2\envs\cola/python.exe C:/Users/User/AppData/Local/R/win-library/4.5/cola/python/welcome.py' had status 2.

###

 

Thanks

 

0 Kudos
MarcGrodent
New Contributor I
221 Views

I think the error comes from the fact that your current PATH does not include the oneAPI environment.

You can try to run the script named setvars.bat (located in the following directory: C:\Program Files (x86)\Intel\oneAPI) from your conda environment before calling your python script. This will set up the complete oneAPI development environment, which includes the path to the MKL DLL's.

You can find detailed explanations in these links:

https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2025-1/oneapi-development-environment-setup.html 

https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2025-1/use-the-setvars-script-with-windows.html#USE-THE-SETVARS-SCRIPT-WITH-WINDOWS 

0 Kudos
mecej4O
New Contributor I
53 Views

A typical Intel development package installation creates a batch file (e.g., mkl_vars.bat or setvars.bat). Try to locate that file in the Intel installation directory, and examine its contents. Before running your application exe, run that batch file.

0 Kudos
Reply