Out of memory while executing large matrix sizes
조회 수: 13 (최근 30일)
이전 댓글 표시
I am developing some MOM codes which requires to build big matrices of teh order of 10000 x 10000 depending on structure being meshed into small cells
Whenevr i exceed size of 5000x5000 i get out of memory although i am having 8GB RAM in my system. Can anybody suggest a solution for it, I am in a real mess as not able to complete my assignment
댓글 수: 0
답변 (2개)
Geoff
2012년 3월 16일
Type the following into the command window
memory
The output from mine is as follows:
Maximum possible array: 10511 MB (1.102e+010 bytes) *
Memory available for all arrays: 10511 MB (1.102e+010 bytes) *
Memory used by MATLAB: 968 MB (1.015e+009 bytes)
Physical Memory (RAM): 8167 MB (8.564e+009 bytes)
* Limited by System Memory (physical + swap file) available.
Are you running a 64-bit operating system with the 64-bit edition of MatLab installed?
A 10000x10000 matrix of doubles requires about 800MB memory. If you're getting out-of-memory problems, it could be that the processing you are doing on those matrices requires considerably more memory.
Start by clearing all variables:
clear
And only load in the data required for the operation. Sometimes you get this problem when returning a large amount of data from a function call because you haven't cleared the previous result first.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!