Out of memory using mldivide \?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Matt J
le 18 Juin 2014
Modifié(e) : Matt J
le 18 Juin 2014
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 commentaires
Matt J
le 18 Juin 2014
Modifié(e) : Matt J
le 18 Juin 2014
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Performance and Memory dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!