Re: JLink OutOfMemoryError
- To: mathgroup at smc.vnet.net
- Subject: [mg70216] Re: [mg70156] JLink OutOfMemoryError
- From: Todd Gayley <tgayley at wolfram.com>
- Date: Sat, 7 Oct 2006 07:08:52 -0400 (EDT)
At 12:57 AM 10/6/2006, Allen, Matthew wrote: >Hello, > >I'm trying to do large array crunching in Mathematica/Jlink. The code >works fine for small 2D arrays, but when I try to use large arrays (i.e. >400000x64) I get a > >java.lang.OutOfMemoryError > >I've tried to increase the memeory supply by using: > >InstallJava[CommandLine->"C:\Program Files\Wolfram >Research\Mathematica\5.2\SystemFiles\Java\Windows\bin\java.exe -Xms32m >-Xmx128m"] > >but it crashes or asks me to "Select the MathLink file to run." Does >anybody have any advice. I really need to crunch big arrays and I don't >want to use another system. Thanks for any advice. Matthew, Use the JVMArguments option, which exists precisely so you don't have to mess with the Java command line: InstallJava[JVMArguments->"-Xmx512m"] Note that you will need a heap larger than the 128 Mb you specified. Todd Gayley Wolfram Research