octave-maintainers
[Top][All Lists]
Advanced

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

Re: moving toward a 3.0 release


From: David Bateman
Subject: Re: moving toward a 3.0 release
Date: Thu, 28 Sep 2006 23:45:48 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

John,

I'll have difficulties duplicating this work as my 4.0.1 gfortran gives
an error

"Fortran runtime error: Array reference out of bounds"

which no indication of the variable involved or the variable name.
Frankly quite useless. What version of gfortran are you using?

However, I'll try to address a couple of points in this message.

John W. Eaton wrote:
>
> OK.  I did some debugging, but I don't see the fix yet.  If I compile
> ARPACK with -fbounds-check, I sometimes but unfortunately not always
> see this error:
> 
>   Fortran runtime error: Array reference out of bounds for array 'v', upper 
> bound of dimension 2 exceeded (in file 'SRC/dnaitr.f', at line 449)
> 
> That line is:
> 
>   call dcopy (n, resid, 1, v(1,j), 1)
> 
> with v declared as
> 
>   double precision v(ldv,k+np)

Ok. it seems that K is either the number of eigenvalues to calculate or
zero. So in this case it is 4 or 0. As for NP, it is defined as the
number of shifts during the Arnoldi iteration and is supposed to be
bounded by 0 < NP < NCV - NEV. NCV is the number of Lanzcos vectors, and
the matrix V is dimensioned as you pointed out as "v(ldv,ncv)" so there
should be no issue. It seems that J above is exceeding not only NCV-NEV,
but equally k+np (which can be smaller). The only place I can see that j
is alter other than the initialization step is in the block

c        %------------------------------------%
c        | STEP 6: Update  j = j+1;  Continue |
c        %------------------------------------%
c
         j = j + 1
         if (j .gt. k+np) then

which is immediately followed by the test that it doesn't exceed k+np.
So I therefore don't understand

> 
> I inserted a print statement above the call to dcopy and found that
> the error happens when k+np is 19 and j is 20.

how this can happen.. The variable j is saved with the F77 format
statement, but it isn't exposed to other function through a common block
or input/output argument, so the only place where j can be altered is in
dnaitr or one of its sub-functions. The lapack/blas functions called
seem to be used correctly, so I'll exclude them as possible candidates.
The arpack functions like dmout aren't even called as there is no
debugging messages printed. The function second never references j and
checking dvget0 it is marked as an input and I've check, it never alters j.

Are we perhaps debugging a gfortran problem rather than an arpack
problem? I'll try installing g77 and see, but can't easily do that till
tomorrow..

Cheers
David


reply via email to

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