|
Matlab throws and 'Out of Memory' error when I use the following command.
[L,U,P,Q,R] = lu(A);
The matrix 'A', is a sparse matrix of size 154401x154401, of type double.
I have checked that the matrix 'A' occupies 149024836bytes, using the 'whos' command just before calling the 'lu' function. 'A', as I can see, occupies just 143MB.
I have a 4GB RAM on my computer. I checked the memory usage when I start to execute the lu command. The memory increases all the way to 2.5GB (from about 990MB), before MATLAB throws an 'Out of Memory' error.
I am trying to figure out the following things.
1. Why is MATLAB throwing an 'Out of Memory' error when there is still about 1.5GB of RAM left for it to use?
2. Why is lu causing an increase in memory usage of about 1.5GB (RAM usage goes up from 990MB to 2.5GB)? It just doesn't make sense that it is using about 1.5GB to execute lu, and in fact, wants more!
|