Out of memory using mldivide \?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to solve a over-determined set of equations A*x = b using mldivide function as x = A\b; I am getting out of memory error!! Following is the description of the matrices: A = 19000000 x 4900 but sparse consuming 750MB of space. (have to store two of such matrix) b = 19000000 x 1 but sparse 32 bytes.
I tried this on a system with 16 GB of RAM. It went out of memory. On typing
>>help memory
for 64 bit version MATLAB 2013a (I am using for windows) it shows:
Max. possible array = 4577MB
Memory available for all arrays = 4577MB
Memory used by MATLAB = 330MB
Physical Memory(RAM) = 3327 MB
I believe that there is internal restriction for MATLAB to use memory but I don't know how to go about it?
I tried this problem on a computer with 64GB of memory too and still it goes out of memory!!
Please help!!
Thanks in advance.
Puneet
0 件のコメント
採用された回答
Matt J
2014 年 6 月 18 日
編集済み: Matt J
2014 年 6 月 18 日
It doesn't look like you have as much RAM as you say you do. In the output of the memory command that you posted, it says you have only 3.3GB RAM, not 16GB. Maybe you are running under 32-bit Windows?
Nevertheless, if the problem is well-conditioned, you can try solving it using the normal equations
x=full(A.'*A)\(A.'*b)
2 件のコメント
Matt J
2014 年 6 月 18 日
編集済み: Matt J
2014 年 6 月 18 日
The alternative A'A.x = A'.b is really not ideal. It degrades the conditioning of the equations.
You should talk to Tech Support to find out why you don't have access to more of your RAM. I have only 8GB RAM, and my MATLAB session has access to much more memory,
>> memory
Maximum possible array: 12025 MB (1.261e+10 bytes) *
Memory available for all arrays: 12025 MB (1.261e+10 bytes) *
Memory used by MATLAB: 1778 MB (1.864e+09 bytes)
Physical Memory (RAM): 8073 MB (8.465e+09 bytes)
Even if your OS is 64-bit, possibly you've installed a 32-bit MATLAB version? Anyway, it's worth further investigation.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!