- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
windows 10
Visual Studio Code 1.86.0 (I also have Visual Studio 2022 v17.7.4)
Intel oneAPI Base Toolkit 2024
icx-cl version: Version 2024.0.2 Build 20231213
-------------------------------------------------------
I am building and running the example using Visual Studio Code. The simple-add SYCL example worked fine the first time (cmake, make and running the example worked), but after re-opening VS Code, I get:
"icx-cl is not a full path and was not found in the PATH"
I have re-created the simple-add project several times following these steps
Developing a Visual Studio Code Project (intel.com)
and making sure I set the environment variables as instructed (see powershell dump below of env vars with "oneapi" in them). It's obvious that the setvars.bat is not working because the same setvars in a dos cmd window sets many more env vars.
I've also deleted and re-created the ./build folder. And I've also run the "Intel OneApi: clear environment variables" from the VS Code command pallete
When running the Ctrl-shift-P command, Visual Studio Code is giving me two options for env var setup and I am running the upper one
Then when I run cmake
PS C:\junk\oneApi\simple-add> cd .\build\
PS C:\junk\oneApi\simple-add\build> cmake ..
I get the cmake error output below. I noticed that it said
CMake output
PS C:\junk\oneApi\simple-add> cd .\build\
PS C:\junk\oneApi\simple-add\build> cmake ..
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeForceCompiler.cmake:89 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
CMakeLists.txt:8 (CMAKE_FORCE_CXX_COMPILER)
CMake Deprecation Warning at CMakeLists.txt:12 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Error at CMakeLists.txt:14 (project):
The CMAKE_CXX_COMPILER:
icx-cl
is not a full path and was not found in the PATH.
-- Configuring incomplete, errors occurred!
PowerShell in VS Code environment output
PS C:\Program Files (x86)\Intel\oneAPI> dir env: | findstr -I -N oneapi
4:ADVISOR_2024_DIR C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0
61:VTUNE_PROFILER_2024_DIR C:\Program Files (x86)\Intel\oneAPI\vtune\2024.0
The above is very different than whan I run "c:\Program Files (x86)\Intel\oneAPI\setvars.bat" in a cmd window. In the cmd window, I get many more env vars with "oneapi" in them.
1:ADVISOR_2024_DIR=C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0\
3:APM=C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0\\perfmodels
5:CLASSPATH=c:\Program Files (x86)\Intel\oneAPI\dal\latest\share\java\onedal.jar;
6:CMAKE_PREFIX_PATH=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..;c:\Program Files (x86)\Intel\oneAPI\ipp\latest\lib\cmake\ipp;c:\Program Files (x86)\Intel\oneAPI\dpl\latest\lib\cmake\oneDPL;c:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\lib\cmake;c:\Program Files (x86)\Intel\oneAPI\dal\latest;c:\Program Files (x86)\Intel\oneAPI\compiler\latest;
7:CMPLR_ROOT=c:\Program Files (x86)\Intel\oneAPI\compiler\latest
14:CPATH=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include;c:\Program Files (x86)\Intel\oneAPI\mkl\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\dpl\latest\include;c:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\include;c:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include;c:\Program Files (x86)\Intel\oneAPI\dal\latest\include\dal;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\include;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\oclfpga\include;
15:DALROOT=c:\Program Files (x86)\Intel\oneAPI\dal\latest
19:DNNLROOT=c:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..
20:DPL_ROOT=c:\Program Files (x86)\Intel\oneAPI\dpl\latest
36:INCLUDE=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\include;c:\Program Files (x86)\Intel\oneAPI\mkl\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\..\include;c:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\include;c:\Program Files (x86)\Intel\oneAPI\dal\latest\include\dal;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;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\\um;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\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
37:INTELFPGAOCLSDKROOT=c:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\oclfpga
38:INTELGTDEBUGGERROOT=c:\Program Files (x86)\Intel\oneAPI\debugger\latest\env\\..
39:INTEL_PYTHONPATH=C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0\pythonapi
44:IPPCRYPTOROOT=c:\Program Files (x86)\Intel\oneAPI\ippcp\latest
45:IPPROOT=c:\Program Files (x86)\Intel\oneAPI\ipp\latest
47:LIB=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\lib\\;c:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib;c:\Program Files (x86)\Intel\oneAPI\ippcp\latest\lib;c:\Program Files (x86)\Intel\oneAPI\ipp\latest\lib;c:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\lib;c:\Program Files (x86)\Intel\oneAPI\dal\latest\lib;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\compiler\lib;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64
49:LIBRARY_PATH=c:\Program Files (x86)\Intel\oneAPI\ippcp\latest\lib;c:\Program Files (x86)\Intel\oneAPI\ipp\latest\lib;
52:MKLROOT=c:\Program Files (x86)\Intel\oneAPI\mkl\latest
54:NLSPATH=c:\Program Files (x86)\Intel\oneAPI\mkl\latest\share\locale\1033;
56:OCL_ICD_FILENAMES=c:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin\intelocl64_emu.dll;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin\intelocl64.dll
57:ONEAPI_ROOT=c:\Program Files (x86)\Intel\oneAPI
63:Path=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\bin\\;c:\Program Files (x86)\Intel\oneAPI\mkl\latest\bin;c:\Program Files (x86)\Intel\oneAPI\ippcp\latest\bin;c:\Program Files (x86)\Intel\oneAPI\ipp\latest\bin;c:\Program Files (x86)\Intel\oneAPI\dpcpp-ct\latest\env\..\bin;c:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\bin;c:\Program Files (x86)\Intel\oneAPI\dev-utilities\latest\bin;c:\Program Files (x86)\Intel\oneAPI\debugger\latest\env\\..\opt\debugger\bin;c:\Program Files (x86)\Intel\oneAPI\dal\latest\bin;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\oclfpga\host\windows64\bin;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\oclfpga\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;C:\Python\Python310\Scripts\;C:\Python\Python310\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\lib\install\opencv\x64\vc16\bin;C:\Program Files\Beyond Compare 4;C:\Users\Eddie.Patton\AppData\Local\Microsoft\WindowsApps;C:\Users\Eddie.Patton\.dotnet\tools;C:\lib\install\opencv\x64\vc16\bin;;C:\Users\Eddie.Patton\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg;C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0\bin64;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib\ocloc;C:\Program Files (x86)\Intel\oneAPI\vtune\2024.0\bin64
65:PKG_CONFIG_PATH=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\ippcp\latest\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\dpl\latest\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\dnnl\latest\env\..\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\dal\latest\lib\pkgconfig;c:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib\pkgconfig;
78:PYTHONPATH=C:\Program Files (x86)\Intel\oneAPI\advisor\2024.0\pythonapi
84:TBBROOT=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..
85:TBB_BIN_DIR=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\bin
86:TBB_DLL_PATH=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\..\bin\\
87:TBB_SCRIPT_DIR=c:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\
100:VARSDIR=c:\Program Files (x86)\Intel\oneAPI\dpl\latest\env\
115:VTUNE_PROFILER_2024_DIR=C:\Program Files (x86)\Intel\oneAPI\vtune\2024.0\
116:VTUNE_PROFILER_DIR=C:\Program Files (x86)\Intel\oneAPI\vtune\2024.0\
icx-cl version
PS C:\junk\oneApi\simple-add\build> icx-cl --version
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
Intel(R) oneAPI DPC++/C++ Compiler 2024.0.2 (2024.0.2.20231213)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kudos to Chen W for pointing my error out. I was incorrectly using the linux build commands
PS C:\junk\oneApi\simple-add> cd .\build\
PS C:\junk\oneApi\simple-add\build> cmake ..
When I should have used the Windows commands (as per the readme)
simple-add\build> cmake -G "NMake Makefiles" ..
simple-add\build> nmake cpu-gpu
This too works:
Select CMake: [Debug]: Ready, and then select Build, and then the Run symbol
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I re-installed the oneAPI toolkit and Visual Studio Code. Then I followed the powershell instructions in the simple-add readme. The example builds and runs if I use the powershell setvars command as instructed:
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
However, after I run the "Intel oneAPI: Clear environment variables" from the command prompt and then run the initialize env vars from the command prompt
and select setvars.bat
I get this warning
and findstr "oneapi" only yields two environment variables and does not have all the other env vars when I run via the PS command line.
So why can the setvars.bat be run from the VS Code command line but not using the VS Command Pallette?
I wonder if my company has a windows 10 configuration that prevents apps (in the case VS Code) from running .bat files. Hmmm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kudos to Chen W for pointing my error out. I was incorrectly using the linux build commands
PS C:\junk\oneApi\simple-add> cd .\build\
PS C:\junk\oneApi\simple-add\build> cmake ..
When I should have used the Windows commands (as per the readme)
simple-add\build> cmake -G "NMake Makefiles" ..
simple-add\build> nmake cpu-gpu
This too works:
Select CMake: [Debug]: Ready, and then select Build, and then the Run symbol
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page