out of memory error while mutiplying large matrices
6 ビュー (過去 30 日間)
古いコメントを表示
I have got two huge matrices dat1=87093*59 and dat2=99802*59. I tried to do following operation R=dat1*dat1' but MATLAB throws me an error ??? Out of memory. Type HELP MEMORY for your options. I have increased Java Heap Memory(by going into file-<preferences) to 2012Mb but still the problem repeats. Can anyone help me out. system config: windows 7-64bit, 8gb ram, matlab:r2010a-32bit version Many thx in advance.
0 件のコメント
採用された回答
Youssef Khmou
2014 年 4 月 7 日
This multiplication goes beyond the limit of Read-Only-Memory, the solution is to use the multiplication per blocks, see the example in this link on how this is performed : http://math.stackexchange.com/questions/30135/multiplication-of-block-matrices
So you need to decompose the matrices A,B into at least 4 blocks and compute structurally each block of C.
0 件のコメント
その他の回答 (3 件)
John D'Errico
2014 年 4 月 7 日
編集済み: John D'Errico
2014 年 4 月 7 日
Just wanting to do something extreme is not enough to be able to do it.
The resulting matrix will be 87093x99802 in size,
87093*99802*8/1e9
ans =
69.536
so roughly 70 gigabytes in size.
People think their computers are infinitely large and infinitely fast. Not true. They have limits, and you are trying to go far past those limits here.
0 件のコメント
Jan
2014 年 4 月 7 日
Do not increase the Java heap memory only because it contains the term "memory" also. In this case reserving memory for Java increases the problem, because you have less memory for the computations.
On one hand installing much more RAM is the best solution - I'd start at 2*70 GB. Of course this is expensive. On the other hand running a 32-bit version of Matlab is not sufficient.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!