On Sun, Jan 17, 2010 at 6:27 PM, Philip Nienhuis <[email protected]> wrote: > Hi, > > While doing some stress-testing on the java-based spreadsheet <-> octave > scripts I consistently run into Java problems on the Windows platform > (using the octave-3.2.3-MingW binary + java package 1.2.6 sent to me a > while ago by Michael Goffioul - i.e. the same as in svn). > I haven't encountered these problems on Linux. > > AFAICT it starts with heap space problems when accessing spreadsheets > with relatively big data arrays (size order of 10^5 elements; IMO big > but not extremely big). > Later on when trying to read or write much smaller chunks I get other > errors, but I suspect these are related to fubarred java structures in > memory as a byproduct of the java heap wrecked earlier on. > That suspicion is more or less confirmed by restarting octave - > reading/writing spreadsheets (ods or xls) is OK then until another too > big chunk is to be written using one of the java interfaces. > > An example is below: > > octave-3.2.3.exe: #1 > xls = xlsopen ('bigfile.xlsx', 1, 'poi'); > Java/Apache POI interface requested... Java/Apache (POI) OK. (& OOXML OK) > Creating file bigfile.xlsx > octave-3.2.3.exe: #2 > ggg = rand (300, 1024); > octave-3.2.3.exe: #3 > xls = oct2xls (ggg, xls, 'BigArray','A1:AMJ500') > error: [java] java.lang.OutOfMemoryError: Java heap space > error: called from: > error: c:\home\philip\mydocs\octave\oct2xls.m at line 468, column 10 > error: c:\home\philip\mydocs\octave\oct2xls.m at line 90, column 17 > octave-3.2.3.exe: #3 > > > Similar errors occur when reading from/writing to .ods /.xls > spreadsheets no matter what java interface I use (ApachePOI, JExcelAPI, > ODFtoolkit, jOpenDocument). > > So apparently there is a memory usage limit for the java package on > Windows systems. > AFAICS transferring data structures (numerical or cell arrays) of up to > about 80,000 elements seems to be OK. > On Linux I've transferred much larger arrays to and from xls, xlsx and > ods spreadsheets with the same scripts and java jars (sizes of up to > 1,000 x 1,024) without a hitch. This made me conclude that it must be > the java-package that has issues on the Windows platform. > > I tried to run the same scripts using the deprecated MSVC 3.0.3 octave > binary that I still have installed, but it turned out that version (with > java-1.2.5) was even more fragile: I got java errors with much > smaller blocks. > > Being not very proficient in java or C++ programming, what can I do help > fix this issue?
You might want to try playing with the JVM arguments, especially the memory controlling arguments. The java package reads arguments from a file java.opts located in the same directory as javaclasspath.m. Michael. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
