help-octave
[Top][All Lists]
Advanced

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

Re: What limits the largest size of matrix?


From: Michael Creel
Subject: Re: What limits the largest size of matrix?
Date: Fri, 5 Oct 2007 09:37:45 +0200



On 10/4/07, David Bateman <address@hidden> wrote:
Michael Creel wrote:
> I'm using two different machines, both of which run  Ubuntu AMD64. Using
> the command a = rand(b,b), I find that I can set b=17000 on a machine
> that has 2GB of RAM. It goes into swap, but it works. That machine has
> Octave 2.9.12 installed, and the CPU is AMD Turion dual core. On another
> machine that has 8GB RAM and plenty of swap space, I get the message
> "memory exhausted or requested size too large for range of Octave's
> index type". That machine has 2.9.14 installed, and the CPUs are two
> Xeons, a couple of years old. I believe that the compile options I used
> for Octave were --enable-shared --disable-static on both machines. I
> don't understand why the machine with more RAM is reluctant to create
> the matrix.
> Thanks, MIchael

Octave uses "int" for indexing, unless --enable-64  is used. You can
address 2GB of memory with the int type as only 31 bits are available.
Now a basic operation like a(i,j) in Array.h becomes data[i + nc*j] and
so its the product of the dimensions that count. Now the real type uses
8 bytes per value. and log2(17000.^2 * 8) = 31.106, and so therefore yes
it does exceed the addressable size of a matrix and 2.9.14 detects it
correctly. Probably the issue is in 2.9.12 rather than 2.9.14

D.


Thanks to everyone who responded. OK, that make sense. I'm a bit surprised that 2.9.12 lets this go by without comment. How can that be? I checked octave_config_info on both versions, and I see  USE_64_BIT_IDX_T = false, which I guess confirms my quite clear memory that I didn't use the --enable-64 option. At one point in the past I tried to use --enable-64, but got poor results. If this is expected to work well with 2.9.14, I'd be happy to try it again.
Michael


reply via email to

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