- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed the "Getting Started" instructions for using the “Intel oneAPI command prompt for Intel 64 for Visual Studio 2019" and was able to build and run the Vector Add example (USM and buffered).
However, when I follow the instructions below for running the vector add example on Visual Studio 2019 (v16.11.24),
https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-base-windows/top/run-a-sample-project-using-an-ide.html
I get the error that icx-cl is not a full path.
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
1> [CMake] CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:8 (CMAKE_FORCE_CXX_COMPILER)
1> [CMake] CMake Error at C:\temp\oneapi\vs\Base_Vector_Add\CMakeLists.txt:14 (project):
1> [CMake] The CMAKE_CXX_COMPILER:
1> [CMake]
1> [CMake] icx-cl
1> [CMake]
1> [CMake] is not a full path and was not found in the PATH.
1> [CMake]
1> [CMake] Tell CMake where to find the compiler by setting either the environment
1> [CMake] variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
1> [CMake] to the compiler, or to the compiler name if it is in the PATH.
1> [CMake]
1> [CMake]
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "C:/temp/oneAPI/vs/Base_Vector_Add/out/build/x64-Debug/CMakeFiles/CMakeOutput.log".
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\temp\oneapi\vs\Base_Vector_Add\out\install\x64-Debug" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\temp\oneapi\vs\Base_Vector_Add" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\temp\oneapi\vs\Base_Vector_Add\out\install\x64-Debug" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\temp\oneapi\vs\Base_Vector_Add" 2>&1"' returned with exit code: 1'.
This is the only thing in the CMakeOutput.log file
The system is: Windows - 10.0.19045 - AMD64
Note: when using VS, I created the example using Extension -> Intel -> Browse an Intel oneAPI Sample
When CLI is used, the environment variables are set using C:\Program Files (x86)\Intel\oneAPI\setvars.bat. How is the environment setup when using Microsoft Visual Studio?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>Any idea why removing SETVARS_CONFIG fixed the problem? Back in 3-1-2023 you asked me to add it.
SETVARS_CONFIG is used to automate setvars.bat script with Visual Studio by setting the environment variable to the path of the configuration file which will run along with setvars.bat. For example, if you have two versions of compilers with you, when you open VS, the setvars.bat of the latest compiler runs automatically. If you want to use the older compiler then, you would have to create file named "config.txt" and populate it with the compiler version you want as shown below. Then the setvars.bat will execute automatically along with this configuration file, if you provide a path to it. In short, we should provide path to configuration file in place of setvars.bat file.
compiler=2022.1.0
>>>At that time I was using VS 2019. Do you think vs 2019 was the issue?
No, the issue has nothing to do with the Visual Studio version but with the installation and integration. When you updated the toolkits, they may not have been integrated properly but when you reinstalled them in the order VS->Base Toolkit, the issue got resolved.
As your issue got resolved, could you accept this as a solution?
Thanks & Regards,
Shaik Rabiya
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel forums.
Could you please let us know the Intel oneAPI version you have been using?
>>>"When CLI is used, the environment variables are set using C:\ProgramFiles(x86)\Intel\oneAPI\setvars.bat. How is the environment setup when using Microsoft Visual Studio?"
The setvars.bat script sets up the environment variables needed to use the oneAPI toolkits. This script must be run every time a new terminal window is opened for command-line development. The setvars.bat script generally runs automatically when Microsoft Visual Studio is started.
If in case you've build the sample before updating your Visual Studio and tried running it later, can you remove the entire sample and try building it again. If you still face the issue please let us know.
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am using
OneAPI 2023.0.0 (previously I had 2022.2 but uninstalled it before installing 2023)
Visual Studio 2019 (v16.11.24),
The cmake I installed is 3.26.0-rc4, but I don't know what version Visual Studio is using.
I created the base vector add example using the v16.11.24 visual studio version
I'm not sure if this helps, but I opened a visual studio powershell and dumped the path and the environment variables that match "oneapi".
Note that this is an MPI_ONEAPI_ROOT variable that is 2021 vintage.
I also tried the Visual Studio generated Simple-Add sample and get the same icx-cl error as above.
> $Env:Path
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\\MSBuild\Current\Bin;C:\Windows\Microsoftel64;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Python\Python36-64\Scripts\;C:\Python\Python36-64\;C:\Python\Python36-64\Lib\idlelib\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Program Files\dotnet\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\CMake\bin;C:\Users\epatt\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\epatt\.dotnet\tools;;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
PS C:\temp\oneapi\vs\Base_Vector_Add>
> dir env: | findstr -I -N oneapi
7:__VSCMD_PREINIT_PATH C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt\;C:\Program Files (x86)\Intel\oneAPI\tbb\latest\re...
9:ADVISOR_2023_DIR C:\Program Files (x86)\Intel\oneAPI\advisor\2023.0.0
32:I_MPI_ONEAPI_ROOT C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0
42:ONEAPI_ROOT C:\Program Files (x86)\Intel\oneAPI\
95:VTUNE_PROFILER_2023_DIR C:\Program Files (x86)\Intel\oneAPI\vtune\2023.0.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>The cmake I installed is 3.26.0-rc4, but I don't know what version Visual Studio is using.
You can check the cmake version being used by Visual Studio by navigating to Menu Bar
View-> Terminal -> cmake --version
In your case as you've the latest CMake already, the Visual Studio will utilize the CMake version you've installed.
Could you please check if SETVARS_CONFIG environment variable is set in your system? If not please follow the steps from the below link.
Please try to build the sample again(or the similar sample) after deleting the old sample/project.
If the issue still persists please try to reinstall Visual Studio 2019 along with Intel oneAPI Base and HPC toolkits after successful uninstallation.
Please try to install the components in the following order.
Visual Studio -> Base Toolkit -> HPC Toolkit
You should be able to see the following output in the Visual Studio after successful integration.
Please find the below link for more details.
Thank & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help on this. I thought you were onto something with the SETVARS_CONFIG, but alas no.
Before doing the uninstall, here's what I tried based on your reply above:
In the visual studio terminal: cmake --version outputs "cmake version 3.26.0-rc4"
SETVARS_CONFIG was not set in my computer's environment variables. I added it and now in the dos window I get
>set | findstr -I -M SETVAR
SETVARS_CONFIG=C:\Program Files (x86)\Intel\oneAPI\setvars.bat
I also get the above in the visual studio power shell
Keeping in mind that I only have the base oneapi toolkit installed (it worked fine for the oneapi tools cli), here's the env vars that have "oneapi"
When compared to you, I don't have IFORT_COMPILER23 and INSPECTOR_2023_DIR. Are those needed for Base, or IOT, or HPC Toolkits?
> dir env: | findstr -I -N oneapi
7:__VSCMD_PREINIT_PATH C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt\;C:\Program Files (x86)\Intel\oneAPI\tbb\latest\re...
9:ADVISOR_2023_DIR C:\Program Files (x86)\Intel\oneAPI\advisor\2023.0.0
32:I_MPI_ONEAPI_ROOT C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0
42:ONEAPI_ROOT C:\Program Files (x86)\Intel\oneAPI\
65:SETVARS_CONFIG C:\Program Files (x86)\Intel\oneAPI\setvars.bat
96:VTUNE_PROFILER_2023_DIR C:\Program Files (x86)\Intel\oneAPI\vtune\2023.0.0
I closed visual studio, deleted the Base Vector Add example, restarted VS, then navigated to extensions-> intel -> browse intel oneapi samples. I selected the base vector add example. Unfortunately, I get the same error
Severity Code Description Project File Line Suppression State
Error CMake Error at C:\temp\oneAPI\vs\Base_Vector_Add\CMakeLists.txt:14 (project):
The CMAKE_CXX_COMPILER:
icx-cl
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH. VectorAdd C:\temp\oneAPI\vs\Base_Vector_Add\CMakeLists.txt 14
My next step is to uninstall VS and oneapi, and reinstall in the sequence Visual Studio -> Base Toolkit. I won't install HPC nor IOT because it wasn't needed for the oneapi tool cli example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I uninstalled oneapi 2023 and then Visual Studio 2019. I installed visual studio 2022 (Version 17.5.1 - why not try a newer VS eh?) and then the Intel oneAPI Base (2023.0.0 - I made sure VS was not running when I installed oneAPI).
I deleted the example projects, and then used the VS "Extensions -> Intel -> Browse Intel oneAPI Samples" and selected the Base Vector Add example.
Unfortunately I can the same "icx-cl is not a full path and was not found in the PATH." Darn
Note that this time, the SETVARS_CONFIG is set. I am not sure if this is a remnant of what you requested I do in your previous comment, or if it's what the oneAPI Base toolkit installation did.
I checked and there is a setvars.bat in the C:\Program Files (x86)\Intel\oneAPI folder.
> dir env: | findstr -I -N oneapi
6:__VSCMD_PREINIT_PATH C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt\;C:\Program Files (x86)\Intel\oneAPI\tbb\lates...
7:ADVISOR_2023_DIR C:\Program Files (x86)\Intel\oneAPI\advisor\2023.0.0
41:ONEAPI_ROOT C:\Program Files (x86)\Intel\oneAPI\
64:SETVARS_CONFIG C:\Program Files (x86)\Intel\oneAPI\setvars.bat
96:VTUNE_PROFILER_2023_DIR C:\Program Files (x86)\Intel\oneAPI\vtune\2023.0.0
I must be missing a step somewhere in the VS setup.
I also used the oneAPI Tools CLI (command line interface) to create the vector add example in a different folder. I followed the vector-add\readme.md instructions and it compiled and ran ok using the CLI. This proves that the icx-cl compile tool is present, just not when using VS 2019 and 2022.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: I was able to successfully build/run the vector add sample using Visual Studio Code. It's still a mystery why this won't work on Visual Studio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>Keeping in mind that I only have the base oneapi toolkit installed (it worked fine for the oneapi tools cli), here's the env vars that have "oneapi". When compared to you, I don't have IFORT_COMPILER23 and INSPECTOR_2023_DIR. Are those needed for Base, or IOT, or HPC Toolkits?
No, they are not required for the sample that we're running.
Could you please remove SETVARS_CONFIG environment variable and try building the sample again after restarting your visual studio?
If the issue still persists, please provide your hardware and OS details.
Thanks & regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wow, deleting SETVARS_CONFIG did the trick. Cmake ran ok and the project built. I also figured out how to build the vector_add_usm.exe. Yay!
Any idea why removing SETVARS_CONFIG fixed the problem? Back in 3-1-2023 you asked me to add it. At that time I was using VS 2019. Do you think vs 2019 was the issue?
RabiyaSK_Intel: "Could you please check if SETVARS_CONFIG environment variable is set in your system? If not please follow the steps from the below link.
Here's the successful cmake output:
1> [CMake] The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
1> [CMake] CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:8 (CMAKE_FORCE_CXX_COMPILER)
1> [CMake]
1> [CMake]
1> [CMake] -- Using the USM variant. (Eddie: this is output if u add the -DUSM=1 to CMake command arguments as shown above)
1> [CMake] -- FPGA_DEVICE was not specified.
1> [CMake] Configuring the design to run on the default FPGA device intel_a10gx_pac:pac_a10 (Intel(R) PAC with Intel Arria(R) 10 GX FPGA).
1> [CMake] Please refer to the README for information on device selection.
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/temp/oneAPI/vs/Base_Vector_Add/out/build/x64-Debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for responding, we are working on your query. We will get back to you soon.
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great. I'm glad you are looking at this. It's important to know what the real issue was.
Cheers
Eddie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>Any idea why removing SETVARS_CONFIG fixed the problem? Back in 3-1-2023 you asked me to add it.
SETVARS_CONFIG is used to automate setvars.bat script with Visual Studio by setting the environment variable to the path of the configuration file which will run along with setvars.bat. For example, if you have two versions of compilers with you, when you open VS, the setvars.bat of the latest compiler runs automatically. If you want to use the older compiler then, you would have to create file named "config.txt" and populate it with the compiler version you want as shown below. Then the setvars.bat will execute automatically along with this configuration file, if you provide a path to it. In short, we should provide path to configuration file in place of setvars.bat file.
compiler=2022.1.0
>>>At that time I was using VS 2019. Do you think vs 2019 was the issue?
No, the issue has nothing to do with the Visual Studio version but with the installation and integration. When you updated the toolkits, they may not have been integrated properly but when you reinstalled them in the order VS->Base Toolkit, the issue got resolved.
As your issue got resolved, could you accept this as a solution?
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Shaik Rabiya
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page