MATLAB "Out of memory" problem

Hello,
I want to create a large matrix, for example:
zeros(65536, 65536)
Matlab responds:
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
How can I increase memory for Matlab use? I am on linux machine.

 Risposta accettata

Andreas Goser
Andreas Goser il 8 Mar 2011

0 voti

Try the key Technical Notes 1106 and 1107 for that.
Besides looking at increasing the memory use and decreasing the memory used, please always ask yourself the question "do I really need this amount of data to solve my scientific question?"

3 Commenti

REN
REN il 8 Mar 2011
Thanks Andreas!
"do I really need the to solve my scientific question?"
When I need create a large matrix, error like this occurs
Andreas Goser
Andreas Goser il 8 Mar 2011
I corrected my type - "do I really need this amount of data to solve my scientific question?" The point is that I observe often users that generate much more data than they need. E.g. what is the point of measuring room temperatures with 1000 Hz? But some people do and then ask what the shall do with GBytes of unneccessary data. No implication to you appplication but a thought for many users.
REN
REN il 9 Mar 2011
Yeah, I should have done more smarter I'd accept your answer, for thanks...
And if I still can not figure out how in 2-3 days, I will start another post to ask how to represent large transition matrix of Graph in random walk'.

Accedi per commentare.

Più risposte (5)

REN
REN il 8 Mar 2011
and commands:
memory
??? Error using ==> memory
Function MEMORY is not available on this platform.
feature('memstats')
??? Error using ==> feature
An unknown feature was specified
They don't work for me.
Oleg Komarov
Oleg Komarov il 8 Mar 2011

0 voti

You should REALLY consider what you're doing: 65536*65536 * 8 bytes = 32 gigabytes
I worked on server with more than 32 gb, but it really doesn't make sense to create such a huge matrix, often the calculations can be done avoiding such ways.
Oleg

7 Commenti

REN
REN il 8 Mar 2011
just an example 65536*65536
I didn't really crate a matrix that large. But yes should avoid that, to calculation other way.
Oleg Komarov
Oleg Komarov il 8 Mar 2011
The next answer would be, what are you trying to calculate? Maybe we can help and pinpoint the appropriate numerical method.
REN
REN il 8 Mar 2011
Thanks all. I try to create a matrix of transition probabilities:
Like P in the paper: http://www.cs.unibo.it/babaoglu/courses/cas/resources/tutorials/RandomWalks.pdf
page 3
REN
REN il 8 Mar 2011
For a large collection of node set:
X=(x1, x2, x3, ..., xn) (n is a large number)
The matrix P, its (i,j) element(ith row, jth column) is: the probability node j reach to node i after t steps(iteration)
REN
REN il 8 Mar 2011
since 1< = i, j <= n, P: n x n matrix, it has large size. Any other ways to do that?
What will you do with the large collection of transition probabilities after you create it?
REN
REN il 8 Mar 2011
to calculate P^(m)(is the transition matrix of another Graph G(2)) in smooth graph: in page 2-3 of this paper:
http://people.cs.uchicago.edu/~zhouxy/pakdd06.pdf

Accedi per commentare.

Jiro Doke
Jiro Doke il 8 Mar 2011

0 voti

Read through the links in Andreas's answer. And I agree with Andreas and Oleg about the question of "why you need such a big matrix", but a solution would be (assuming you definitely need what you are asking for) to get a 64-bit OS with a lot of RAM and 64-bit MATLAB.

1 Commento

mladen
mladen il 3 Gen 2014
I have got 64-bit Windows 7, 64-bit MATLAB R2013a and 16 GB of RAM. If that dose not cut it what does? This problem is really annoying, and prohibits me from doing my work with neural networks. I have looked everywhere I know of, and NOTHING. Up to this point I think the problem lies in the OS and the way it handles memory requests.

Accedi per commentare.

Md. Ali Hossain
Md. Ali Hossain il 15 Ago 2011

0 voti

yap I really need such a large array for my kernel PCA analysis. My array size is K(21025,21025), How can I solve it

1 Commento

If your task cannot be dealt with using sparse matrices, then as Jiro suggests, you need "a 64-bit OS with a lot of RAM and 64-bit MATLAB"

Accedi per commentare.

mladen
mladen il 10 Gen 2014

0 voti

I managed to solve the problem by installing 64-bit Windows 8.1 and 64-bit Matlab 2013b.

Categorie

Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange

Tag

Richiesto:

REN
il 8 Mar 2011

Risposto:

il 10 Gen 2014

Community Treasure Hunt

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

Start Hunting!

Translated by