Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*
560 Discussions

OneAPI sampes are throwing an exception in VisualStudio 2019 16.9.5

VictorD
Novice
3,279 Views

I just installed OneAPI and setup vector-add sample, which throws an exception. Everything seems to have installed correctly and builds in VisualStudio. One possible peculiarity is my Debug shows "Local Windows Debugger" whereas OneAPI webpage shows something else. I've tried several other samples and they throw exceptions also.

When running the executable from the command line, I get a missing sycl.dll is missing. Is there a script that needs to be run on command line to setup the environment?

0 Kudos
12 Replies
SantoshY_Intel
Moderator
3,244 Views

Hi,

 

Thanks for reaching out to us.

 

>>"I just installed OneAPI and setup vector-add sample, which throws an exception."

Could you please share with us the screenshot/log of the exception?

 

>>"One possible peculiarity is my Debug shows "Local Windows Debugger" whereas OneAPI webpage shows something else"

Could you please provide the URL of the webpage that you are referring to?

 

>>" Is there a script that needs to be run on command line to setup the environment?"

Yes, we need to run the setvars.bat file

we can do this either way in a windows machine.

1. Launch the app : "Intel oneAPI command prompt for Intel 64 for visual studio 2019" 

Opening this app will run the setvars.bat file automatically which sets up the environment. After the environment is set you can normally run the application from the same command prompt.

(or)

2. Open windows command prompt and enter the command below:

  >cd <path-to-\intel\oneapi\>

  >setvars.bat

  

Thanks & Regards,

Santosh

 

0 Kudos
VictorD
Novice
3,218 Views

VictorD_0-1621304121908.png

 

0 Kudos
VictorD
Novice
3,218 Views

Here is the debug build error log:

'simple-add-usm.exe' (Win32): Loaded 'C:\Users\duvan\source\repos\Simple_Add1\x64\Debug\simple-add-usm.exe'. Symbols loaded.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\bin\sycld.dll'. Module was built without symbols.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\OpenCL.dll'. Module was built without symbols.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\redist\intel64_win\compiler\svml_dispmd.dll'. Symbols loaded.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\redist\intel64_win\compiler\libmmdd.dll'. Symbols loaded.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
The thread 0x5080 has exited with code 0 (0x0).
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\bin\pi_opencl.dll'. Module was built without symbols.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\bin\pi_level_zero.dll'. Module was built without symbols.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ze_loader.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\emu\intelocl64_emu.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\emu\task_executor64_emu.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\emu\cpu_device64_emu.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\x64\intelocl64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\x64\task_executor64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.2.0\windows\lib\x64\cpu_device64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\AppXDeploymentClient.dll'
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\wldp.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvdm.inf_amd64_032bbb1ad7418abc\nvdlistx.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\version.dll'
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvdm.inf_amd64_032bbb1ad7418abc\nvdlistx.dll'
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvdm.inf_amd64_032bbb1ad7418abc\nvopencl64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\cryptnet.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\dwmapi.dll'
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\nvapi64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9929feffd3ebcabb\igdrcl64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9929feffd3ebcabb\igdgmm64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\glu32.dll'
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\opengl32.dll'
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9929feffd3ebcabb\igdfcl64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9929feffd3ebcabb\igc64.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9929feffd3ebcabb\ze_intel_gpu64.dll'.
Exception thrown at 0x00007FFEDE224B89 in simple-add-usm.exe: Microsoft C++ exception: cl::sycl::runtime_error at memory location 0x0000007651AFD188.
Debug Error!

Program: ...s\duvan\source\repos\Simple_Add1\x64\Debug\simple-add-usm.exe

abort() has been called

(Press Retry to debug the application)
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\TextShaping.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\ProgramData\A-Volute\DellInc.AlienwareSoundCenter\Modules\ScheduledModules\x64\DellInc.AlienwareSoundCenterDevProps2.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\ProgramData\A-Volute\DellInc.AlienwareSoundCenter\Modules\ScheduledModules\x64\NahimicOSD.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\ProgramData\A-Volute\DellInc.AlienwareSoundCenter\Modules\ScheduledModules\x64\ProductInfo.Dll'.
Error 20 (this feature has not been implemented yet) in function AVolute::GetProductInfoT::<lambda_3920e95365a48b95dd51020986e9e351>::operator ()
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'simple-add-usm.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'simple-add-usm.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
The thread 0x6b54 has exited with code 3 (0x3).
The thread 0x2be0 has exited with code 3 (0x3).
The thread 0x31d4 has exited with code 3 (0x3).
The thread 0x8b30 has exited with code 3 (0x3).
The thread 0x94a4 has exited with code 3 (0x3).
The program '[38196] simple-add-usm.exe' has exited with code 3 (0x3).

