help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: requested size too large for range of Octave's index type


From: Martin Helm
Subject: Re: requested size too large for range of Octave's index type
Date: Mon, 16 Aug 2010 05:35:13 +0200
User-agent: KMail/1.13.5 (Linux/2.6.31.12-0.2-desktop; KDE/4.4.4; x86_64; ; )

Am Montag, 16. August 2010, 05:19:30 schrieb Tim Rueth:
> I am running a simulation that uses a 6-dimensional ndgrid.  The total
> number of elements in this matrix is 3,670,016.  Some of the elements are
> integers, and some are floats, but I don't actually specify whether they're
> integer or float other than saying 10, or 10.0, for example, when putting
> numbers in them.  When I try to run this simulation, I get the following
> error:
> 
> "error: memory exhausted or requested size too large for range of Octave's
> index type -- trying to return to prompt"
> 
> I'm running Vista with 4GB of RAM.  Can someone tell me what the "range of
> Octave's index type" is?  Should I be type-casting these elements somehow
> so I don't waste memory?  Even for the floats, I never need more than 1
> decimal place of accuracy.
> 
> Thanks,
> 
> --Tim

The size of a double is 8 bytes so given your number of elements there should 
not be any problem (less than 30 MB), the 32 bit build of octave can (provided 
enough ram) handle 2e9 elements (which is 16 GB of RAM even for 32 bit).

So I guess something else is wrong in what you try to do.
Can you post the part of the code which allocates this array?

Btw: 10 is always a double if you use a . or not.

- mh


reply via email to

[Prev in Thread] Current Thread [Next in Thread]