From: kamaraju on
I found a bug in la_dgesdd.f90 of lapack95 package available at
http://www.cs.utk.edu/~jerzy/lapack95/ . I tried reporting it to
jerzy.wasniewski(a)uni-c.dk (as instructed in the website). But the
message bounced back as undeliverable. Any one knows the maintainer of
LAPACK95 or if this package is maintained at all?
From: Tobias Burnus on
On 08/04/2010 01:33 PM, kamaraju wrote:
> I found a bug in la_dgesdd.f90 of lapack95 package available at
> http://www.cs.utk.edu/~jerzy/lapack95/ . I tried reporting it to
> jerzy.wasniewski(a)uni-c.dk (as instructed in the website). But the
> message bounced back as undeliverable. Any one knows the maintainer of
> LAPACK95 or if this package is maintained at all?

Probably no one. The website I know is http://netlib.org/lapack95/ and
seems to be slightly newer (talks about 3.0 instead of 2.0 as yours does
and November instead of May; Lapack 3.0 itself was released in May
2000). Maybe check the tarball from that page and the email address
given there.

Still, both pages are outdated and miss the changes of the Lapack 3.1
(2006) and 3.2 (2008) releases; the latest Lapack is the bug-fix release
3.2.2 of June 30, 2010. Cf. http://netlib.org/lapack/

Tobias
From: kamaraju on
On Aug 4, 8:53 am, Tobias Burnus <bur...(a)net-b.de> wrote:
> On 08/04/2010 01:33 PM, kamaraju wrote:
>
> > I found a bug in la_dgesdd.f90 of lapack95 package available at
> >http://www.cs.utk.edu/~jerzy/lapack95/. I tried reporting it to
> > jerzy.wasniew...(a)uni-c.dk (as instructed in the website). But the
> > message bounced back as undeliverable. Any one knows the maintainer of
> > LAPACK95 or if this package is maintained at all?
>
> Probably no one. The website I know ishttp://netlib.org/lapack95/and
> seems to be slightly newer (talks about 3.0 instead of 2.0 as yours does
> and November instead of May; Lapack 3.0 itself was released in May
> 2000). Maybe check the tarball from that page and the email address
> given there.
>
> Still, both pages are outdated and miss the changes of the Lapack 3.1
> (2006) and 3.2 (2008) releases; the latest Lapack is the bug-fix release
> 3.2.2 of June 30, 2010. Cf.http://netlib.org/lapack/
>
> Tobias

Thanks. The code that I am using is actually from lapack95 3.0. But
when I wanted to report the bug, I googled and ended up in the version
2.0 page. Anyway, I got a reply from "jw at imm dot dtu dot dk"
saying that he is busy at the moment but will look into it later.

thanks
raju
From: mecej4 on
kamaraju wrote:

> On Aug 4, 8:53 am, Tobias Burnus <bur...(a)net-b.de> wrote:
>> On 08/04/2010 01:33 PM, kamaraju wrote:
>>
>> > I found a bug in la_dgesdd.f90 of lapack95 package available at
>> >http://www.cs.utk.edu/~jerzy/lapack95/. I tried reporting it to
>> > jerzy.wasniew...(a)uni-c.dk (as instructed in the website). But the
>> > message bounced back as undeliverable. Any one knows the maintainer of
>> > LAPACK95 or if this package is maintained at all?
>>
>> Probably no one. The website I know ishttp://netlib.org/lapack95/and
>> seems to be slightly newer (talks about 3.0 instead of 2.0 as yours does
>> and November instead of May; Lapack 3.0 itself was released in May
>> 2000). Maybe check the tarball from that page and the email address
>> given there.
>>
>> Still, both pages are outdated and miss the changes of the Lapack 3.1
>> (2006) and 3.2 (2008) releases; the latest Lapack is the bug-fix release
>> 3.2.2 of June 30, 2010. Cf.http://netlib.org/lapack/
>>
>> Tobias
>
> Thanks. The code that I am using is actually from lapack95 3.0. But
> when I wanted to report the bug, I googled and ended up in the version
> 2.0 page. Anyway, I got a reply from "jw at imm dot dtu dot dk"
> saying that he is busy at the moment but will look into it later.
>
> thanks
> raju

