help-octave
[Top][All Lists]
Advanced

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

Re: sizemax() and 64-bit systems


From: Mike Miller
Subject: Re: sizemax() and 64-bit systems
Date: Mon, 13 Aug 2012 10:40:21 -0500 (CDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Mon, 13 Aug 2012, Martin Helm wrote:

Am 13.08.2012 07:59, schrieb Mike Miller:
Is there another way to get the sizemax() functionality?  I'm trying
to find out for these machines what is the largest number of elements
per matrix.  Is there a way to figure it out from octave_config_info?

Just look for USE_64_BIT_IDX_T in octave_config_info, if that is set to false the limit will be roughly 2e9 (a bit less than 2^31).

Thanks. That is "false" on all of my machines. Here's a command for Linux users that will show this info (from the shell command line):

echo "octave_config_info" | octave -qfH | grep IDX
  USE_64_BIT_IDX_T = false

Now for the next big question -- what is the trick to compiling Octave so that it will allow more elements per matrix?

By the way, I'm having the same problem with R. It is hard-coded to limit the number of elements to INT_MAX, which is 2^31-1, but why aren't we using uint_max instead?

grep INT_MAX /usr/include/limits.h
#  define INT_MIN       (-INT_MAX - 1)
#  define INT_MAX       2147483647
#  define UINT_MAX      4294967295U

It just seems like indexing would be done with uint instead of with int because element indexes are always positive integers, aren't they? I think maybe the problem is in FORTRAN.

It sounds like changing to 64-bit indexing is a big deal for R, but it also sounds like Octave has it down to a compile-time option. Oh, just hit the jackpot:

http://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html

Now I know what needs to be done. It is doable, much more so in Octave than in R, but it is also a lot more work than just compiling Octave better because all the numerical libraries need to be compiled for 64-bit.

This leads to yet another question -- are these libraries already compiled for 64-bit in any Linux repositories? Is there a way to test whether mine are already 64-bit?

Thanks again, very much, for the excellent information.

Mike

--
Michael B. Miller, Ph.D.
Minnesota Center for Twin and Family Research
Department of Psychology
University of Minnesota


reply via email to

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