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

libiomp5md.dll cannot be found after upgrading to oneAPI for Windows

Ioannis_K_
New Contributor I
3,680 Views

Hello, I recently uninstalled my parallel studio XE 2019 (which included the fortran compiler) and installed the oneAPI set of tools (including the Fortran compiler), together with Visual Studio 2019. 

Whenever I now build an executable (for release configuration) and try to run it, I get the error message that the executable cannot run because my system (which is the same system where I actually have oneAPI and have built the executable)  is lacking libiomp5md.dll. The issue occurs both when I try to build using the static multithreaded and the dll multithreaded runtime library.

I wanted to ask what could be the reason for this issue. I understand that someone who does not have the Intel compilers installed in their machine would have to install redistributable packages, but I had never encountered them in the machine which I would use to build the executable with the Intel compiler and Visual Studio.

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

First, check if the DLL in question exists on your computer. You should be able to find the 64-bit DLL in ...\OneAPI\compiler\latest\windows\redist\intel64_win\compiler (and correspondingly for the 32-bit DLL, if you build for IA32). If the DLL exists, check if the containing directory is part of %PATH%. If not, decide whether to add that directory to the systemwide %PATH%, or add the directory to the effective path when you run the EXE that you build, or do your runs from the CMD window configured for OneAPI development.

View solution in original post

0 Kudos
9 Replies
mecej4
Honored Contributor III
3,674 Views

First, check if the DLL in question exists on your computer. You should be able to find the 64-bit DLL in ...\OneAPI\compiler\latest\windows\redist\intel64_win\compiler (and correspondingly for the 32-bit DLL, if you build for IA32). If the DLL exists, check if the containing directory is part of %PATH%. If not, decide whether to add that directory to the systemwide %PATH%, or add the directory to the effective path when you run the EXE that you build, or do your runs from the CMD window configured for OneAPI development.

0 Kudos
MHe1
Beginner
3,617 Views

Hi,

I have the same problem. Is there a way to NOT to use the dll at all? I want to use static library.

Thanks!

 

0 Kudos
Ioannis_K_
New Contributor I
3,611 Views

Hello, the solution is described in the previous post: you need to update the %PATH% environment variable in your system (specifically, add the path to the directory containing the specific dll - the directory is created after a successful installation of oneAPI).

0 Kudos
Steve_Lionel
Honored Contributor III
3,594 Views

On Windows, there is no way to avoid using the DLL for OpenMP.

The path to the DLL should have been added to Path automatically, as it is in the same folder as the other required Fortran run-time DLLs (typically C:\Program Files (x86)\Common Files\intel\Shared Libraries\redist\intel64_win\compiler for x64).

 
0 Kudos
Ioannis_K_
New Contributor I
3,583 Views

Yes, the problem is apparently caused by the fact that, for some reason, the path to the dll was NOT added automatically. I actually checked my system's %PATH% variable, and it did not include the specific path. After I manually added the path, the issue was resolved, and I can run a built executable without any errors. I had never encountered this issue with earlier versions of the Intel Parallel Studio and the Fortran compiler, which meant that these earlier versions definitely added the path automatically. 

One thing worth mentioning is that I had the 2019 version of Parallel Studio in my system, which I uninstalled before installing oneAPI. Perhaps the existence of a previous installation of Intel compilers was related to the occurrence of the specific issue.

 

0 Kudos
MHe1
Beginner
3,582 Views

Dear Steve_Lionel,

Sorry I just crossed your reply. I just posted 2 new questions. 

Many thanks in advance!

 

0 Kudos
MHe1
Beginner
3,586 Views

Dear Ioannis_K,

Many thanks!

Adding path has worked for me, following your advice. 

Please forgive me if my questions below is too simple, as I am not a computer guy and haven't used dll before.

1. to run the executable on a different Windows computer that does not have the compiler, I will need to copy the dll file and save it on that computer. Then, modify the %PATH% environment variable in that computer (add the path to the directory containing the dll). Is this all I need to do?

2. Later, I will need to compile and run the executable for Linux. Will the procedure be the same?

Many thanks again,

 

0 Kudos
Ioannis_K_
New Contributor I
3,574 Views

1) To run an executable to a machine which does not have the compiler, you will probably need to first install the Visual C++ redistributable libraries for Visual Studio and Intel Fortran compiler redistributable libraries. 

2) I have not yet used oneAPI in Linux, you can always try to run the built executable without doing anything with PATH. As Steve mentioned in his earlier message, the installation of oneAPI should have automatically set values for path variables. So, it is highly probable that the issue we observed in our Windows installations was a rare statistical occurrence, at which case the Linux installation will probably not have the same issue.

0 Kudos
MHe1
Beginner
3,533 Views

Thank you very much! It works well now. 

0 Kudos
Reply