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

Procedure entry point __kmpc_aligned_alloc could not be located

AONym
New Contributor II
4,179 Views

When I start my executable, I get a message "Procedure entry point __kmpc_aligned_alloc could not be located in the dynamic link library / MyExecutable.exe". This is a new occurrence; I have successfully built and run this app for years.

I'm using VS2019 16.11.6, running under Windows 10 (64-bit).

I recently upgraded from Intel® Fortran Compiler Classic 2021.3.0 [Intel(R) 64] to 2021.4.0 just before this problem started. However, going back to 2021.3.0 does not make the problem go away.

This is an x64 debug build, with the Fortran being used in a static library. The code does use OpenMP.

My PATH environment variable is

C:\Program Files (x86)\Intel\oneAPI\mpi\latest\bin\;
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\bin\release\;
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\libfabric\bin\;
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\libfabric\bin\utils\;
C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt\;
C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\ia32\vc_mt\;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\intel64_win\compiler;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\ia32_win\compiler;
%SystemRoot%\system32;
%SystemRoot%;%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;
C:\Program Files (x86)\Visual Leak Detector\bin\Win32;
C:\Program Files (x86)\Visual Leak Detector\bin\Win64;
C:\Program Files\Intel\Intel(R) Memory and Storage Tool\

My link command includes these Intel "Additional Library Directories":

C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\lib\intel64;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win;
$(IFORT_COMPILER19)compiler\lib\intel64_win;

I changed IFORT_COMPILER19 to IFORT_COMPILER21, which now evaluates to

C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\compiler \lib\intel64_win

but it still gets the same entry point error.

This is the OpenMP that the linker is using:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libiomp5md.lib

This is the complete list of Intel files the linker is searching:

2> Searching C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64\mkl_lapack95_lp64.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libiomp5md.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\ifmodintr.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\ifconsol.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libifcoremt.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libmmt.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libirc.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\svml_dispmt.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64\mkl_intel_lp64.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64\mkl_intel_thread.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64\mkl_core.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libicaf.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\intel64\mkl_sequential.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libifport.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libifcoremdd.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libifportmd.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\libmmdd.lib:
2> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\lib\intel64_win\svml_dispmd.lib:

 

Labels (2)
0 Kudos
1 Solution
AONym
New Contributor II
4,176 Views

OK, I think I found the problem. There is a new version of libiomp5md.dll (dated 9/10/2021) found in C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\redist\intel64_win\compiler ; the previous version was dated 11/12/20. Replacing the older libiomp5md.dll with the newer in the directory of the executable allowed the app to start normally.

View solution in original post

0 Kudos
3 Replies
AONym
New Contributor II
4,177 Views

OK, I think I found the problem. There is a new version of libiomp5md.dll (dated 9/10/2021) found in C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\redist\intel64_win\compiler ; the previous version was dated 11/12/20. Replacing the older libiomp5md.dll with the newer in the directory of the executable allowed the app to start normally.

0 Kudos
mmavro
Novice
3,934 Views

Hi I have the same problem and the solution you proposed worked for me as well.

 

Is there any other way for my executable to search in the correct directory with the libiomp5.md.dll or I need to copy the dll file every time in the directory I am working.

 

Thank you

0 Kudos
Steve_Lionel
Honored Contributor III
3,924 Views

Copying run-time DLLs into the executable directory is the worst solution to this problem. The best solution is to install the redistributables (see Solved: PSA: Update the Runtime Library when you update the compiler! - Intel Communities , but note that this is not necessary with recent compiler installs as discussed later in the thread.) This will copy a compatible set of the run-time DLLs to a common place on the system and add that location to the PATH system environment variable.

0 Kudos
Reply