LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dsyevr()

subroutine dsyevr ( character jobz,
character range,
character uplo,
integer n,
double precision, dimension( lda, * ) a,
integer lda,
double precision vl,
double precision vu,
integer il,
integer iu,
double precision abstol,
integer m,
double precision, dimension( * ) w,
double precision, dimension( ldz, * ) z,
integer ldz,
integer, dimension( * ) isuppz,
double precision, dimension( * ) work,
integer lwork,
integer, dimension( * ) iwork,
integer liwork,
integer info )

DSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices

Download DSYEVR + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> DSYEVR computes selected eigenvalues and, optionally, eigenvectors
!> of a real symmetric matrix A. Eigenvalues and eigenvectors can be
!> selected by specifying either a range of values or a range of indices
!> for the desired eigenvalues. Invocations with different choices for
!> these parameters may result in the computation of slightly different
!> eigenvalues and/or eigenvectors for the same matrix. The reason for
!> this behavior is that there exists a variety of algorithms (each
!> performing best for a particular set of options) with DSYEVR
!> attempting to select the best based on the various parameters. In all
!> cases, the computed values are accurate within the limits of finite
!> precision arithmetic.
!>
!> DSYEVR first reduces the matrix A to tridiagonal form T with a call
!> to DSYTRD.  Then, whenever possible, DSYEVR calls DSTEMR to compute
!> the eigenspectrum using Relatively Robust Representations.  DSTEMR
!> computes eigenvalues by the dqds algorithm, while orthogonal
!> eigenvectors are computed from various  L D L^T representations
!> (also known as Relatively Robust Representations). Gram-Schmidt
!> orthogonalization is avoided as far as possible. More specifically,
!> the various steps of the algorithm are as follows.
!>
!> For each unreduced block (submatrix) of T,
!>    (a) Compute T - sigma I  = L D L^T, so that L and D
!>        define all the wanted eigenvalues to high relative accuracy.
!>        This means that small relative changes in the entries of D and L
!>        cause only small relative changes in the eigenvalues and
!>        eigenvectors. The standard (unfactored) representation of the
!>        tridiagonal matrix T does not have this property in general.
!>    (b) Compute the eigenvalues to suitable accuracy.
!>        If the eigenvectors are desired, the algorithm attains full
!>        accuracy of the computed eigenvalues only right before
!>        the corresponding vectors have to be computed, see steps c) and d).
!>    (c) For each cluster of close eigenvalues, select a new
!>        shift close to the cluster, find a new factorization, and refine
!>        the shifted eigenvalues to suitable accuracy.
!>    (d) For each eigenvalue with a large enough relative separation compute
!>        the corresponding eigenvector by forming a rank revealing twisted
!>        factorization. Go back to (c) for any clusters that remain.
!>
!> The desired accuracy of the output can be specified by the input
!> parameter ABSTOL.
!>
!> For more details, see DSTEMR's documentation and:
!> - Inderjit S. Dhillon and Beresford N. Parlett: 
!>   Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
!> - Inderjit Dhillon and Beresford Parlett:  SIAM Journal on Matrix Analysis and Applications, Vol. 25,
!>   2004.  Also LAPACK Working Note 154.
!> - Inderjit Dhillon: ,
!>   Computer Science Division Technical Report No. UCB/CSD-97-971,
!>   UC Berkeley, May 1997.
!>
!>
!> Note 1 : DSYEVR calls DSTEMR when the full spectrum is requested
!> on machines which conform to the ieee-754 floating point standard.
!> DSYEVR calls DSTEBZ and DSTEIN on non-ieee machines and
!> when partial spectrum requests are made.
!>
!> Normal execution of DSTEMR may create NaNs and infinities and
!> hence may abort due to a floating point exception in environments
!> which do not handle NaNs and infinities in the ieee standard default
!> manner.
!> 
Parameters
[in]JOBZ
!>          JOBZ is CHARACTER*1
!>          = 'N':  Compute eigenvalues only;
!>          = 'V':  Compute eigenvalues and eigenvectors.
!>
!>          This parameter influences the choice of the algorithm and
!>          may alter the computed values.
!> 
[in]RANGE
!>          RANGE is CHARACTER*1
!>          = 'A': all eigenvalues will be found.
!>          = 'V': all eigenvalues in the half-open interval (VL,VU]
!>                 will be found.
!>          = 'I': the IL-th through IU-th eigenvalues will be found.
!>          For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
!>          DSTEIN are called
!>
!>          This parameter influences the choice of the algorithm and
!>          may alter the computed values.
!> 
[in]UPLO
!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!> 
[in]N
!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!> 
[in,out]A
!>          A is DOUBLE PRECISION array, dimension (LDA, N)
!>          On entry, the symmetric matrix A.  If UPLO = 'U', the
!>          leading N-by-N upper triangular part of A contains the
!>          upper triangular part of the matrix A.  If UPLO = 'L',
!>          the leading N-by-N lower triangular part of A contains
!>          the lower triangular part of the matrix A.
!>          On exit, the lower triangle (if UPLO='L') or the upper
!>          triangle (if UPLO='U') of A, including the diagonal, is
!>          destroyed.
!> 
[in]LDA
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!> 
[in]VL
!>          VL is DOUBLE PRECISION
!>          If RANGE='V', the lower bound of the interval to
!>          be searched for eigenvalues. VL < VU.
!>          Not referenced if RANGE = 'A' or 'I'.
!> 
[in]VU
!>          VU is DOUBLE PRECISION
!>          If RANGE='V', the upper bound of the interval to
!>          be searched for eigenvalues. VL < VU.
!>          Not referenced if RANGE = 'A' or 'I'.
!> 
[in]IL
!>          IL is INTEGER
!>          If RANGE='I', the index of the
!>          smallest eigenvalue to be returned.
!>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
!>          Not referenced if RANGE = 'A' or 'V'.
!> 
[in]IU
!>          IU is INTEGER
!>          If RANGE='I', the index of the
!>          largest eigenvalue to be returned.
!>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
!>          Not referenced if RANGE = 'A' or 'V'.
!> 
[in]ABSTOL
!>          ABSTOL is DOUBLE PRECISION
!>          The absolute error tolerance for the eigenvalues.
!>          An approximate eigenvalue is accepted as converged
!>          when it is determined to lie in an interval [a,b]
!>          of width less than or equal to
!>
!>                  ABSTOL + EPS *   max( |a|,|b| ) ,
!>
!>          where EPS is the machine precision.  If ABSTOL is less than
!>          or equal to zero, then  EPS*|T|  will be used in its place,
!>          where |T| is the 1-norm of the tridiagonal matrix obtained
!>          by reducing A to tridiagonal form.
!>
!>          See  by Demmel and
!>          Kahan, LAPACK Working Note #3.
!>
!>          If high relative accuracy is important, set ABSTOL to
!>          DLAMCH( 'Safe minimum' ).  Doing so will guarantee that
!>          eigenvalues are computed to high relative accuracy when
!>          possible in future releases.  The current code does not
!>          make any guarantees about high relative accuracy, but
!>          future releases will. See J. Barlow and J. Demmel,
!>          , LAPACK Working Note #7, for a discussion
!>          of which matrices define their eigenvalues to high relative
!>          accuracy.
!> 
[out]M
!>          M is INTEGER
!>          The total number of eigenvalues found.  0 <= M <= N.
!>          If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
!> 
[out]W
!>          W is DOUBLE PRECISION array, dimension (N)
!>          The first M elements contain the selected eigenvalues in
!>          ascending order.
!> 
[out]Z
!>          Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
!>          If JOBZ = 'V', then if INFO = 0, the first M columns of Z
!>          contain the orthonormal eigenvectors of the matrix A
!>          corresponding to the selected eigenvalues, with the i-th
!>          column of Z holding the eigenvector associated with W(i).
!>          If JOBZ = 'N', then Z is not referenced.
!>          Note: the user must ensure that at least max(1,M) columns are
!>          supplied in the array Z; if RANGE = 'V', the exact value of M
!>          is not known in advance and an upper bound must be used.
!>          Supplying N columns is always safe.
!> 
[in]LDZ
!>          LDZ is INTEGER
!>          The leading dimension of the array Z.  LDZ >= 1, and if
!>          JOBZ = 'V', LDZ >= max(1,N).
!> 
[out]ISUPPZ
!>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
!>          The support of the eigenvectors in Z, i.e., the indices
!>          indicating the nonzero elements in Z. The i-th eigenvector
!>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
!>          ISUPPZ( 2*i ). This is an output of DSTEMR (tridiagonal
!>          matrix). The support of the eigenvectors of A is typically
!>          1:N because of the orthogonal transformations applied by DORMTR.
!>          Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
!> 
[out]WORK
!>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
!>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
!> 
[in]LWORK
!>          LWORK is INTEGER
!>          The dimension of the array WORK.
!>          If N <= 1, LWORK >= 1, else LWORK >= 26*N.
!>          For optimal efficiency, LWORK >= (NB+6)*N,
!>          where NB is the max of the blocksize for DSYTRD and DORMTR
!>          returned by ILAENV.
!>
!>          If LWORK = -1, then a workspace query is assumed; the routine
!>          only calculates the optimal size of the WORK array, returns
!>          this value as the first entry of the WORK array, and no error
!>          message related to LWORK is issued by XERBLA.
!> 
[out]IWORK
!>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
!>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
!> 
[in]LIWORK
!>          LIWORK is INTEGER
!>          The dimension of the array IWORK.
!>          If N <= 1, LIWORK >= 1, else LIWORK >= 10*N.
!>
!>          If LIWORK = -1, then a workspace query is assumed; the
!>          routine only calculates the optimal size of the IWORK array,
!>          returns this value as the first entry of the IWORK array, and
!>          no error message related to LIWORK is issued by XERBLA.
!> 
[out]INFO
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  Internal error
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Inderjit Dhillon, IBM Almaden, USA
Osni Marques, LBNL/NERSC, USA
Ken Stanley, Computer Science Division, University of California at Berkeley, USA
Jason Riedy, Computer Science Division, University of California at Berkeley, USA

