Reply – Code working under Snow Leopard but not on Lion
Your Name
or Cancel
In Reply To
Code working under Snow Leopard but not on Lion
— by Giovanni Idili Giovanni Idili

exact same code running OK on Snow Leopard but throwing the following error on Lion:

com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140699706121896 name: IntegrateHHStep]
with gwo: null gws: {256} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]

I am using the following code to define the local workgroup size and global worksize for the I/O buffers:

// Length of arrays to process
int elementCount = models.size();
// Local work size dimensions for the selected device
int localWorkSize = min(device.getMaxWorkGroupSize(), 256);
// rounded up to the nearest multiple of the localWorkSize
int globalWorkSize = roundUp(localWorkSize, elementCount);
// results buffers are bigger as we are capturing every value for every item for every time-step
int globalWorkSize_Results = roundUp(localWorkSize, elementCount*timeConfiguration.getTimeSteps());

On a twitter conversation, @mbien suggested I set localWorkSize to 0, so that the driver will pick-up automatically a worksize, but how can I declare the buffers of size globalWorkSize and globalWorkSize_Results without knowing what to round up to (do I just not round up)?