Login  Register

Re: HelloJOCL Problems on MacOSX

Posted by felix on Dec 15, 2011; 9:20am
URL: https://forum.jogamp.org/HelloJOCL-Problems-on-MacOSX-tp2456996p3588054.html

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: http://www.khronos.org/message_boards/viewtopic.php?f=28&t=2210

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

Felix