<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic clEnqueueReadBuffer crashes if using printf and global work siz in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827080#M1217</link>
    <description>Hi&lt;BR /&gt;We were able to reproduce the failure. It apears to be bug in the SDK compiler.&lt;BR /&gt;We are looking into that.&lt;BR /&gt;Thanks, Shiri&lt;BR /&gt;</description>
    <pubDate>Sun, 15 May 2011 13:51:58 GMT</pubDate>
    <dc:creator>Shiri_M_Intel</dc:creator>
    <dc:date>2011-05-15T13:51:58Z</dc:date>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work size &gt; 1</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827069#M1206</link>
      <description>System: Intel Core 2 Duo SL 9400, Windows 7 64 bits, Intel OpenCL SDK 1.1 Beta&lt;BR /&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;I have a problem I'm unable to debug. My program crashes when calling a kernel with a printf in it.&lt;BR /&gt;The program does not crash when I remove the printf statement or when I use global work size = 1 (but in any case it does not print anything).&lt;BR /&gt;&lt;BR /&gt;I could not find any documentation about printf, except that works like in C99 and that requires to enable the extension. Are there any other requirements?</description>
      <pubDate>Mon, 09 May 2011 09:02:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827069#M1206</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-09T09:02:55Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827070#M1207</link>
      <description>Hello goldmund99,&lt;BR /&gt;&lt;BR /&gt;Could you please provide us with a minimal code sample that reproduces your problem? &lt;BR /&gt;&lt;BR /&gt;It does not have to be your full kernel, if that's impossible for you due to security reasons. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Mon, 09 May 2011 09:26:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827070#M1207</guid>
      <dc:creator>Eli_Bendersky__Intel</dc:creator>
      <dc:date>2011-05-09T09:26:08Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827071#M1208</link>
      <description>The kernel is:&lt;BR /&gt;&lt;BR /&gt;#pragma OPENCL EXTENSION cl_intel_printf : enable&lt;BR /&gt;__kernel void sensitivity(__global int * dest)&lt;BR /&gt;{&lt;BR /&gt; int tid = get_global_id(0);&lt;BR /&gt; dest[tid] = tid*2;&lt;BR /&gt; printf("tid");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Maybe I did some error during testing, now it crashes also with global_work_size = 1 and local_work_size = NULL.&lt;BR /&gt;If I remove the printf statement, it works as espected.</description>
      <pubDate>Mon, 09 May 2011 14:29:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827071#M1208</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-09T14:29:25Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827072#M1209</link>
      <description>More details:&lt;BR /&gt;The reported error is "Stack overflow"&lt;BR /&gt;&lt;BR /&gt;The code I use to run the kernel is as follows:&lt;BR /&gt;&lt;BR /&gt;cl_int errorcode = CL_SUCCESS;&lt;BR /&gt;n = 1;&lt;BR /&gt;
