- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there, I use the VS 2022 with Intel OneAPI 2024 for my FORTRAN projects on Windows 10.
Recently, I just come across a strange problem:
1) when running the program in Debug mode (F5) within the IDE (i.e., VS 2022), everything looks fine and the program terminates normally;
2) but if I build the program and then run it through a Windows CLI, e.g., the PowerShell, it always reports the following error message
forrtl: severe (172): Program Exception - exception code = 0x7e (126)
Image PC Routine Line Source
KERNELBASE.dll 00007FFB819ABA99 Unknown Unknown Unknown
mkl_intel_thread. 00007FFA9DD60146 Unknown Unknown Unknown
mkl_intel_thread. 00007FFA9DD65435 Unknown Unknown Unknown
mkl_intel_thread. 00007FFA9BEA6BDC Unknown Unknown Unknown
mkl_intel_thread. 00007FFA9CB67258 Unknown Unknown Unknown
orbfit.exe 00007FF70202BE26 Unknown Unknown Unknown
orbfit.exe 00007FF701F4B6C9 SOLVENEQLS 87 SolveNEQLS.f90
orbfit.exe 00007FF701FB4869 MAIN__ 857 orbfit.f90
orbfit.exe 00007FF70202D6DB Unknown Unknown Unknown
orbfit.exe 00007FF70202DF69 Unknown Unknown Unknown
orbfit.exe 00007FF70202DE82 Unknown Unknown Unknown
orbfit.exe 00007FF70202DD3E Unknown Unknown Unknown
orbfit.exe 00007FF70202DFDE Unknown Unknown Unknown
KERNEL32.DLL 00007FFB81FF7374 Unknown Unknown Unknown
ntdll.dll 00007FFB83D1CC91 Unknown Unknown Unknown
on the line 87 within file `SOLENEQLS`, there is a call for a LAPACK subroutine, like " call dpptrf('U',n,N,i) " I have been using the development suit for a long time and this problem just came out recently. Does someone have any idea about the possible reasons? Thanks a lot in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Andy:
Thanks for your feedback. To investigate your issue further, please provide a code reproducer and details of your VS and oneAPI environment?
You may self sanity check your command line environment first, by "ifx -# hello_world.f90". You may use your issue code reproducer to replace the hello_world.f90, as I used hw.f90
This command will print out something similar to the following. Can you see the missing dll you need there?
Also, in your successful VS GUI debug build, can you find your buildlog.htm showing the actual compile and link commands were executed? You may compare the two results to see if anything is missing.
:: initializing oneAPI environment...
Initializing Visual Studio command-line environment...
Visual Studio version 17.3.6 environment configured.
"C:\Program Files\Microsoft Visual Studio\2022\Professional\"
Visual Studio command-line environment initialized for: 'x64'
: advisor -- latest
: compiler -- latest
: dal -- latest
: debugger -- latest
: dev-utilities -- latest
: dnnl -- latest
: dpcpp-ct -- latest
: dpl -- latest
: inspector -- latest
: ipp -- latest
: ippcp -- latest
: itac -- latest
: mkl -- latest
: mpi -- latest
: tbb -- latest
: vtune -- latest
:: oneAPI environment initialized ::
C:\Program Files (x86)\Intel\oneAPI>ifx -# hw.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin/compiler\xfortcom \
-triple \
x86_64-pc-windows-msvc \
--dependent-lib=libcmt \
--dependent-lib=ifconsol.lib \
--dependent-lib=libifcoremt.lib \
--dependent-lib=libifport.lib \
--dependent-lib=libircmt \
--dependent-lib=libmmt \
--dependent-lib=oldnames \
--dependent-lib=svml_dispmt \
-emit-obj \
"-verify nomodule" \
-main-file-name \
hw.f90 \
-mllvm \
--relocation-model=pic \
-pic-level \
2 \
"-options-string /# " \
-mframe-pointer=none \
-omp_simd \
-target-cpu \
x86-64 \
-fveclib=SVML \
-mllvm \
-loopopt=1 \
-floopopt-pipeline=light \
-mllvm \
-disable-hir-generate-mkl-call \
-mllvm \
-paropt=11 \
-fintel-libirc-allowed \
-o \
hw.obj \
-D__INTEL_LLVM_COMPILER=20240002 \
-D__INTEL_LLVM_COMPILER_UPDATE=2 \
-D_WIN32 \
-D_M_AMD64=100 \
-D_M_X64=100 \
-D_WIN64=1 \
-D_MSC_VER=1933 \
-D_MSC_FULL_VER=193331630 \
-D_MSC_EXTENSIONS \
"-D__MS_VC_INSTALL_PATH=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\" \
-D_MT \
-D__INTEL_COMPILER_BUILD_DATE=20231213 \
-D__INTEL_COMPILER=20240002 \
-D__INTEL_COMPILER_UPDATE=2 \
-I. \
"-IC:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\mkl\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\itac\2022.0\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\ippcp\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\ipp\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dal\latest\include\dal" \
"-IC:\Program Files (x86)\Intel\oneAPI\compiler\latest\include" \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\include \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\opt\compiler\include \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\lib\clang\17\include \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include" \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\ATLMFC\include" \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" \
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" \
"-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" \
-omp_simd \
-O2 \
"-reentrancy threaded" \
"-unroll 2" \
-simd \
-offload_host \
hw.f90
link \
-out:hw.exe \
-subsystem:console \
hw.obj
del C:\Users\shiquans\AppData\Local\Temp\182122clangdashv4
del C:\Users\shiquans\AppData\Local\Temp\182123arg5
del C:\Users\shiquans\AppData\Local\Temp\182124arg6
C:\Program Files (x86)\Intel\oneAPI>
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-
Missing DLLs: Ensure that all required DLLs are present in the system or in the application's directory. You can use tools like Dependency Walker (depends.exe) to check which DLLs your application depends on and whether they are available.
-
Incorrect PATH Environment Variable: The PATH environment variable should include the directories where the required DLLs are located. Make sure that the directories containing the necessary DLLs are included in the PATH.
-
Incorrect Project Configuration: Verify that your project configuration in Visual Studio is correct. Ensure that the correct runtime libraries are being linked and that the application is built for the correct platform (x86 or x64).
-
Redistributable Packages: Some applications require specific Microsoft Visual C++ Redistributable packages to be installed. Make sure that the appropriate redistributable packages are installed on your system.
-
Corrupted or Incompatible DLLs: Sometimes, DLLs can become corrupted or incompatible due to updates or other changes. Try reinstalling the software or libraries that provide the required DLLs.
-
Permissions Issues: Ensure that your application has the necessary permissions to access the required DLLs. Running Visual Studio or your application as an administrator might help resolve permission-related issues.
-
Third-Party Libraries: If your application depends on third-party libraries, make sure that they are correctly installed and configured.
-
Identify the Missing DLL: Use Dependency Walker or a similar tool to identify which DLL is missing or causing the issue.
-
Check the PATH: Verify that the PATH environment variable includes the directories where the required DLLs are located.
-
Reinstall Dependencies: Reinstall any missing or corrupted dependencies, such as the Intel Fortran Compiler runtime libraries or Microsoft Visual C++ Redistributable packages.
-
Check Project Settings: Review your project settings in Visual Studio to ensure that all necessary libraries are being linked correctly.
-
Run as Administrator: Try running Visual Studio or your application with administrative privileges to rule out permission issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. But it seems that your reply is exactly the same as what I got when I input the error message into the ChatGPT. There are so many information but none of them is really constructive and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's likely dynamic link libraries that contains mkl functions cannot be found by your OS. You may need also some compiler dlls (I needed this when I used Intel C++ compiler) and openmp or mpi dlls in case you use parallel/cluster mkl version. You can just copy all the dlls required by error messages into the directory the executable is loaded from (search them somewhere in the directories where intel oneapi is installed) or specify paths to them in PATH envitonment variable (in Windows its convenient to be done through system parameters -> about -> additional parameters -> environment variables). For example I need about 10 dlls for running MKL PARDISO solver and I copy them into directory containing executable in order to make the application portable, they weight about 130 MB in sum though. I'm sure there are other ways to resolve linking issues though, like building single self-contained exe file. There should be a lot of tutorials how to link mkl correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"in order to make the application portable" - mistake, I meant "in order to make application self-dependant" so it can be run on systems that does not have mkl installed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Morskaya, thanks for your reply.
Yes, I usually did the similar thing as you described in order to resolve dynamic link lib missed problems: copying missed ones from the installation path of Intel OneAPI to the directory of executables ...
But the problem I mentioned here seems weird as it did not report any missing libs and, the same code ran well previously. It looked like just coming out suddenly and the piece of code it points to should be correct without any modification for a long time.
After re-installing the Visual Studio 2022 Community version and replacing the Intel OneAPI 2024 with Intel Fortran Essential, the proble just gone away...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Andy:
Thanks for your feedback. To investigate your issue further, please provide a code reproducer and details of your VS and oneAPI environment?
You may self sanity check your command line environment first, by "ifx -# hello_world.f90". You may use your issue code reproducer to replace the hello_world.f90, as I used hw.f90
This command will print out something similar to the following. Can you see the missing dll you need there?
Also, in your successful VS GUI debug build, can you find your buildlog.htm showing the actual compile and link commands were executed? You may compare the two results to see if anything is missing.
:: initializing oneAPI environment...
Initializing Visual Studio command-line environment...
Visual Studio version 17.3.6 environment configured.
"C:\Program Files\Microsoft Visual Studio\2022\Professional\"
Visual Studio command-line environment initialized for: 'x64'
: advisor -- latest
: compiler -- latest
: dal -- latest
: debugger -- latest
: dev-utilities -- latest
: dnnl -- latest
: dpcpp-ct -- latest
: dpl -- latest
: inspector -- latest
: ipp -- latest
: ippcp -- latest
: itac -- latest
: mkl -- latest
: mpi -- latest
: tbb -- latest
: vtune -- latest
:: oneAPI environment initialized ::
C:\Program Files (x86)\Intel\oneAPI>ifx -# hw.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin/compiler\xfortcom \
-triple \
x86_64-pc-windows-msvc \
--dependent-lib=libcmt \
--dependent-lib=ifconsol.lib \
--dependent-lib=libifcoremt.lib \
--dependent-lib=libifport.lib \
--dependent-lib=libircmt \
--dependent-lib=libmmt \
--dependent-lib=oldnames \
--dependent-lib=svml_dispmt \
-emit-obj \
"-verify nomodule" \
-main-file-name \
hw.f90 \
-mllvm \
--relocation-model=pic \
-pic-level \
2 \
"-options-string /# " \
-mframe-pointer=none \
-omp_simd \
-target-cpu \
x86-64 \
-fveclib=SVML \
-mllvm \
-loopopt=1 \
-floopopt-pipeline=light \
-mllvm \
-disable-hir-generate-mkl-call \
-mllvm \
-paropt=11 \
-fintel-libirc-allowed \
-o \
hw.obj \
-D__INTEL_LLVM_COMPILER=20240002 \
-D__INTEL_LLVM_COMPILER_UPDATE=2 \
-D_WIN32 \
-D_M_AMD64=100 \
-D_M_X64=100 \
-D_WIN64=1 \
-D_MSC_VER=1933 \
-D_MSC_FULL_VER=193331630 \
-D_MSC_EXTENSIONS \
"-D__MS_VC_INSTALL_PATH=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\" \
-D_MT \
-D__INTEL_COMPILER_BUILD_DATE=20231213 \
-D__INTEL_COMPILER=20240002 \
-D__INTEL_COMPILER_UPDATE=2 \
-I. \
"-IC:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\mkl\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\itac\2022.0\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\ippcp\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\ipp\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include" \
"-IC:\Program Files (x86)\Intel\oneAPI\dal\latest\include\dal" \
"-IC:\Program Files (x86)\Intel\oneAPI\compiler\latest\include" \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\include \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\opt\compiler\include \
-IC:\PROGRA~2\Intel\oneAPI\compiler\latest\lib\clang\17\include \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include" \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\ATLMFC\include" \
"-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" \
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" \
"-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" \
"-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" \
-omp_simd \
-O2 \
"-reentrancy threaded" \
"-unroll 2" \
-simd \
-offload_host \
hw.f90
link \
-out:hw.exe \
-subsystem:console \
hw.obj
del C:\Users\shiquans\AppData\Local\Temp\182122clangdashv4
del C:\Users\shiquans\AppData\Local\Temp\182123arg5
del C:\Users\shiquans\AppData\Local\Temp\182124arg6
C:\Program Files (x86)\Intel\oneAPI>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shiquan,
thanks a lot for your answers.
The problem just gone away after I replaced the Intel OneAPI 2024 with Inter Fortran Essential 2025 (and unintentionally, re-installed the Visual Studio 2022 Community).

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page