I'm trying to run my program on an Intel HD Graphics 4600 device with driver version 184.108.40.20631.
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:
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?
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.