필터 지우기
필터 지우기

error out of memory

조회 수: 5 (최근 30일)
Fadzli
Fadzli 2017년 5월 25일
편집: Fadzli 2017년 5월 26일
I'm running a program on my pc (Intel i5, 8GB RAM, 2 cores processors) and it works fine with Matlab R2008a. But when I run the same program on other pc with higher spec (Intel Xeon, 16GB RAM, 8 cores processors) with Matlab R2010a, there was an error of 'OUT OF MEMORY'. What's wrong actually? Is it because of my pc, or Matlab version? What should I do? Thanks in advance

채택된 답변

MathReallyWorks
MathReallyWorks 2017년 5월 25일
Hello Fadzli,
We know that Intel xeon is a way better than Intel i5. And moreover other specifications are better in xeon than i5 as you mentioned. So, it should not show "out of memory error". Sometimes this error depends on your program and the size of data. So check out some suggestions about this error on: Resolve "Out of Memory" Errors
  댓글 수: 1
Fadzli
Fadzli 2017년 5월 26일
Thanks @MathReallyWorks, will try to look for the best solution on the given link...

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

추가 답변 (1개)

Jan
Jan 2017년 5월 25일
Without knowing any details about the code, it is hard to guess, what happens. The Xeon machine has 8 cores compared to 2, but only twice as much memory. Perhaps you are running some code in parallel and reserve a huge array per core?
The first thing you have to do is to analyse, which code causes the problem. You should see it in the error message and it is always a good idea to post a complete copy of it. If you find out, that this is not a programming error, the next steps are the same as usual:
  • Install more RAM
  • Avoid letting arrays grow iteratively (pre-allocation)
  • Install more RAM
  • Stop other applications
  • Increase the virtual memory
  • Install more RAM
  • Use smaller data sizes, if possible: UINT12/32 for indices or SINGLE instead of DOUBLE
  • Use inplace operations, when possible
  • Install more RAM
  댓글 수: 1
Fadzli
Fadzli 2017년 5월 26일
편집: Fadzli 2017년 5월 26일
Thanks @Jan Simon, for your info, I'm not running code in parallel, but I'm not sure how to check whether I've reserved a huge array per core, since I didn't set anything on it... Perhaps you can explain details about it?
Anyway, it is a long code but to be concise, the error happen when I'm loading some mat files;
for ww=1:3
load a.mat
load b.mat
load c.mat
.
.
.
load z.mat
end
It stop loading during j.mat and the error was "OUT OF MEMORY", but it never happen at my other computer with lower specs. Maybe something to do with the pc to optimize the memory?

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

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by