Out of Memory Error

조회 수: 1 (최근 30일)
Brillian
Brillian 2013년 5월 15일
Hi,
I need help as I am doing my thesis and MATLAB gives me an "out of memory" error if I creates a huge matrix. In fact, I need this matrix and it can't be reduced. The matrix size is 73728x81234. This matrix is created by a for loop. The code is as follow: for ... for ... for ... for ... x = ... end end end end
That matrix will then be combined with other matrix to become 74088x81234 matrix. I have another matrix (414x81234) that will be used with the matrix above to solve the problem.
I am using laptop to solve the problem (PVRP). I have an i5 CPU and 16GB physical memory (RAM). Maximum possible array = 30314MB Memory available for all arrays = 30314MB Memory used by MATLAB = 831MB Physical Memory (RAM) = 16076MB I have tried clear and clc but it's still not enough. Please help.

채택된 답변

Friedrich
Friedrich 2013년 5월 15일
Hi,
there isn't much you can do. The matrix you need to create needs ~45GB of Memory:
>> 74088*81234*8/1024^3
ans =
44.8411
In the case your Matrix has a lot of 0 entries consider using a sparse matrix.
Even Parallel Computing Toolbox and the distributed array concept won't help because you don't have that much memory available:
You could increase your swap space, however your application will get extremly slow.
  댓글 수: 1
Brillian
Brillian 2013년 5월 23일
Thanks for the reply. Cheers

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by