Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
18 Views

clEnqueueUnmapMemObject CL_OUT_OF_HOST_MEMORY

I'm trying to run my program on an Intel HD Graphics 4600 device with driver version 20.19.15.4331.

The source code to the program is here:

https://github.com/david3x3x3/eternity2

I'm running the program with these parameters:

./eternity2.exe -cl -limit 1500 -platform 0 b10x10s1 10 2019293 23

The program is repeatedly doing these steps:

  1. clEnqueueUnmapMemObject
  2. clEnqueueNDRangeKernel
  3. clEnqueueMapBuffer

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 clEnqueueUnmapMemObject.

I've run this same program on other devices (NVIDIA, AMD) and and I don't get the error on those devices.

Is this a problem with the Intel OpenCL driver, or am I doing something wrong?

 

0 Kudos
1 Reply
Highlighted
Employee
18 Views

Hi David,

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.

Another issue: on our hardware we have shared physical memory so you never want to do clEnqueueReadBuffer. You might want to read this article https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performanc.... 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.

Have fun!

 

 

0 Kudos