Hi there,
I've read following statement of Intel:
http://software.intel.com/en-us/articles/debugging-opencl-kernels-using-printf/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:
#pragma OPENCL EXTENSION cl_intel_printf : enableFollowing within the OpenCL kernel works fine:
printf("hello world n");
Using printf with specifiers breaks Intel OpenCL with a bad segmentation fault.
Examples:
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 workGDB shows following for each single example:
(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 ?? ()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


