Troubleshooting¶
Target Installation Fails¶
Error message: Another version of this product is already installed.
You see this error when Intel® Distribution for GDB* Target from previous Beta releases or Intel® Debugger for Heterogeneous Compute Target included in Intel® System Studio are installed on your system.
To avoid this error, remove previously installed packages using Add/Remove Programs on the Control Panel.
Cannot Connect to Target¶
Error message:
Target is not available. GDB Server cannot be run automatically.
Get the Process ID that GPU runtime will use to find the debugger:
Open the
array-transform.cpp
file in the Visual Studio* and manually set the breakpoint at the first line of themain()
function (line 28).Run the program.
Once the breakpoint is hit, find the ID displayed in the Process field on the top-right of the screen in the following format:
[<ID>] array-transform.exe
.
Try to manually start the
gdbserver-gt
the following way:From the target system:
Execute the following command:
gdbserver-gt.exe --hostpid=<PID> --attach 127.0.0.1:1234 1
where:
the port number
1234
is used to establish the TCP connection betweengdbserver-gt
andgdb
the value of
hostpid
is the Process ID defined in the first step.
From the host system via SSH (recommended):
Start
gdbserver-gt
via SSH connection with SSL tunnel from the host to the target. Execute the following command on the host system:ssh remote-server -L 1234:127.0.0.1:1234 gdbserver-gt.exe --hostpid=<PID> --attach 127.0.0.1:1234 1
where:
remote-server
is the name of the target systemthe port number
1234
is used to establish the TCP connection betweengdbserver-gt
andgdb
the value of
hostpid
is the Process ID defined in the first step.
Note
CAUTION
Do not omit the hostname or set it to
localhost
as it may result in connection problems betweengdb
andgdbserver-gt
. The only argument you can change is the port number:1234
. Do not change other arguments ingdbserver-gt
command.Go to Tools > Options > Intel oneAPI > Intel® Distribution for GDB* and set the Server field to
localhost
This ensures that you have a secure connection. Additionally, starting the
gdbserver-gt
under SSH allows you to stop the server during the debugging session when the graphics output is frozen.
Now, there are two options:
If
gdbserver-gt
starts successfully, restart the application in the Microsoft Visual Studio*.To debug the code offloaded to GPU device, you must start the
gdbserver
manually each time before launching the application.If
gdbserver-gt
fails to start:If the following error message appears:
failed to initialize GT; result: Failure Exiting
Check the status of DCD:
sc query igfxdcd
If the status is
RUNNING
, reboot the machine. If the status is notRUNNING
, restart the service by opening the command prompt as Administrator and using the following command:sc start igfxdcd
The output must look as follows:
SERVICE_NAME: igfxdcd TYPE : 1 KERNEL_DRIVER STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 PID : 0 FLAGS :
Restart the debugger from Microsoft Visual Studio.
If the following error message appears:
Unable to connect to remote target <target-name>: The RPC server is unavailable.
Disable the Remote User Account Control (UAC) by executing the following command in the console:
/c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
Try to connect again.
Breakpoint Is Not Hit¶
No error messages are displayed but a breakpoint inside the kernel is not hit.
Check whether in Tools > Options > Intel oneAPI > Intel® Distribution for GDB*, the Enable Debugging field is set to True.
For OpenCL™ applications, verify the following:
-s
flag inclBuildprogram
defines the absolute path of the kernel source file.The kernel source file is accessible on both host and target systems.
Debugging option is enabled for Intel® Distribution for GDB* with Enhanced GPU Offload. Refer to the setup instruction.
Unhandled Exception in igc64.so¶
You can get an unhandled exception coming from IGC at the runtime when
the Debug information format is set. To resolve this issue, set
Property pages > Linker > Pass additional options to device
compilers to /Od
.