weyns49570 / efficient-java-matrix-library

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

applying SVD on very large matrices causes a memory exception #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Matrix size is 7000x60000
The matrix is initialized and filled with large number of different values. 
When I try to apply the SVD function on the marix, I get the following:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

Program is set to use 7GB of memory with the following:
-Xmx7000m -Xms4600m

This is the line causing the trouble in my program:
SingularValueDecomposition svd = SpecializedOps.svd(TrainM);

Any hints or workarounds to make this work ?

Original issue reported on code.google.com by a.bawa...@gmail.com on 7 Dec 2009 at 11:37

GoogleCodeExporter commented 9 years ago
Sorry for the slow response.  I just noticed that this issue was posted.  I'll 
turn
on auto notification after I finish with this response.

I think you are out of luck here since you are running into physical 
limitations of
your system.  Matrices in EJML are dense double.  That means each element in the
matrix is 64bits.  To declare one matrix of that size you will need  3204.3 
megs of
memory.  When you take in account book keeping you will need more than 3 times 
that
amount.  Even if memory wasn't an issue processing time would be...

Original comment by peter.ab...@gmail.com on 21 Jan 2010 at 5:07

GoogleCodeExporter commented 9 years ago

Original comment by peter.ab...@gmail.com on 21 Jan 2010 at 5:10