LAPACK Archives

[Lapack] dgesvd requires ldu>=1 when jobu='o'

Hi,

there seems to be an odd requirement in dgesvd. If JOBU = 'O' (overwrite A
with the left eigenvectors), then U is never referenced, but there is a
check in the code that checks for LDU>=1 and aborts if it's not (see code
excerpts below). Can anyone explain? Is this a bug?

Thanks!

--nico

DGESVD subroutine is in http://www.netlib.org/lapack/double/dgesvd.f
declared as:

      SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
     $                   WORK, LWORK, INFO )
*     ..
*     .. Scalar Arguments ..
      CHARACTER          JOBU, JOBVT
      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
*     ..
*     .. Array Arguments ..
      DOUBLE PRECISION   A( LDA, * ), S( * ), U( LDU, * ),
     $                   VT( LDVT, * ), WORK( * )

Description of the arguments says:

*  U       (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
*          (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
*          If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
*          if JOBU = 'S', U contains the first min(m,n) columns of U
*          (the left singular vectors, stored columnwise);
*          if JOBU = 'N' or 'O', U is not referenced.
*
*  LDU     (input) INTEGER
*          The leading dimension of the array U.  LDU >= 1; if
*          JOBU = 'S' or 'A', LDU >= M.

And there is a check later in the code:

      ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN
         INFO = -9
-- 
Nico Galoppo :: http://www.ngaloppo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.cs.utk.edu/private/lapack/attachments/20080315/14f14b99/attachment.html
 

<Prev in Thread] Current Thread [Next in Thread>


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