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

oneAPI 2023.2, MS VS Community 2022 17.7.5 (and MS VS 2019) use omp_lib not found

jimdempseyatthecove
Honored Contributor III
792 Views

Something goofy with the installation of oneAPI 2023.2 and the environment variable INCLUDE

In Fortran procedure containing "use omp_lib" I get a not found error, check include path.

The include path contains the path to the oneAPI folder containing omp_lib.mod.

If I copy and paste the segment of the include path containing omp_lib.mod, and paste this into the Additional Include Paths, the procedure compiles.

Something in the installation messed up the include environment variable. The include path is as follows:

 

include=C:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include;C:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\..\include;C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include;C:\Program Files (x86)\Intel\oneAPI\itac\latest\include;C:\Program Files (x86)\Intel\oneAPI\ippcp\latest\include;C:\Program Files (x86)\Intel\oneAPI\ipp\latest\include;C:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\include;C:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\cpu_dpcpp_gpu_dpcpp\include;C:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include;C:\Program Files (x86)\Intel\oneAPI\dal\latest\include;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\include;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include\intel64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt;C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\include

 

Same contents with line breaks following the ;'s

 

include=C:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include;
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\..\include;
C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include;
C:\Program Files (x86)\Intel\oneAPI\itac\latest\include;
C:\Program Files (x86)\Intel\oneAPI\ippcp\latest\include;
C:\Program Files (x86)\Intel\oneAPI\ipp\latest\include;
C:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\include;
C:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\cpu_dpcpp_gpu_dpcpp\include;
C:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include;
C:\Program Files (x86)\Intel\oneAPI\dal\latest\include;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\include;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include\intel64;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include;
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared;
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um;
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt;
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt;
C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\include

 

(the broken line with ATLMFC is imposed by this website iow there is no line break there).

 

I do not see anything out of the ordinary in there.

The above SET listing was made from within a oneAPI command window.

The default (non oneAPI command window) command window shows:

include=C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\include

 

Also note, without me adding the additional include file folder, an openMP program without (needing) use omp_lib compiles and links, and runs multi-threaded.

 This may be an integration issue with both versions of MS VS.

 

Additional information.

If I run ifort from the oneAPI command prompt to compile the "offending" program, the compiler locates omp_lib.mod. So the issue is internal to the integration of/to MS VS.

 

Also, if I launch a oneAPI command prompt (x64), which created the correct environment, then from in there launch the MS VS 2022 devenv (hoping it inherits the environment of the oneAPI command window, remove the explicit additional include directory, build, the build fails to locate omp_lib.mod.

 

For now, I will explicitly add the folder. But this issue may be occurring to others.

 

Jim Dempsey

 

 

 

0 Kudos
2 Replies
JohnNichols
Valued Contributor III
759 Views

Try the VSIX installer, supplied in the Forum, I looked but it eluded me. 

0 Kudos
Reply