- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using Windows 10 2004 (64-bit) with MSVC (19.27.29111 for x64) alongside dpcpp (2021.1 (2020.8.0.0827)) trying to compile the vector-add sample to run on the CPU device of the Intel OpenCL CPU runtime (18.1.016). I got only the Visual C++ Build Tools installed, not the IDE.
My problem is, that:
1. docs say that "Open a command
2. Moving along, I got oneapi-cli.exe to create the vector-add sample folder where I could build using the NMake makefiles if I added the path to all the libs needed as LDFLAGS = /link /LIBPATH:C:\Kellekek\Intel\oneAPI\compiler\2021.1-beta09\windows\lib /LIBPATH:C:\Kellekek\Intel\oneAPI\compiler\2021.1-beta09\windows\compiler\lib\intel64_win. I also had to add C:\Kellekek\Intel\oneAPI\compiler\2021.1-beta09\windows\redist\intel64_win\compiler and C:\Kellekek\Intel\oneAPI\compiler\2021.1-beta09\windows\bin to the PATH so the resulting executable finds sycl.dll and all the other DLLs it needed. (The MSBuild project compiled without hiccups.)
3. Having compiled the example, I tried running it, but it returns the same error:
An exception is caught for vector add.
Native API failed. Native API returns: -15 (CL_COMPILE_PROGRAM_FAILURE) -15 (CL_COMPILE_PROGRAM_FAILURE)
The latter part only gets printed because I added std::cerr << e.what() << std::endl; to the catch block after the kernel invocation before std::terminate(); This happens both when I change the device selector to cpu_selector and host_selector too. I have used the CPU device before with ComputeCpp many times before and it worked, but it seems to fail driving the sample code from the oneAPI SDK.
Am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @GouthamK_Intel for the reply (and apologies for delay on my end). setvars.bat is installed elsewhere on my system.
C:\Users\mnagy>dir "C:\Program Files (x86)\Intel\oneAPI"
Volume in drive C has no label.
Volume Serial Number is C047-66C7
Directory of C:\Program Files (x86)\Intel\oneAPI
2020. 10. 01. 17:31 <DIR> .
2020. 10. 01. 17:31 <DIR> ..
2020. 10. 01. 17:31 <DIR> Installer
0 File(s) 0 bytes
3 Dir(s) 9 685 856 256 bytes free
Aside from that, if I tried invoking the setvars script the way you mentioned, it failed.
C:\Users\mnagy>C:\Kellekek\Intel\oneAPI\setvars.bat vs2019 intel64
:: initializing oneAPI environment ::
: compiler -- latest
The syntax of the command is incorrect.
Having looked inside the batch file it seems to look for VS2017/VS2019 installs based on env vars which are set in my system, but do note that it's only the Build Tools that got installed (I'm using VS Code) and not the full blown IDE.
C:\Kellekek\Intel\oneAPI\compiler\latest\env>dir C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools
Volume in drive C has no label.
Volume Serial Number is C047-66C7
Directory of C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools
2020. 10. 06. 09:49 <DIR> .
2020. 10. 06. 09:49 <DIR> ..
2020. 10. 06. 09:49 526 asan_blacklist.txt
2020. 10. 06. 09:49 452 488 clang_rt.asan_dynamic-i386.dll
2020. 09. 21. 16:15 <DIR> Common7
2020. 10. 06. 09:49 <DIR> CoreCon
2020. 09. 21. 16:08 <DIR> DIA SDK
2020. 10. 06. 09:49 <DIR> ImportProjects
2020. 10. 06. 09:49 <DIR> Licenses
2020. 06. 09. 18:54 <DIR> MSBuild
2020. 10. 06. 09:49 <DIR> SDK
2020. 10. 06. 09:49 <DIR> Team Tools
2020. 09. 21. 16:16 <DIR> VB
2020. 10. 06. 09:49 <DIR> VC
2020. 10. 06. 09:49 <DIR> VC#
2020. 10. 06. 09:49 <DIR> Xml
2 File(s) 453 014 bytes
14 Dir(s) 9 687 486 464 bytes free
I did note however that setvars.bat is sensitive to being invoked in VS dev prompts and takes shortcuts in those cases. I tried that and indeed it did the trick.
C:\Users\mnagy\Source\vector-add>C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.7.5
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Users\mnagy\Source\vector-add>C:\Kellekek\Intel\oneAPI\setvars.bat vs2019
:: initializing oneAPI environment ::
: compiler -- latest
: dev-utilities -- latest
: tbb -- latest
:: oneAPI environment initialized ::
C:\Users\mnagy\Source\vector-add>.\vector-add-buffers.exe
Running on device: AMD Ryzen 7 1700 Eight-Core Processor
Vector size: 10000
[0]: 0 + 0 = 0
[1]: 1 + 1 = 2
[2]: 2 + 2 = 4
...
[9999]: 9999 + 9999 = 19998
Vector add successfully completed on device.
These may be useful for people favoring bare minimum installs (and CI images) that wish to leverage oneAPI.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us!
As per the DPC++ system requirements, you need to have Microsoft Visual Studio with "Desktop development with C++" workload installed"
Please find the below link for more details about DPC++ system requirements.
However, we will get back to you with more information.
Have a Good day!
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please try the following steps and let us know the outcome of it. So that we can get more details about the issue which you are facing.
1. Try C++ HelloWorld program to make sure the necessary C++ headers/runtimes are there in your system environment.
2. Create an intel64 environment and try to run the dpcpp vector-add application again:
- Start > search for "Intel oneAPI command prompt for Microsoft Visual Studio 2019"
- Right-click on the application > Open File Location
- Right-click on the application > Properties > Shortcut > Add intel64 at the end of the target field.
- example: C:\Windows\System32\cmd.exe /E:ON /K ""C:\Program Files (x86)\Intel\oneAPI\setvars.bat" vs2019 intel64"
- Run the vector-add sample application.
Please provide the screenshots/error logs if applicable.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @GouthamK_Intel for the reply (and apologies for delay on my end). setvars.bat is installed elsewhere on my system.
C:\Users\mnagy>dir "C:\Program Files (x86)\Intel\oneAPI"
Volume in drive C has no label.
Volume Serial Number is C047-66C7
Directory of C:\Program Files (x86)\Intel\oneAPI
2020. 10. 01. 17:31 <DIR> .
2020. 10. 01. 17:31 <DIR> ..
2020. 10. 01. 17:31 <DIR> Installer
0 File(s) 0 bytes
3 Dir(s) 9 685 856 256 bytes free
Aside from that, if I tried invoking the setvars script the way you mentioned, it failed.
C:\Users\mnagy>C:\Kellekek\Intel\oneAPI\setvars.bat vs2019 intel64
:: initializing oneAPI environment ::
: compiler -- latest
The syntax of the command is incorrect.
Having looked inside the batch file it seems to look for VS2017/VS2019 installs based on env vars which are set in my system, but do note that it's only the Build Tools that got installed (I'm using VS Code) and not the full blown IDE.
C:\Kellekek\Intel\oneAPI\compiler\latest\env>dir C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools
Volume in drive C has no label.
Volume Serial Number is C047-66C7
Directory of C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools
2020. 10. 06. 09:49 <DIR> .
2020. 10. 06. 09:49 <DIR> ..
2020. 10. 06. 09:49 526 asan_blacklist.txt
2020. 10. 06. 09:49 452 488 clang_rt.asan_dynamic-i386.dll
2020. 09. 21. 16:15 <DIR> Common7
2020. 10. 06. 09:49 <DIR> CoreCon
2020. 09. 21. 16:08 <DIR> DIA SDK
2020. 10. 06. 09:49 <DIR> ImportProjects
2020. 10. 06. 09:49 <DIR> Licenses
2020. 06. 09. 18:54 <DIR> MSBuild
2020. 10. 06. 09:49 <DIR> SDK
2020. 10. 06. 09:49 <DIR> Team Tools
2020. 09. 21. 16:16 <DIR> VB
2020. 10. 06. 09:49 <DIR> VC
2020. 10. 06. 09:49 <DIR> VC#
2020. 10. 06. 09:49 <DIR> Xml
2 File(s) 453 014 bytes
14 Dir(s) 9 687 486 464 bytes free
I did note however that setvars.bat is sensitive to being invoked in VS dev prompts and takes shortcuts in those cases. I tried that and indeed it did the trick.
C:\Users\mnagy\Source\vector-add>C:\Kellekek\Microsoft\VisualStudio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.7.5
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Users\mnagy\Source\vector-add>C:\Kellekek\Intel\oneAPI\setvars.bat vs2019
:: initializing oneAPI environment ::
: compiler -- latest
: dev-utilities -- latest
: tbb -- latest
:: oneAPI environment initialized ::
C:\Users\mnagy\Source\vector-add>.\vector-add-buffers.exe
Running on device: AMD Ryzen 7 1700 Eight-Core Processor
Vector size: 10000
[0]: 0 + 0 = 0
[1]: 1 + 1 = 2
[2]: 2 + 2 = 4
...
[9999]: 9999 + 9999 = 19998
Vector add successfully completed on device.
These may be useful for people favoring bare minimum installs (and CI images) that wish to leverage oneAPI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please let us know the status of your issue?
If your issue persists, please provide the outputs for the steps as mentioned earlier.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please let us know the status of your issue?
If your issue persists, please provide the outputs for the steps as mentioned earlier.
If resolved, let us know if we can close the thread.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue is resolved!
As this issue has been resolved, we will no longer respond to this thread.
If you require any additional assistance from Intel, please start a new thread.
Any further interaction in this thread will be considered community only.
Have a Good day!
Thanks & Regards
Goutham

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