OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

How to debug a crash

Polar01
Beginner
1,166 Views
Hi,
Often, when I run my application... the OpenCL kernel crash !
I have no idea where the problem is because I have a lot of OpenCL code in this kernel. So, I'm searching since 2 weeks... but I have "no idea" (really no idea) of the problem !
So, do you have ideas to help me to debug this ?
0 Kudos
5 Replies
Eli_Bendersky__Intel
1,166 Views
Hello Polar01,

One tool that could help you in debugging the crash is our SDK's preview support of printf() inside OpenCL kernels. Please see section 2.10 of the user's guide for more details. You'll need the latest release of the SDK for that.
0 Kudos
Polar01
Beginner
1,166 Views
Thanks Eli,
I use printf, but unfortunately it doesn't help !!! I have review all my code several times... and find not coding error ! (For info, I work on Win7).
0 Kudos
Maxim_S_Intel
Employee
1,166 Views
The only way to catch the issue would be binary search: start with commenting your kernel code completely, then uncomment half of it, if still fails, comment next half of the half etc.
0 Kudos
Polar01
Beginner
1,166 Views
Thanks,
I have try this... but without success !!
Can we generate a PDB file to debug the kernel with Visual Studio ? or to debug the kernel with MinGW (GDB) ?
0 Kudos
Shiri_M_Intel
Employee
1,166 Views
Hi
Currently it is not possible to create PDB files for OpenCL kernel.
We are aware of the need for OpenCL debugger, but we still dont have such tool.
The only way to debug curently is to comment out lines in the kernel until the problemtaic line is found.
If you need further assist you can attach the kernel code and we will try to help.
Thanks, Shiri
0 Kudos
Reply