OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1720 Discussions

clEnqueueUnmapMemObject CL_OUT_OF_HOST_MEMORY


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

The source code to the program is here:

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

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