max size of matrix-out of memory

hi,
i have to define a square matrix
k=zeros(80600,80600) result showing like " out of memory" is there any solution for this error. im doing in a 64 bit (windows 7)system.
thanks

2 Comments

That is a 48+GB array. How much memory do you have and what were you expecting?
4gb ram im using

Sign in to comment.

Answers (3)

the cyclist
the cyclist on 19 Feb 2012
You might be able to use the sparse() command to create the matrix, assuming that the vast majority of those elements are going to be zero as you fill it. Read "doc sparse" for details.
Jan
Jan on 19 Feb 2012
Storing a scalar double requires 8 bytes. Matlab needs an overhead of > 100 bytes for a variable. Therefore a [80600 x 80600] matrix requires a free block of 5.2e10 bytes. Even with a 64 bit Matlab version, you have to install a lot of RAM to store this array. In addition operations on this array will create copies of the array. On a 4GB computer working with one array > 1GB will have a limited stability only.
Walter Roberson
Walter Roberson on 19 Feb 2012
If you are using the 64 bit version of MATLAB (you only mention a 64 bit operating system), then the solution is to take a half terabyte drive and tell Windows to use that entire drive as swap space. Restart MATLAB and you will then be able to create your matrix and perform operations on it.
I am assuming you have no objection to each simple matrix operation taking a number of days. Slow operations are not an error when your arrays are that big.
The only time I have personally observe a need for an array that large has been in connection with computations on systems in the "supercomputer" class, such as in weather forecasting over large areas. (I am not cleared for fission or fusion reaction simulations, so I have not observed those personally.)

Categories

Find more on Particle & Nuclear Physics in Help Center and File Exchange

Asked:

on 17 Feb 2012

Edited:

on 16 Oct 2013

Community Treasure Hunt

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

Start Hunting!