What seems to be implied above is that the bug is in the Fortran 95
interface to dgesdd rather than in the Lapack 3.x routine DGESDD. Is that
the case?

Do you think that there is a corresponding error in la_sgesdd and la_gesdd?

Do you mind divulging the error that you found in C.L.F. ? Thanks.

-- mecej4
From: kamaraju on
> What seems to be implied above is that the bug is in the Fortran 95
> interface to dgesdd rather than in the Lapack 3.x routine DGESDD. Is that
> the case?
>
> Do you think that there is a corresponding error in la_sgesdd and la_gesdd?
>
> Do you mind divulging the error that you found in C.L.F. ? Thanks.

No, not at all. Consider the sample code

! The code needs the following routines from lapack95
! la_erinfo.f90, la_auxmod.f90,f77_lapack_double.f90,
f95_lapack_double.f90,
! la_dgesvd.f90, la_dgesdd.f90
!
! It works with gfortran-4.3. But gfortran-4.4 gives a segmentation
fault
! However, The problem is with the la_dgesdd.f90 routine assigning
wrong value
! to JOBZ variable around line 202. It assigns JOBZ='A' where as in
this case,
! it should have assigned JOBZ='S'.
!
! gfortran-4.4 -g la_erinfo.f90 la_auxmod.f90 f77_lapack_double.f90
f95_lapack_double.f90 la_dgesvd.f90 la_dgesdd.f90 dummy.f90 /usr/lib/
liblapack.so.3gf
! gfortran-4.3 -g la_erinfo.f90 la_auxmod.f90 f77_lapack_double.f90
f95_lapack_double.f90 la_dgesvd.f90 la_dgesdd.f90 dummy.f90 /usr/lib/
liblapack.so.3gf
program dummy

use f95_lapack, only : LA_GETRF, LA_GESDD, LA_GESVD
implicit none

! This works with both gfortran-4.3, gfortran-4.4
! real (kind=8) :: lhs(20,10), U(20,10), S(10), VT(10,10)
!
! This gives a segmentation fault with la_gesdd but not with
la_gesvd. The
! segmentation fault occurs only with gfortran-4.4. But the bug is
in
! la_dgesdd.f90
real (kind=8) :: lhs(21,10), U(21,10), S(10), VT(10,10)

call random_number(lhs)
call random_number(U)
call random_number(S)
call random_number(VT)
write(*,*) 'calling la_gesvd'
call LA_GESVD( lhs, S, U, VT)
write(*,*) 'calling la_gesdd'
call LA_GESDD( lhs, S, U, VT)
end program dummy

$gfortran-4.4 -g la_erinfo.f90 la_auxmod.f90 f77_lapack_double.f90
f95_lapack_double.f90 la_dgesvd.f90 la_dgesdd.f90 dummy.f90
/usr/lib/liblapack.so.3gf

When executed it gives a segmentation fault

$./a.out
calling la_gesvd
calling la_gesdd
Segmentation fault (core dumped)

The problem is like this. When la_dgesdd.f90 function is called with a
rectangular matrix A(M, N) where M>N, U(M,N) is supplied as the
argument, the idea is to compute only the min(m,n) columns of U.
However the code does not check for this case (the changes should be
made around line 202). At least for my sample code, the JOBZ variable
should have been set to 'S' . But la_dgesdd.f90 sets it to 'A'.

Please note that the segmentation fault occurs only with the latest
versions of gfortran (gfortran >= 4.4). However the problem is in the
logic of la_dgesdd.f90.

If you need any other information, please let me know.


BTW, how do you attach files when posting via google groups?

thanks
raju