bug related to --enable-64 and singular matrix division

Jaroslav Hajek highegg at gmail.com
Tue May 5 06:36:27 CDT 2009


On Tue, May 5, 2009 at 12:56 PM, Alois Schlögl <alois.schloegl at tugraz.at> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> When I compile the latest octave sources with --enable-64
> I see the following problem:
>
>
> octave:2> p    = 4;
> octave:3> tmp1 = repmat(nan,p)/repmat(nan,p);
> warning: matrix singular to machine precision, rcond = 0
> warning: attempting to find minimum norm solution
> error: memory exhausted or requested size too large for range of
> Octave's index type -- trying to return to prompt
> octave:3> tmp2 = repmat(nan,p)\repmat(nan,p);
> warning: matrix singular to machine precision, rcond = 0
> warning: attempting to find minimum norm solution
> error: memory exhausted or requested size too large for range of
> Octave's index type -- trying to return to prompt
> octave:3> tmp3 = repmat(0,p)/repmat(0,p);
> warning: matrix singular to machine precision, rcond = 0
> warning: attempting to find minimum norm solution
> error: memory exhausted or requested size too large for range of
> Octave's index type -- trying to return to prompt
> octave:3> tmp4 = repmat(0,p)\repmat(0,p);
> warning: matrix singular to machine precision, rcond = 0
> warning: attempting to find minimum norm solution
> error: memory exhausted or requested size too large for range of
> Octave's index type -- trying to return to prompt
>
>
> When these lines are executed within the startup script, octave fails to
> start with this error message:
>
> ...
> warning: division by zero
> warning: division by zero
> warning: division by zero
> warning: division by zero
> warning: matrix singular to machine precision, rcond = 0
> warning: attempting to find minimum norm solution
> terminate called after throwing an instance of 'std::bad_alloc'
>  what():  std::bad_alloc
> panic: Aborted -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Aborted
>
>
>
> The problem does not appear, when Octave is compiled without  --enable-64
>
>
>
> Alois
>

Currently, interaction with Fortran libraries (BLAS/LAPACK in
particular) throughout Octave assumes that octave_idx_type matches
Fortran's default INTEGER. Usually the default for Fortran is 32 bits,
however, even on 64bit systems, and likewise for system BLAS/LAPACK
libs, which seems likely to be the cause of your problem.
So you need to get a 64-bit BLAS/LAPACK (which may not be easy) and
specify -fdefault-integer-8 in FFLAGS. Maybe configure could check the
condition; it is a requirement after all.

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Bug-octave mailing list