Problems with Intel OpenCL SDK (printf not working, kernel debugging does not work)

Problems with Intel OpenCL SDK (printf not working, kernel debugging does not work)

Hi everyone,I am currently developing an application which should use OpenCL, so I am evaluating all possible OpenCL SDKs currently available.Now with the Intel SDK I have some serious issues which render the toolkit useless for me:First of all I am not able to debug OpenCL kernels.The kernels resides in an file on the disk and I am using VS2008. I compile the .cl file with the "-g" and the "-s " option.But when I try to set a breakpoint in the kernel code VS shows it as unresolved and the program never stops.Perhaps it has something to do with another "smaller" issue: When I enable "Intel OpenCL debugging" and the start the program it freezes in the clCreateContext-Function. So I have to enable the debugging after that function. Perhaps this is the problem why it does not halt on breakpoints? If so, why does it freeze von the clCreateContext call?Another thing is that printf is not working. I am able to output simple text. But when I want to use arguments (e.g. "%d") then there are some segmentation faults which I cannot trace back to my program and the program loops endlessy somewhere.I hope that there are some interesting ideas on how to fix these issues, because I am getting tired of not-working-OpenCL-Tools (almost every tool on the market)Thanks in advance for you time and help

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Regarding kernel debugging issues.
1. Could you please specify which package do you use - x86 or x64 and when did you download it? The x86 package was updated recently (November 8th) to incorporate a fix for kernel debugger. Please update it if you downloaded it earlier.
2. You definitely should set enable "Intel OpenCL debugging" before the debugging session.
3. In case of x64 package the following workaround should be used: enable "Intel OpenCL debugging" then quit the Visual Studio and open it again.

If you still unable to debug OpenCL kernel, could you please attach a small reproducer application and exact steps you perform.


Hi jinzuu,

Please attach a reproducer for the printf problem as well - the simplest kernel where you observe the problem.


Hi Guys,thank you for your answers. I was attached to another project in the meantime and I kinda lost focus on this issue.I would like to address the debugger problem first, so I created a small project which just initializes the Intel-OpenCL-Platform, gets the devices and creates a context.When I enable the OpenCL-Debugger and call the clCreateContext-Function, the application just hangs in there and never returns.I am using the OpenCL-SDK 1.5 (32-bit).System: Windows 7 Enterprise (64-bit), Intel Core i7-2600, Visual Studio 2008 (32-bit).Hope this helps.


Downloadapplication/x-7z-compressed IntelOclError.7z126.79 KB

Hi jinzuu,

I couldn't reproduce the issue so far with the attached application. Could you please check/confirm the following.
1) You start the debugging session with F5, and not Ctrl+F5 (Start Without Debugging).
2) You are able to reach clCreateContext function call line (either by stepping through the code or just putting a breakpoint at it).
3) There are two processes (icldbgsrv.exe and IntelOclError.exe) in the Processes window. Please, restart the Visual Studio if there is only IntelOclError.exe. You might have accidentally closed the icldbgsrv.exe console window because it pops up after several hours or so.
4) You press F10 at the clCreateContext function call line and you don't get any message box regarding the kernel debugger port number change. Please, try to change port number anyway. The working firewall might also cause the issue.


Hello Yuri,I checked all points that you mentioned:1) Yes I start the debug process with F5 (Start with Debugging)2) Yes I am able to step to the line where clCreateContext is called3) In task manager I can only see the icldbgsrv.exe process. The IntelOclError.exe is not running (I also haven't found any simliar executable in the installation folder of Intel's SDK)4) Yes, I "Step over" the clCreateContext call. Then the application gets focus back and nothing happens. Also I don't get any error message. Changing the port or disabling the firewall didn't helpThanks

Hello everyone, same problem here, i.e. the debugger doesn't stop at any breakpoint. I am running Windows 7 64bit, Visual Studio 2010 Premium, OpenCL SDK 2012. I am following all the guidelines like compiling with -g and -s, enabling the OCL debugger, running with F5, .... but nothing helps. I've also tried to change the debugger port and also temporarily disabled the firewall - nothing. The only thing I recognized is that there's no IntelOclError.exe process running on my machine. I'd be very glad if someone could help me getting the debugger working. Thanks a lot in advance.

    Just try solution here, find "ProfilerConfig.exe" and check the "Use Intel OpenCL Profiling Mode", apply and close.

the sdk set using GPU for default, obviously they failed to mention this in the document. ;)

Leave a Comment

Please sign in to add a comment. Not a member? Join today