0 Kudos
SantoshY_Intel
Moderator
3,188 Views

Hi,


Could you please try compiling & running the sample vector add using the windows command line after doing setvars.bat as mentioned in the first response?


Also provide us the system details like OS and whether you are using 32(or) 64-bit machine.


As we are unable to reproduce the issue at our end, Could you please share the steps you used to compile and run the "vector add" in Visual Studio 2019 version 16.9.5?


Thanks,

Santosh


0 Kudos
VictorD
Novice
3,156 Views

VictorD_0-1621511155505.png

It's a Intel Core i7-9750H Dell G5 laptop, with 32GB of RAM, running 64-bit OS Windows Home.

I'm building 64-bit Release and Debug, both of which throw an exception.

To double-check this I rebuilt a brand new project by going to Extensions->BrowseOneAPISamples-> VectorAdd which created a new VS2019 project in a new directory and opened it. Then built it in Release and Debug, which both throw an exception.

They both give this strange warning

2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(519,5): warning MSB8028: The intermediate directory (x64\Release\) contains files shared from another project (vector-add-usm.vcxproj). This can lead to incorrect clean and rebuild behavior.

which is strange, since this is a brand new project, and may be the issue

 

0 Kudos
VictorD
Novice
3,156 Views

It seems like the solution created has two projects in it, and maybe these both are pointing to the same x64/Release and x64/Debug folder when they build

vector-add-buffers

vector-add-usm

Another odd thing I noticed is when I check which compiler is set in solution of project settings, I expect DPC++ to be set and not appear as an option to switch the project to, but it shows up along with VS C++ and Intel Compiler Classic. So, I'm not sure which compiler the solution or projects have been setup with when these projects and solution are created.

0 Kudos
SantoshY_Intel
Moderator
3,118 Views

Hi,

 

Could you please try running the attached sample vecadd.cpp using the the app : "Intel oneAPI command prompt for Intel 64 for visual studio 2019" in windows?

Use the below command to compile:

dpcpp -O2 -EHsc -Zi vecadd.cpp

To run:

vecadd.exe

 

Expected output would be:

Running on device: **device name**
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.

 

Could you please run the sample hello world program provided below in Visual studio?

#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!"<<endl;
return 0;
}

 

After running the above two programs could you please share with us the status of each run?

 

Awaiting your reply.

 

Thanks & regards,

Santosh

 

0 Kudos
VictorD
Novice
3,101 Views

Hi Santosh,

I tried the "Hello World" code in the same VisualStudio project/solution that is failing, and it works great without any failures.

For the other request, "Could you please try running the attached sample vecadd.cpp using the the app : "Intel oneAPI command prompt for Intel 64 for visual studio 2019" here is the result

 

Running on device: Intel(R) Graphics Gen9
Vector size: 10000
An exception is caught for vector add.

 

-Victor

0 Kudos
SantoshY_Intel
Moderator
3,054 Views

Hi,

 

We see that the sample program throws an exception while running on GPU.

So, Could you please try running the sample on CPU by following the below steps?

set SYCL_DEVICE_TYPE=CPU
vecadd.exe

The expected output will be as follows:

Running on device: Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz [Device Name]
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.

Please share with us the running status of the above sample on CPU.

 

Thanks & Regards,

Santosh

 

0 Kudos
SantoshY_Intel
Moderator
3,024 Views

Hi,


We haven't heard back from you. Is your issue resolved? If not, could you please share with us the running status of the above sample on CPU by following the instructions provided in my previous response?


Thanks & Regards,

Santosh


0 Kudos
SantoshY_Intel
Moderator
2,996 Views

Hi,


As we have not heard back from you, we are considering that your issue has been resolved. So we will no longer respond to this thread. If you require 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,

Santosh


0 Kudos
Kamer73
Beginner
2,982 Views

Hi,

 

I came accross the same issue and was able to compile the above VecAdd and the sample vector-add. Nonetheless, I do not understand why (as I'm not really trained on CPU/GPU/etc.), and I'm still unable to run those samples in Visual Studio. Would you have any hints on how to learn about those things?

 

Thanks,

kamer73

0 Kudos
Reply