Out of memory error with 8GB and 64bit
10 ビュー (過去 30 日間)
I am working with lots of memory and I am getting an out of memory error.
Maximum possible array: 16146 MB (1.693e+10 bytes) *
Memory available for all arrays: 16146 MB (1.693e+10 bytes) *
Memory used by MATLAB: 1080 MB (1.132e+09 bytes)
Physical Memory (RAM): 8111 MB (8.505e+09 bytes)
* Limited by System Memory (physical + swap file) available.
The model is quite large. It's a script with dozens of matrixes 50k*50k. I know I use intensive functions as copulas, kron function, nested for and if's.
But this model is being developed for a long time and I really need it to run. What can I do?
Am I being inefficient or am I simply asking the impossible? This is a 64bit version.
Thanks a lot,
Lessmann 2015 年 10 月 30 日
considering the mentioned size of a matrix, the matrix would occupy ~20GB or ~10GB in the case of single precision. With the 16GB available memory you are asking the impossible.
>> M = zeros(50000,50000);
Name Size Bytes Class Attributes
M 50000x50000 20000000000 double
To the point what you cando, take a good look at your script and see if the problem can be broken down into smaller pieces (not processing all the data at once).
If the matrix is sparsely populated, you could have a look into sparse matrices.