Reply – Re: HelloJOCL Problems on MacOSX
Your Name
or Cancel
In Reply To
Re: HelloJOCL Problems on MacOSX
— by felix felix
I ran into the same problems as described here. For some reason context.getMaxFlopsDevice() returned the CPU device and the localWorkSize of 256 caused problems.
After switching to the GPU (and reducing the elementCount to avoid out of memory errors) the HelloJOCL worked.

Changing localWorkSize to "device.getMaxWorkGroupSize()" (1024) caused problems for me (CL_INVALID_WORK_GROUP_SIZE). One important thing seams to be, that the localWorkSize depends on the specific kernel. Using "kernel.getWorkGroupSize(device)" (256) solved the problem.

As described here:

I suggest that the HelloJOGL sample should use "kernel.getWorkGroupSize()" and a lower elementCount to make using JOCL a nicer experience for new developers :)