https://forum.jogamp.org/HelloJOCL-Problems-on-MacOSX-tp2456996p2458690.html
element count and therefore the used memory in the demo.
256 should work on most hardware...
> Tried the HelloJOCL example on MacOS X 10.6.6. on a MacBook Pro laptop.
>
> On running I got:
> Exception in thread "main" java.lang.OutOfMemoryError: Direct buffer memory
> at java.nio.Bits.reserveMemory(Bits.java:633)
> at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:98)
> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
> at
> com.jogamp.common.nio.Buffers.newDirectByteBuffer(Buffers.java:67)
> at
> com.jogamp.common.nio.Buffers.newDirectFloatBuffer(Buffers.java:109)
> at com.jogamp.opencl.CLContext.createFloatBuffer(CLContext.java:316)
> at HelloJOCL.main(HelloJOCL.java:30)
>
> so I then changed line 20 to make elementCount smaller:
> int elementCount = 1444777;
>
> But now I get a new error:
> Exception in thread "main"
> com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not
> enqueue 1DRange CLKernel [id: 4296105472 name: VectorAdd]
> with gwo: null gws: {1444864} lws: {256}
> cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]
> at com.jogamp.opencl.CLException.newException(CLException.java:78)
> at
> com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1547)
> at
> com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1455)
> at
> com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1425)
> at HelloJOCL.main(HelloJOCL.java:47)
>
> Any suggestions how I can overcome this problem?
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
>
http://jogamp.762907.n3.nabble.com/HelloJOCL-Problems-on-MacOSX-tp2456996p2456996.html> To start a new topic under jogamp, email
[hidden email]
> To unsubscribe from jogamp, visit
http://michael-bien.com/