LAPACK Archives

[Lapack] incorrect singular values in DGESDD ?

Dear Sir or Madam,
 
I am using Lapack for more than 10 years, but now I get quite confused by the
observation that I do not get correct singular values from DGESDD with the
JOBZ='O' option. This troubles me in particular since I was using this
subroutine quite a lot in previous programs, and they seemed to work. I should
say that I am using the OpenWatcom compiler on Windows, so I built my own
libraries for Lapack and BLAS, the latest versions were Lapack 3.1.1 and now
Lapack3.5.0. So I was suspecting that something is wrong with the Watcom
compiler. But now I used the ABsoft FORTRAN compiler which uses its own
built-in Lapack, with the same result. 
 
I attach a test program that shows the problem: A test matrix is set up which
is zero except for the diagonal, which has ascending numbers A(I,I) =
DFLOAT(I). So these should also be the singular values, and the singular
vectors are all of the form (0..0,1,0..0). I compare DGESDD with DGESVD. Input
is NROW= number of rows in A, NCOL=number of columns in A, JOBZ=either 'A' or
'O' (the quotes are needed in the input with the WATCOM compiler, but not with
the ABsoft compiler). I observe the following:
 
DGESVD gives the correct result for all NROW >= NCOL
DGESDD gives the same correct results only for JOBZ='A'
 
For JOBZ='O', however, all singular values produced by DGESDD are 1.00000
 
The same is observed with ABsoft FORTRAN and built in Lapack, and
Watcom-FORTRAN and my only build of Lapack and BLAS. So I would conclude that
the problem is not with the compilers, unless they do both the same wrong
thing. I disabled optimization in the WATCOM case.
 
I include the source and the two executables. I hope you see something that I
am doing wrong, because otherwise I am completely lost. I am particularly
interested in the 'O' option because in this case A and U can be physically the
same memory location.
 
with best regards,
Bernhard Dick
 
p.s.:  the executables were rejected by the mail server. If you would like to
have them I can send them encrypted.
 
Prof. Dr. Bernhard Dick
Institut f?r Physikalische und Theoretische Chemie
Universit?t Regensburg
D 93040 Regensburg
Tel.: +49 941 943 4487
Fax: +49 941 943 4488
www-dick.chemie.uni-regensburg.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20150912/dac04cc2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestSVD.for
Type: application/octet-stream
Size: 2329 bytes
Desc: not available
URL: 
<http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20150912/dac04cc2/TestSVD.obj>

<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] incorrect singular values in DGESDD ?, Bernhard Dick <=


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or