- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I've read following statement of Intel:
[plain]http://software.intel.com/en-us/articles/debugging-opencl-kernels-using-printf/[/plain]
I tried 'printf' for debugging my stuff on a Intel Core i7 2600k and a Core i7 2620m with Arch Linux (Intel OpenCL SDK 1.5 and the latest Nvidia OpenCL headers).
I've set following within my OpenCL kernel file:
[cpp]#pragma OPENCL EXTENSION cl_intel_printf : enable[/cpp]
Following within the OpenCL kernel works fine:
[cpp]printf("hello world \n");[/cpp]
Using printf with specifiers breaks Intel OpenCL with a bad segmentation fault.
Examples:
[cpp]printf("hello world %i \n", 10 ); // doesn't work printf("hello world %s \n", "test" ); // doesn't work printf("hello world %f \n", 1.0f); // doesn't work printf("hello world %d \n", 1.0 ); // doesn't work[/cpp]GDB shows following for each single example:
[bash](gdb) backtrace #0 0x00007ffff7042d68 in vfprintf () from /lib/libc.so.6 #1 0x00007ffff7069582 in vsnprintf () from /lib/libc.so.6 #2 0x00007ffff3342357 in ?? () from /opt/intel/opencl-sdk/libOclCpuBackEnd.so #3 0x00007ffff3342509 in ?? () from /opt/intel/opencl-sdk/libOclCpuBackEnd.so #4 0x00007ffff3342787 in ?? () from /opt/intel/opencl-sdk/libOclCpuBackEnd.so #5 0x00007ffff3342d65 in ?? () from /opt/intel/opencl-sdk/libOclCpuBackEnd.so #6 0x00007ffff7ed034d in ?? () #7 0x3ff0000000000000 in ?? () #8 0x0000000000000000 in ?? ()[/bash]
I'm not really sure if it is a Intel OpenCL SDK Bug ... is somebody using 'printf' within Intel OpenCL and can say if it works fine or not?
Regards
Patrick
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick,
The printf implementation is a stable feature that has been part of the SDK for a few releases now.
I suspect your problem may have to do with the Linux distribution you're using. According to the SDK release notes, the only officially supported Linux distributions are:
The printf implementation is a stable feature that has been part of the SDK for a few releases now.
I suspect your problem may have to do with the Linux distribution you're using. According to the SDK release notes, the only officially supported Linux distributions are:
- Novell* SUSE* Linux Enterprise Server 11 Service Pack 1 (64-bit version)
- Red Hat* Enterprise Linux 6 (64-bit version).
So Arch Linux is not supported. Specifically, there may be libc differences in Arch Linux which cause this problem. Please try your program on one of the supported distributions listed above, and see if you have the crashes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eli,
thanks for your feedback. I haven't seen the officially supported Linux before you mentioned them.
Because of the fact, that those commercial Linux distributions are a little bit expensive for a student like me, I'm not interested in buying one of them.
I know that you guys don't want to here: Can we have the following feature within the next release.
So I can only hope that there will a chance to get the source code or at least support for a linux distribution like debian at a later time. (I know that you will not explizitly support Arch ;-) )
Regards
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eli,
We currently use different OS's in addition to the supported ones without much trouble. I can't speak for Arch Linux but we use Ubuntu and have not had any signifigant problems with the printf command. I know I wouldn't want to switch distros to run OpenCL commands but I thought I would mention my experience and I hope it helps.
On a second note to Patrick. Do you really think this is the issue?
Regards,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
While the SDK might work on non-officially suported OSes, it's impossible for us to guarantee that all features will be supported as expected.
While the SDK might work on non-officially suported OSes, it's impossible for us to guarantee that all features will be supported as expected.

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