[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading a 318 MB matrix into Octave 32 bit
From: |
c. |
Subject: |
Re: Loading a 318 MB matrix into Octave 32 bit |
Date: |
Mon, 29 Jul 2013 08:43:32 +0200 |
On 29 Jul 2013, at 02:21, Elliot Gorokhovsky <address@hidden> wrote:
> I am running 32 bit octave on a 64 bit system (I would really like to keep it
> that way if possible) and I have a .mat with a double matrix size 5492743 by
> 3. Octave says it takes 131,825,832 bytes. When I run the following script
> (with num=140000) I get, immediately[, error: memory exhausted or requested
> size too large for range of Octave's index type -- trying to return to prompt.
>
> data = [data,zeros(length(data),num*3)];
> for i = 1:length(data)-num
> data(i,:)=[data(i,1:3),vec(data((i+1):(i+num),1:3)')'];
> disp(i)
> end
> data = data(1:length(data)-num,:);
>
> Can I fix this without recompiling? If I have to recompile, how do I do it?
>
> Thanks,
> Elliot Gorokhovsky
Hi,
This sounds strange to me, your matrix size seems to be below
the limit that can be indexed with 32 bit integers
which, if I am not mistaken, is
2^32 / 2 = 2.1475e+09 > 131,825,832
indeed whith my version of Octave (3.7.5 compiled without support for 64 bit
indexing)
I can save and load a matrix that size with no problem:
>> a = randn (5492743, 3);
>> save -binary -z pippo.octbin.gz a
>> clear all
>> load pippo.octbin.gz
>> whos a
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a 5492743x3 131825832 double
Total is 16478229 elements using 131825832 bytes
>> ls -lh pippo.octbin.gz
-rw-r--r-- 1 carlo wheel 121M 29 Jul 08:38 pippo.octbin.gz
so I wonder where your problem comes from. How did you install your version of
Octave?
c.