std::vector&lt;CL_INT&gt; dst_host(n);&lt;BR /&gt;&lt;BR /&gt;cl_context context = clCreateContextFromType(context_properties, CL_DEVICE_TYPE_CPU, NULL, NULL, &amp;amp;errorcode);&lt;BR /&gt;cl_command_queue cmd_queue = clCreateCommandQueue(context, device, properties, &amp;amp;errorcode);&lt;BR /&gt;cl_mem dest_mem = clCreateBuffer(context, CL_MEM_WRITE_ONLY, n*sizeof(cl_int), &amp;amp;dst_host[0], &amp;amp;errorcode);&lt;BR /&gt;cl_program program = clCreateProgramWithSource(context, 1, (const char**)kernel_source, lengths, &amp;amp;errorcode);&lt;BR /&gt;errorcode = clBuildProgram(program, NULL, NULL, NULL, NULL, NULL);&lt;BR /&gt;cl_kernel kernel = clCreateKernel(program, "sensitivity", &amp;amp;errorcode);&lt;BR /&gt;errorcode = clSetKernelArg(kernel,0,sizeof(cl_mem),(const void *)dest_mem);&lt;BR /&gt;errorcode = clEnqueueNDRangeKernel(cmd_queue, kernel, 1, NULL, 1, NULL, NULL, NULL);&lt;BR /&gt;errorcode = clEnqueueReadBuffer(cmd_queue, dest_mem, CL_TRUE, 0, n*sizeof(cl_int), &amp;amp;dst_host[0],NULL,NULL,NULL); // &amp;lt;- CRASH&lt;BR /&gt;&lt;/CL_INT&gt;</description>
      <pubDate>Mon, 09 May 2011 15:15:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827072#M1209</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-09T15:15:25Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827073#M1210</link>
      <description>Also very strange: when I compile the kernel with the Intel OpenCL SDK Offline Compiler it gives me this warning:&lt;BR /&gt;&lt;BR /&gt;Build succeeded!&lt;BR /&gt;:1:26: warning: expected identifier in '#pragma OPENCL' - ignored&lt;BR /&gt;Build started&lt;BR /&gt;Kernel &lt;SENSITIVITY&gt; was successfully vectorized&lt;BR /&gt;Done.&lt;BR /&gt;&lt;BR /&gt;&lt;/SENSITIVITY&gt;</description>
      <pubDate>Mon, 09 May 2011 15:22:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827073#M1210</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-09T15:22:00Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827074#M1211</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We will check the warning issue, but it's not related to the failure.&lt;BR /&gt;&lt;BR /&gt;Please check the following line:&lt;BR /&gt;&lt;BR /&gt;errorcode = clEnqueueNDRangeKernel(cmd_queue, kernel, 1, NULL, 1, NULL, NULL, NULL);&lt;BR /&gt;&lt;BR /&gt;According to the spec. the global range parameter should be passed as array and not as constant.&lt;BR /&gt;Please use this sequence:&lt;BR /&gt;&lt;BR /&gt;size_t global = 1;&lt;BR /&gt;errorcode = clEnqueueNDRangeKernel(cmd_queue, kernel, 1, NULL, &amp;amp;global, NULL, NULL, NULL);</description>
      <pubDate>Tue, 10 May 2011 08:53:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827074#M1211</guid>
      <dc:creator>Evgeny_F_Intel</dc:creator>
      <dc:date>2011-05-10T08:53:12Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827075#M1212</link>
      <description>Actually I'm using a pointer as the specification says, I just changed in the post the sentence to made the sentence clearer...sorry for the mistake.&lt;BR /&gt;I reported the API code just for reference but it is the same as in provided examples, I checked that the same code works with different kernels and also for the minimal kerner I wrote, if I comment the printf statement.</description>
      <pubDate>Tue, 10 May 2011 09:02:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827075#M1212</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-10T09:02:55Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827076#M1213</link>
      <description>Hi&lt;BR /&gt;We will try your code and update you&lt;BR /&gt;Thanks, Shiri&lt;BR /&gt;</description>
      <pubDate>Wed, 11 May 2011 06:50:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827076#M1213</guid>
      <dc:creator>Shiri_M_Intel</dc:creator>
      <dc:date>2011-05-11T06:50:16Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827077#M1214</link>
      <description>Hello &lt;B&gt;&lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=518109" class="basic" href="https://community.intel.com/../profile/518109/"&gt;goldmund99&lt;/A&gt;,&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;To reproduce your problem quickly, it would help a lot if you could send us the complete source code file that crashes for you. We need the host C++ code that invokes the OpenCL SDK, as well as the kernel (if that's in a separate file). Getting the complete code, &lt;I&gt;as you yourself run it&lt;/I&gt;, is very important.&lt;BR /&gt;&lt;BR /&gt;Is this possible?&lt;BR /&gt;&lt;BR /&gt;Eli&lt;BR /&gt;</description>
      <pubDate>Wed, 11 May 2011 07:01:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827077#M1214</guid>
      <dc:creator>Eli_Bendersky__Intel</dc:creator>
      <dc:date>2011-05-11T07:01:28Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827078#M1215</link>
      <description>&lt;B&gt;&lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=518109" class="basic" href="https://community.intel.com/../profile/518109/"&gt;goldmund99&lt;/A&gt;, &lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;Thanks. We'll try to reproduce the problem and will get back to you once we have some conclusions.&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;</description>
      <pubDate>Thu, 12 May 2011 05:16:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827078#M1215</guid>
      <dc:creator>Eli_Bendersky__Intel</dc:creator>
      <dc:date>2011-05-12T05:16:05Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827079#M1216</link>
      <description>I have found a workaround for now.&lt;BR /&gt;The problem is not clEnqueueReadBuffer, because the crash happens also by calling clFinish after clEnqueueNDRangeKernel.&lt;BR /&gt;&lt;BR /&gt;I was calling clEnqueueNDRangeKernel using NULL as argument for local_work_size. According to the 1.1 specification: "local_work_size can also be a NULL value in which case the OpenCL implementation will determine how to be break the global work-items into appropriate work-group instances."&lt;BR /&gt;&lt;BR /&gt;If i explicit the local work size, for global_work_size = 10 and work_dim I call clEnqueueNDRangeKernel and get:&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;*local_work_size = 0 -&amp;gt; Error: CL_INVALID_WORK_GROUP_SIZE (this is different than giving NULL pointer as argument), conformant with OpenCL 1.1&lt;/LI&gt;&lt;LI&gt;*local_work_size = 1-2 -&amp;gt; Returns CL_SUCCESS but crashes when calling clFinish&lt;/LI&gt;&lt;LI&gt;*local_work_size = 3-4 -&amp;gt; Error: CL_INVALID_WORK_GROUP_SIZE, conformant with OpenCL 1.1&lt;/LI&gt;&lt;LI&gt;*local_work_size = 5 -&amp;gt; Correct results, every 4-5 tries crashes&lt;/LI&gt;&lt;LI&gt;*local_work_size = 6-9 -&amp;gt; Error: CL_INVALID_WORK_GROUP_SIZE, conformant with OpenCL 1.1&lt;/LI&gt;&lt;LI&gt;*local_work_size = 10 -&amp;gt; Correct results, seems to never crash&lt;/LI&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 May 2011 11:16:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827079#M1216</guid>
      <dc:creator>goldmund99</dc:creator>
      <dc:date>2011-05-12T11:16:26Z</dc:date>
    </item>
    <item>
      <title>clEnqueueReadBuffer crashes if using printf and global work siz</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827080#M1217</link>
      <description>Hi&lt;BR /&gt;We were able to reproduce the failure. It apears to be bug in the SDK compiler.&lt;BR /&gt;We are looking into that.&lt;BR /&gt;Thanks, Shiri&lt;BR /&gt;</description>
      <pubDate>Sun, 15 May 2011 13:51:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueReadBuffer-crashes-if-using-printf-and-global-work-size/m-p/827080#M1217</guid>
      <dc:creator>Shiri_M_Intel</dc:creator>
      <dc:date>2011-05-15T13:51:58Z</dc:date>
    </item>
  </channel>
</rss>

