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

mkl_intel_thread.1.dll was not found

yzhu
Beginner
1,335 Views

Hi,

 

I have some problems running Fortran under Visual Studio 2019. The versions of products I have are Intel Parallel Studio XE 2020, Fortran Numerical Library for Windows/Intel Parallel Studio XE (x64), and Intel one API Base & HPC 2022.

 

The solutions can be built with no error except that a window pops up saying that "The code execution cannot proceed because mkl_intel_thread.1.dll was not found. Reinstalling the program may fix this problem." In particular, it occurs when I call a function.

 

My issue looks similar to the one here https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-intel-thread-1-dll-was-not-found/td-p/1287801 I tried to add a path under Environment Variable but it did not work. Could anyone please elaborate on what I should do? Thank you.

0 Kudos
10 Replies
VidyalathaB_Intel
Moderator
1,320 Views

Hi Yifan,

 

Thanks for reaching out to us.

 

Could you please confirm if you have enabled /Qmkl option (as shown in the screenshot) in the project configuration properties and still getting the error?

VidyalathaB_Intel_0-1668056010172.png

If yes, we request you please share your VS project file with a sample reproducer so that we can check it from our end as well.

You can refer to the following article for more details

https://www.intel.com/content/www/us/en/developer/articles/training/how-to-build-onemkl-application-in-visual-fortran-msvs.html

 

Additionally, we suggest you to please try running the code from Intel oneAPI command prompt and do let us know if you still face the same issue.

 

Regards,

Vidya.

 

0 Kudos
yzhu
Beginner
1,310 Views

Hi Vidya,

 

Thank you for your reply! I have attached the project that has this issue. 

 

I have compared my settings with those in the sample project found in your link. In fact, this problem can be fixed when I change the line "INCLUDE 'LINK_FNL_SHARED.h'" to "INCLUDE 'LINK_FNL_SHARED_IMSL.h'", though I am not sure about the mechanism. 

 

Apart from that, using the same settings, when I run the two validating programs provided by imsl (https://help.imsl.com/fortran/current/common/README.html), I receive the error messages (please see the attached). Are they also related to my previous issue? 

0 Kudos
VidyalathaB_Intel
Moderator
1,289 Views

Hi Yifan,

 

Thanks for sharing the details.

 

Could you please let us know if you are calling routines from Intel oneMKL library in your code and not from IMSL?

I tried running the code and below is the error message that I'm getting that is different from yours.

VidyalathaB_Intel_0-1668168702835.png

 

 

Regards,

Vidya.

 

0 Kudos
yzhu
Beginner
1,279 Views

Hi Vidya,

 

Thank you for your reply. I have attached a new project using the sample codes of CNR (https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/obtaining-numerically-reproducible-results/code-examples.html) with a screenshot of the result. I think I am only using the OneAPI MKL library this time. 

 

I need to use IMSL at some point. But would you please let me know if the attached figure means that I have misspecified anything for the OneAPI MKL? 

 

Thanks again for your time.

0 Kudos
VidyalathaB_Intel
Moderator
1,235 Views

Hi Yifan,


Thanks for providing us the details.

We are working on this issue, we will get back to you soon.


Regards,

Vidya.


0 Kudos
VidyalathaB_Intel
Moderator
1,181 Views

Hi Yifan,

 

I apologize for the delay and thanks for your patience.

 

In the reproducer code, Include 'mkl.fi' is commented out in line 2, therefore the attempt to call mkl_malloc triggers an access violation. 

 

After including the mkl.fi file, we see errors because of multiple declarations of mkl_malloc and mkl_free, so comment out the corresponding lines (7-12). Besides that, the arguments of mkl_malloc cause another error. You may remove the %VAL calls. An example of calling mkl_malloc in Fortran can be found in $MKLROOT/examples/f/service/source/servicefuncs.f.

 

Please find the attached project file with the above changes, try running it, and do let us know if you face any issues.

 

Regards,

Vidya.

 

0 Kudos
yzhu
Beginner
1,141 Views

Hi Vidya,

 

Thank you for your time and all the explanations! I can get those errors when I comment on different parts of the codes.

In fact, I am able to run my own Fortran codes with these libraries. Setting up the properties can be very tricky but I have not encountered many serious issues so far.

 

Best,

Yifan

0 Kudos
VidyalathaB_Intel
Moderator
1,136 Views

Hi Yifan,

 

Thanks for getting back to us.

You can refer to the following link for more details regarding linking a project in VS with Intel oneMKL

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/linking-your-application-with-onemkl.html

If there are no further queries, could you please confirm if we can close this thread from our end?

 

Regards,

Vidya.

 

0 Kudos
yzhu
Beginner
1,087 Views

Hi Vidya,

 

I have no further queries. Please close the thread. Thank you!

 

Best,

Yifan

0 Kudos
VidyalathaB_Intel
Moderator
1,079 Views

Hi Yifan,


Thanks for the confirmation! (you can help others with a similar issue by marking the reply which helped you as an accepted solution)


Please post a new question if you need any additional information from Intel as this thread will no longer be monitored.


Have a Nice Day!


Regards,

Vidya.


0 Kudos
Reply