Skip to content

Wrong read/write configuration of memory object

This error was pointed by oclgrind in kernel4:

Invalid write to read-only buffer
	Kernel: gpu_gen_and_eval_newpops
	Entity: Group(47,0,0)
	  call spir_func void @_Z17wait_group_eventsiP9ocl_event(i32 1, %opencl.event_t** nonnull %ev171) #9, !dbg !449
	At line 2097 (column 3) of input.cl:
	  wait_group_events(1,&ev);

So mem_dockpars_conformations_current must be configured as CL_MEM_READ_WRITE, and NOT just for reading as in master and in debugfastergrad

Although the source code in kernel4 never updates this memory object, it actually updates it in every other genetic iteration because populations are updated by switching pointers as in here.

Edited by Leonardo Solis