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!