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

Request for Guidance on mkl_rt.dll Usage in Intel oneAPI MKL (2025.3.2.20)

rohmijeong
Beginner
138 Views

Hello,

I am currently using Intel oneAPI Base Toolkit version 2025.3.2.20 (offline installer), and I would like to request clarification regarding the usage of the MKL runtime library.

After installation, I observed the following:

  • The file  %MKLROOT%\lib\mkl_rt.lib exists.

  • However, %MKLROOT%\bin\mkl_rt.dll is not present.

  • Instead, only %MKLROOT%\bin\mkl_rt.2.dll is available.

Based on this situation, I was advised to create an alias using the following command:

mklink "%MKLROOT%\bin\mkl_rt.dll" "%MKLROOT%\bin\mkl_rt.2.dll"

Before proceeding, I would like to confirm whether this approach is officially supported and recommended.

Specifically, I would appreciate guidance on the following points:

  1. Is mkl_rt.2.dll intended to replace mkl_rt.dll in recent oneAPI versions?

  2. Is creating a symbolic link (alias) to mkl_rt.dll a correct and stable solution for build and runtime compatibility?

  3. Are there any recommended alternatives for ensuring compatibility with build systems that expect mkl_rt.dll?

  4. Is there an official method to install or enable mkl_rt.dll, or has it been deprecated?

My use case involves building Python C-extensions and numerical libraries (e.g., NumPy) that rely on mkl_rt linkage.

I would appreciate any official documentation or recommendations regarding this configuration.

Thank you for your assistance.

Best regards,
MiJeong Roh

 

 

 

0 Kudos
3 Replies
Fengrui
Moderator
102 Views

Hi,

 

oneMKL started to add shared library versioning from 2021. 

 

Do you need to load mkl_rt.x.dll directly at run time or use mkl_rt.lib (and then load mkl_rt.x.dll at run time)?

 

Best,

Fengrui

0 Kudos
rohmijeong
Beginner
94 Views
Thank you for your response.

In my case, I expected the application to load MKL correctly after building with "mkl_rt.lib". However, at runtime, I encountered an import error.

While investigating the cause of the runtime loading failure, I found that:

- "%MKLROOT%\lib\mkl_rt.lib" exists
- "%MKLROOT%\bin\mkl_rt.dll" does not exist
- "%MKLROOT%\bin\mkl_rt.2.dll" exists

To work around the issue, I created a symbolic link:

mklink "%MKLROOT%\bin\mkl_rt.dll" "%MKLROOT%\bin\mkl_rt.2.dll"

After applying this symbolic link, the runtime loading issue was resolved.

Could you please clarify the following points?

1. In recent oneMKL versions, is it expected that "mkl_rt.dll" is no longer included and only "mkl_rt.2.dll" is provided?
2. Is creating a symbolic link from "mkl_rt.dll" to "mkl_rt.2.dll" an officially supported and safe workaround?
3. If using "mkl_rt.lib" during build, what is the recommended runtime configuration to ensure that "mkl_rt.2.dll" is loaded correctly without requiring "mkl_rt.dll"?
4. Is there any official alternative for compatibility with Python extensions or build systems that still expect "mkl_rt.dll" at runtime?

Best regards,
MiJeong Roh
0 Kudos
Fengrui
Moderator
44 Views

When building with mkl_rt.lib, it will look for the corresponding mkl_rt.x.dll at run time. For example, in 2025.3, it looks for mkl_rt.2.dll, while in 2026.0, it looks for mkl_rt.3.dll. You can check in your installation by dumpbin /headers mkl_rt.lib | findstr /i "\.dll"So if you see errors asking for mkl_rt.dll, it indicates that the binary was built with old mkl_rt.lib. You need to build the binary again with the current mkl_rt.lib.

For your questions,

  1. Yes. In the latest 2026.0 release, it is mkl_rt.3.dll.
  2. It is not officially supported. 
  3. To use "mkl_rt.lib" in the same oneMKL release as "mkl_rt.2.dll". It should not require mkl_rt.dll.
  4. The expected mkl_rt.x.dll at run time depends on the oneMKL version it used at build time. If it was built with a relatively new oneMKL release, for example, 2026.0, it should expect "mkl_rt.3.dll" rather than mkl_rt.dll. 

Best,

Fengrui

0 Kudos
Reply