Definition at line 344 of file dsyevr.f.

348*
349* -- LAPACK driver routine --
350* -- LAPACK is a software package provided by Univ. of Tennessee, --
351* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
352*
353* .. Scalar Arguments ..
354 CHARACTER JOBZ, RANGE, UPLO
355 INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LWORK, M, N
356 DOUBLE PRECISION ABSTOL, VL, VU
357* ..
358* .. Array Arguments ..
359 INTEGER ISUPPZ( * ), IWORK( * )
360 DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
361* ..
362*
363* =====================================================================
364*
365* .. Parameters ..
366 DOUBLE PRECISION ZERO, ONE, TWO
367 parameter( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
368* ..
369* .. Local Scalars ..
370 LOGICAL ALLEIG, INDEIG, LOWER, LQUERY, VALEIG, WANTZ,
371 $ TRYRAC
372 CHARACTER ORDER
373 INTEGER I, IEEEOK, IINFO, IMAX, INDD, INDDD, INDE,
374 $ INDEE, INDIBL, INDIFL, INDISP, INDIWO, INDTAU,
375 $ INDWK, INDWKN, ISCALE, J, JJ, LIWMIN,
376 $ LLWORK, LLWRKN, LWKOPT, LWMIN, NB, NSPLIT
377 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
378 $ SIGMA, SMLNUM, TMP1, VLL, VUU
379* ..
380* .. External Functions ..
381 LOGICAL LSAME
382 INTEGER ILAENV
383 DOUBLE PRECISION DLAMCH, DLANSY
384 EXTERNAL lsame, ilaenv, dlamch, dlansy
385* ..
386* .. External Subroutines ..
387 EXTERNAL dcopy, dormtr, dscal, dstebz, dstemr,
388 $ dstein,
390* ..
391* .. Intrinsic Functions ..
392 INTRINSIC max, min, sqrt
393* ..
394* .. Executable Statements ..
395*
396* Test the input parameters.
397*
398 ieeeok = ilaenv( 10, 'DSYEVR', 'N', 1, 2, 3, 4 )
399*
400 lower = lsame( uplo, 'L' )
401 wantz = lsame( jobz, 'V' )
402 alleig = lsame( range, 'A' )
403 valeig = lsame( range, 'V' )
404 indeig = lsame( range, 'I' )
405*
406 lquery = ( ( lwork.EQ.-1 ) .OR. ( liwork.EQ.-1 ) )
407*
408 IF( n.LE.1 ) THEN
409 lwmin = 1
410 liwmin = 1
411 ELSE
412 lwmin = 26*n
413 liwmin = 10*n
414 END IF
415*
416 info = 0
417 IF( .NOT.( wantz .OR. lsame( jobz, 'N' ) ) ) THEN
418 info = -1
419 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) ) THEN
420 info = -2
421 ELSE IF( .NOT.( lower .OR. lsame( uplo, 'U' ) ) ) THEN
422 info = -3
423 ELSE IF( n.LT.0 ) THEN
424 info = -4
425 ELSE IF( lda.LT.max( 1, n ) ) THEN
426 info = -6
427 ELSE
428 IF( valeig ) THEN
429 IF( n.GT.0 .AND. vu.LE.vl )
430 $ info = -8
431 ELSE IF( indeig ) THEN
432 IF( il.LT.1 .OR. il.GT.max( 1, n ) ) THEN
433 info = -9
434 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n ) THEN
435 info = -10
436 END IF
437 END IF
438 END IF
439 IF( info.EQ.0 ) THEN
440 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) ) THEN
441 info = -15
442 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery ) THEN
443 info = -18
444 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery ) THEN
445 info = -20
446 END IF
447 END IF
448*
449 IF( info.EQ.0 ) THEN
450 nb = ilaenv( 1, 'DSYTRD', uplo, n, -1, -1, -1 )
451 nb = max( nb, ilaenv( 1, 'DORMTR', uplo, n, -1, -1, -1 ) )
452 lwkopt = max( ( nb+1 )*n, lwmin )
453 work( 1 ) = lwkopt
454 iwork( 1 ) = liwmin
455 END IF
456*
457 IF( info.NE.0 ) THEN
458 CALL xerbla( 'DSYEVR', -info )
459 RETURN
460 ELSE IF( lquery ) THEN
461 RETURN
462 END IF
463*
464* Quick return if possible
465*
466 m = 0
467 IF( n.EQ.0 ) THEN
468 work( 1 ) = 1
469 RETURN
470 END IF
471*
472 IF( n.EQ.1 ) THEN
473 work( 1 ) = 1
474 IF( alleig .OR. indeig ) THEN
475 m = 1
476 w( 1 ) = a( 1, 1 )
477 ELSE
478 IF( vl.LT.a( 1, 1 ) .AND. vu.GE.a( 1, 1 ) ) THEN
479 m = 1
480 w( 1 ) = a( 1, 1 )
481 END IF
482 END IF
483 IF( wantz ) THEN
484 z( 1, 1 ) = one
485 isuppz( 1 ) = 1
486 isuppz( 2 ) = 1
487 END IF
488 RETURN
489 END IF
490*
491* Get machine constants.
492*
493 safmin = dlamch( 'Safe minimum' )
494 eps = dlamch( 'Precision' )
495 smlnum = safmin / eps
496 bignum = one / smlnum
497 rmin = sqrt( smlnum )
498 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
499*
500* Scale matrix to allowable range, if necessary.
501*
502 iscale = 0
503 abstll = abstol
504 IF (valeig) THEN
505 vll = vl
506 vuu = vu
507 END IF
508 anrm = dlansy( 'M', uplo, n, a, lda, work )
509 IF( anrm.GT.zero .AND. anrm.LT.rmin ) THEN
510 iscale = 1
511 sigma = rmin / anrm
512 ELSE IF( anrm.GT.rmax ) THEN
513 iscale = 1
514 sigma = rmax / anrm
515 END IF
516 IF( iscale.EQ.1 ) THEN
517 IF( lower ) THEN
518 DO 10 j = 1, n
519 CALL dscal( n-j+1, sigma, a( j, j ), 1 )
520 10 CONTINUE
521 ELSE
522 DO 20 j = 1, n
523 CALL dscal( j, sigma, a( 1, j ), 1 )
524 20 CONTINUE
525 END IF
526 IF( abstol.GT.0 )
527 $ abstll = abstol*sigma
528 IF( valeig ) THEN
529 vll = vl*sigma
530 vuu = vu*sigma
531 END IF
532 END IF
533
534* Initialize indices into workspaces. Note: The IWORK indices are
535* used only if DSTERF or DSTEMR fail.
536
537* WORK(INDTAU:INDTAU+N-1) stores the scalar factors of the
538* elementary reflectors used in DSYTRD.
539 indtau = 1
540* WORK(INDD:INDD+N-1) stores the tridiagonal's diagonal entries.
541 indd = indtau + n
542* WORK(INDE:INDE+N-1) stores the off-diagonal entries of the
543* tridiagonal matrix from DSYTRD.
544 inde = indd + n
545* WORK(INDDD:INDDD+N-1) is a copy of the diagonal entries over
546* -written by DSTEMR (the DSTERF path copies the diagonal to W).
547 inddd = inde + n
548* WORK(INDEE:INDEE+N-1) is a copy of the off-diagonal entries over
549* -written while computing the eigenvalues in DSTERF and DSTEMR.
550 indee = inddd + n
551* INDWK is the starting offset of the left-over workspace, and
552* LLWORK is the remaining workspace size.
553 indwk = indee + n
554 llwork = lwork - indwk + 1
555
556* IWORK(INDIBL:INDIBL+M-1) corresponds to IBLOCK in DSTEBZ and
557* stores the block indices of each of the M<=N eigenvalues.
558 indibl = 1
559* IWORK(INDISP:INDISP+NSPLIT-1) corresponds to ISPLIT in DSTEBZ and
560* stores the starting and finishing indices of each block.
561 indisp = indibl + n
562* IWORK(INDIFL:INDIFL+N-1) stores the indices of eigenvectors
563* that corresponding to eigenvectors that fail to converge in
564* DSTEIN. This information is discarded; if any fail, the driver
565* returns INFO > 0.
566 indifl = indisp + n
567* INDIWO is the offset of the remaining integer workspace.
568 indiwo = indifl + n
569
570*
571* Call DSYTRD to reduce symmetric matrix to tridiagonal form.
572*
573 CALL dsytrd( uplo, n, a, lda, work( indd ), work( inde ),
574 $ work( indtau ), work( indwk ), llwork, iinfo )
575*
576* If all eigenvalues are desired
577* then call DSTERF or DSTEMR and DORMTR.
578*
579 IF( ( alleig .OR. ( indeig .AND. il.EQ.1 .AND. iu.EQ.n ) ) .AND.
580 $ ieeeok.EQ.1 ) THEN
581 IF( .NOT.wantz ) THEN
582 CALL dcopy( n, work( indd ), 1, w, 1 )
583 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
584 CALL dsterf( n, w, work( indee ), info )
585 ELSE
586 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
587 CALL dcopy( n, work( indd ), 1, work( inddd ), 1 )
588*
589 IF (abstol .LE. two*n*eps) THEN
590 tryrac = .true.
591 ELSE
592 tryrac = .false.
593 END IF
594 CALL dstemr( jobz, 'A', n, work( inddd ), work( indee ),
595 $ vl, vu, il, iu, m, w, z, ldz, n, isuppz,
596 $ tryrac, work( indwk ), lwork, iwork, liwork,
597 $ info )
598*
599*
600*
601* Apply orthogonal matrix used in reduction to tridiagonal
602* form to eigenvectors returned by DSTEMR.
603*
604 IF( wantz .AND. info.EQ.0 ) THEN
605 indwkn = inde
606 llwrkn = lwork - indwkn + 1
607 CALL dormtr( 'L', uplo, 'N', n, m, a, lda,
608 $ work( indtau ), z, ldz, work( indwkn ),
609 $ llwrkn, iinfo )
610 END IF
611 END IF
612*
613*
614 IF( info.EQ.0 ) THEN
615* Everything worked. Skip DSTEBZ/DSTEIN. IWORK(:) are
616* undefined.
617 m = n
618 GO TO 30
619 END IF
620 info = 0
621 END IF
622*
623* Otherwise, call DSTEBZ and, if eigenvectors are desired, DSTEIN.
624* Also call DSTEBZ and DSTEIN if DSTEMR fails.
625*
626 IF( wantz ) THEN
627 order = 'B'
628 ELSE
629 order = 'E'
630 END IF
631
632 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
633 $ work( indd ), work( inde ), m, nsplit, w,
634 $ iwork( indibl ), iwork( indisp ), work( indwk ),
635 $ iwork( indiwo ), info )
636*
637 IF( wantz ) THEN
638 CALL dstein( n, work( indd ), work( inde ), m, w,
639 $ iwork( indibl ), iwork( indisp ), z, ldz,
640 $ work( indwk ), iwork( indiwo ), iwork( indifl ),
641 $ info )
642*
643* Apply orthogonal matrix used in reduction to tridiagonal
644* form to eigenvectors returned by DSTEIN.
645*
646 indwkn = inde
647 llwrkn = lwork - indwkn + 1
648 CALL dormtr( 'L', uplo, 'N', n, m, a, lda, work( indtau ),
649 $ z,
650 $ ldz, work( indwkn ), llwrkn, iinfo )
651 END IF
652*
653* If matrix was scaled, then rescale eigenvalues appropriately.
654*
655* Jump here if DSTEMR/DSTEIN succeeded.
656 30 CONTINUE
657 IF( iscale.EQ.1 ) THEN
658 IF( info.EQ.0 ) THEN
659 imax = m
660 ELSE
661 imax = info - 1
662 END IF
663 CALL dscal( imax, one / sigma, w, 1 )
664 END IF
665*
666* If eigenvalues are not in order, then sort them, along with
667* eigenvectors. Note: We do not sort the IFAIL portion of IWORK.
668* It may not be initialized (if DSTEMR/DSTEIN succeeded), and we do
669* not return this detailed information to the user.
670*
671 IF( wantz ) THEN
672 DO 50 j = 1, m - 1
673 i = 0
674 tmp1 = w( j )
675 DO 40 jj = j + 1, m
676 IF( w( jj ).LT.tmp1 ) THEN
677 i = jj
678 tmp1 = w( jj )
679 END IF
680 40 CONTINUE
681*
682 IF( i.NE.0 ) THEN
683 w( i ) = w( j )
684 w( j ) = tmp1
685 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
686 END IF
687 50 CONTINUE
688 END IF
689*
690* Set WORK(1) to optimal workspace size.
691*
692 work( 1 ) = lwkopt
693 iwork( 1 ) = liwmin
694*
695 RETURN
696*
697* End of DSYEVR
698*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
Definition dcopy.f:82
subroutine dsytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
DSYTRD
Definition dsytrd.f:191
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
Definition ilaenv.f:160
double precision function dlamch(cmach)
DLAMCH
Definition dlamch.f:69
double precision function dlansy(norm, uplo, n, a, lda, work)
DLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
Definition dlansy.f:120
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
subroutine dscal(n, da, dx, incx)
DSCAL
Definition dscal.f:79
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
Definition dstebz.f:272
subroutine dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
DSTEIN
Definition dstein.f:172
subroutine dstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
DSTEMR
Definition dstemr.f:320
subroutine dsterf(n, d, e, info)
DSTERF
Definition dsterf.f:84
subroutine dswap(n, dx, incx, dy, incy)
DSWAP
Definition dswap.f:82
subroutine dormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
DORMTR
Definition dormtr.f:170
Here is the call graph for this function:
Here is the caller graph for this function: