adamaulia / efficient-java-matrix-library

Automatically exported from code.google.com/p/efficient-java-matrix-library
0 stars 0 forks source link

Array index out of bound at with large matrix (such as 400000 * 400000) #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. SimpleMatrix s = new SimpleMatrix(400000, 400000);
2. For each row and column, set value = 0.5

What is the expected output? What do you see instead?
The values should be set without error. However, an exception is thrown 
(java.lang.ArrayIndexOutOfBoundsException).

What version of the product are you using? On what operating system?
EJML 0.15, on Windows 7 (64-bit).

Please provide any additional information below.
N/A.

Original issue reported on code.google.com by tim....@tctechinc.com on 31 Jan 2011 at 7:31

Attachments:

GoogleCodeExporter commented 9 years ago
You sure you're getting an ArrayIndexOutOfBoundsException?  I'm asking because 
you are requesting that it to create a matrix that uses 1.16 terrabytes of RAM. 
 Windows 7 can have at most 192 GB.  This is the exception I get on my 
computer:  

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at org.ejml.data.DenseMatrix64F.<init>(DenseMatrix64F.java:148)
    at org.ejml.data.SimpleMatrix.<init>(SimpleMatrix.java:132)
    at Main_EJML.main(Main_EJML.java:27)

Assuming your application allows it, you probably want a library that supports 
sparse matrices. EJML does not yet support sparse matrices.

Original comment by peter.ab...@gmail.com on 31 Jan 2011 at 11:54