Quantcast

Julia3d out of memory problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Julia3d out of memory problem

Martin
Hi,
Trying to run Julia3d throws the following exception:

BUILD_SUCCESS
CLDevice [id: 161313944 name: GeForce 310M type: GPU profile: FULL_PROFILE] build log:
    <empty>
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Direct buffer memory
        at java.nio.Bits.reserveMemory(Unknown Source)
        at java.nio.DirectByteBuffer.<init>(Unknown Source)
        at java.nio.ByteBuffer.allocateDirect(Unknown Source)
        at com.jogamp.common.nio.Buffers.newDirectByteBuffer(Buffers.java:69)
        at com.jogamp.common.nio.Buffers.newDirectFloatBuffer(Buffers.java:111)
        at com.jogamp.opencl.CLContext.createFloatBuffer(CLContext.java:318)
        at com.jogamp.opencl.demos.julia3d.Julia3d.update(Julia3d.java:92)
        at com.jogamp.opencl.demos.julia3d.Renderer.reshape(Renderer.java:188)

I tried to use -Xmx1400m, and can't go further with my computer otherwise JVM can't start.

Should this memory error be solved with a larger heap, and in that case which size, or am I going on the wrong track using -Xmx for solving this issue?

Best regards,
Martin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Julia3d out of memory problem

Patrick
I know this is two years old, but there were no replies, and in case someone else stumbles across this thread, RenderingConfig32.java, RenderingConfig64.java, Vec32.java, and Vec64.java all seem to define their structures incorrectly. Perhaps the way they are supposed to be defined changed.

To fix it, replace each occurrence of setIntAt(x, val) with setIntAt(x*4, val) (e.g. setIntAt(1, val) -> setIntAt(4, val))
Do the same thing with getIntAt(x), getFloatAt(x), setFloatAt(x, val), setFloatsAt(x, val), and getFloatsAt(x).

Hope this helps.
Loading...