[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: |
Jaroslav Hajek |
Subject: |
Re: requested size too large for range of Octave's index type |
Date: |
Mon, 16 Aug 2010 08:14:06 +0200 |
On Mon, Aug 16, 2010 at 5:35 AM, Martin Helm <address@hidden> wrote:
> 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).
>
This was only fixed in 3.3.50+. Previously, Octave's arrays were
limited to 2GB memory, regardless of the class. Maybe simply upgrading
would help.
> 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?
>
That would be a good idea anyway.
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz