<?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 Hi David, in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueUnmapMemObject-CL-OUT-OF-HOST-MEMORY/m-p/1091720#M4929</link>
    <description>&lt;P&gt;Hi David,&lt;/P&gt;

&lt;P&gt;I wonder if you are trashing memory with malloc and free at the beginning and end of your clsearch function. Since it is pretty much a constant throughout the program, you might try to create static int* result and never free it. You can then zero things out at the beginning of clsearch function.&lt;/P&gt;

&lt;P&gt;Another issue: on our hardware we have shared physical memory so you never want to do clEnqueueReadBuffer. You might want to read this article &lt;A href="https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics"&gt;https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics&lt;/A&gt;. Your piece_buf is OK, but your res_buff - you might want to do _aligned_malloc to create results, then use CL_USE_HOST_PTR flag to create your res_buf, then use clEnqueueMapBuffer instead of clEnqueueReadBuffer.&lt;/P&gt;

&lt;P&gt;Have fun!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Apr 2016 01:30:55 GMT</pubDate>
    <dc:creator>Robert_I_Intel</dc:creator>
    <dc:date>2016-04-16T01:30:55Z</dc:date>
    <item>
      <title>clEnqueueUnmapMemObject CL_OUT_OF_HOST_MEMORY</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueUnmapMemObject-CL-OUT-OF-HOST-MEMORY/m-p/1091719#M4928</link>
      <description>&lt;P&gt;I'm trying to run my program on an Intel HD Graphics 4600 device with driver version 20.19.15.4331.&lt;/P&gt;

&lt;P&gt;The source code to the program is here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/david3x3x3/eternity2" target="_blank"&gt;https://github.com/david3x3x3/eternity2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I'm running the program with these parameters:&lt;/P&gt;

&lt;P&gt;./eternity2.exe -cl -limit 1500 -platform 0 b10x10s1 10 2019293 23&lt;/P&gt;

&lt;P&gt;The program is repeatedly doing these steps:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;clEnqueueUnmapMemObject&lt;/LI&gt;
	&lt;LI&gt;clEnqueueNDRangeKernel&lt;/LI&gt;
	&lt;LI&gt;clEnqueueMapBuffer&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'm able to repeat those steps about 163,800 times before I get a CL_OUT_OF_HOST_MEMORY error when I'm trying to run&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;clEnqueueUnmapMemObject.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I've run this same program on other devices (NVIDIA, AMD) and and I don't get the error on those devices.&lt;/P&gt;

&lt;P&gt;Is this a problem with the Intel OpenCL driver, or am I doing something wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 22:42:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueUnmapMemObject-CL-OUT-OF-HOST-MEMORY/m-p/1091719#M4928</guid>
      <dc:creator>David_B_15</dc:creator>
      <dc:date>2016-04-15T22:42:27Z</dc:date>
    </item>
    <item>
      <title>Hi David,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueUnmapMemObject-CL-OUT-OF-HOST-MEMORY/m-p/1091720#M4929</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;

&lt;P&gt;I wonder if you are trashing memory with malloc and free at the beginning and end of your clsearch function. Since it is pretty much a constant throughout the program, you might try to create static int* result and never free it. You can then zero things out at the beginning of clsearch function.&lt;/P&gt;

&lt;P&gt;Another issue: on our hardware we have shared physical memory so you never want to do clEnqueueReadBuffer. You might want to read this article &lt;A href="https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics"&gt;https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics&lt;/A&gt;. Your piece_buf is OK, but your res_buff - you might want to do _aligned_malloc to create results, then use CL_USE_HOST_PTR flag to create your res_buf, then use clEnqueueMapBuffer instead of clEnqueueReadBuffer.&lt;/P&gt;

&lt;P&gt;Have fun!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2016 01:30:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clEnqueueUnmapMemObject-CL-OUT-OF-HOST-MEMORY/m-p/1091720#M4929</guid>
      <dc:creator>Robert_I_Intel</dc:creator>
      <dc:date>2016-04-16T01:30:55Z</dc:date>
    </item>
  </channel>
</rss>

