SLARRV2(3)    ScaLAPACK routine of NEC Numeric Library Collection   SLARRV2(3)



NAME
       SLARRV2  -  computes the eigenvectors of the tridiagonal matrix T = L D
       L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T

SYNOPSIS
       SUBROUTINE SLARRV2( N, VL, VU, D,  L,  PIVMIN,  ISPLIT,  M,  DOL,  DOU,
                           NEEDIL,  NEEDIU,  MINRGP,  RTOL1,  RTOL2,  W, WERR,
                           WGAP, IBLOCK, INDEXW, GERS, SDIAM, Z, LDZ,  ISUPPZ,
                           WORK,  IWORK,  VSTART, FINISH, MAXCLS, NDEPTH, PAR-
                           ITY, ZOFFSET, INFO )

           INTEGER         DOL, DOU, INFO, LDZ, M, N, MAXCLS, NDEPTH,  NEEDIL,
                           NEEDIU, PARITY, ZOFFSET

           REAL            MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU

           LOGICAL         VSTART, FINISH

           INTEGER         IBLOCK( * ), INDEXW( * ), ISPLIT( * ), ISUPPZ( * ),
                           IWORK( * )

           REAL            D( * ), GERS( * ), L( * ), SDIAM(  *  ),  W(  *  ),
                           WERR( * ), WGAP( * ), WORK( * )

           REAL            Z( LDZ, * )

PURPOSE
       SLARRV2 computes the eigenvectors of the tridiagonal matrix T = L D L^T
       given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.  The input
       eigenvalues  should have been computed by SLARRE2A or by precious calls
       to SLARRV2.

       The major difference between the parallel and the sequential  construc-
       tion  of  the representation tree is that in the parallel case, not all
       eigenvalues of a given cluster might be computed locally. Other proces-
       sors might "own" and refine part of an eigenvalue cluster. This is cru-
       cial for scalability.  Thus  there  might  be  communication  necessary
       before the current level of the representation tree can be parsed.

       Please note:
       1. The calling sequence has two additional INTEGER parameters,
          DOL and DOU, that should satisfy M>=DOU>=DOL>=1.
          These parameters are only relevant for the case JOBZ = 'V'.
          SLARRV2  ONLY computes the eigenVECTORS
          corresponding to eigenvalues DOL through DOU in W. (That is,
          instead of computing the eigenvectors belonging to W(1)
          through W(M), only the eigenvectors belonging to eigenvalues
          W(DOL) through W(DOU) are computed. In this case, only the
          eigenvalues DOL:DOU are guaranteed to be accurately refined
          to all figures by Rayleigh-Quotient iteration.

       2. The additional arguments VSTART, FINISH, NDEPTH, PARITY, ZOFFSET
          are  included  as  a  thread-safe  implementation equivalent to SAVE
       variables.
          These variables store details about the  local  representation  tree
       which is
          computed  layerwise.  For scalability reasons, eigenvalues belonging
       to the
          locally relevant representation tree might be computed on other pro-
       cessors.
          These  need to be communicated before the inspection of the RRRs can
       proceed
          on any given layer.
          Note that only when the variable FINISH is true, the computation has
       ended
          All  eigenpairs  between  DOL and DOU have been computed. M is set =
       DOU - DOL + 1.

       3. SLARRV2 needs more workspace in Z than the sequential SLARRV.
          It is used to store the conformal embedding of the local representa-
       tion tree.


ARGUMENTS
       N       (input) INTEGER
               The order of the matrix.  N >= 0.

       VL      (input) REAL

       VU      (input) REAL
               Lower  and  upper  bounds  of  the  interval  that contains the
               desired eigenvalues. VL < VU. Needed to  compute  gaps  on  the
               left  or  right  end of the extremal eigenvalues in the desired
               RANGE.
               VU is currently not used but kept as parameter in case  needed.

       D       (input/output) REAL array, dimension (N)
               On entry, the N diagonal elements of the diagonal matrix D.
               On exit, D is overwritten.

       L       (input/output) REAL array, dimension (N)
               On entry, the (N-1) subdiagonal elements of the unit bidiagonal
               matrix L are in elements 1 to N-1 of L (if the  matrix  is  not
               splitted.) At the end of each block is stored the corresponding
               shift as given by SLARRE.
               On exit, L is overwritten.

       PIVMIN  (in) REAL
               The minimum pivot allowed in the sturm sequence.

       ISPLIT  (input) INTEGER array, dimension (N)
               The splitting points, at which T breaks up into blocks.
               The first block consists of rows/columns 1 to ISPLIT( 1 ),  the
               second  of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc.

       M       (input) INTEGER
               The total number of input eigenvalues.  0 <= M <= N.

       DOL     (input) INTEGER

       DOU     (input) INTEGER
               If the user wants to compute only  selected  eigenvectors  from
               all  the  eigenvalues  supplied,  he can specify an index range
               DOL:DOU.
               Or else the setting DOL=1, DOU=M should be applied.
               Note that DOL and DOU refer to the order in which the eigenval-
               ues are stored in W.
               If the user wants to compute only selected eigenpairs, then the
               columns DOL-1 to DOU+1 of the eigenvector space Z  contain  the
               computed  eigenvectors. All other columns of Z are set to zero.
               If DOL > 1, then Z(:,DOL-1-ZOFFSET) is used.
               If DOU < M, then Z(:,DOU+1-ZOFFSET) is used.

       NEEDIL  (input/output) INTEGER

       NEEDIU  (input/output) INTEGER
               Describe which are the left  and  right  outermost  eigenvalues
               that  still  need  to  be  included  in  the computation. These
               indices indicate whether eigenvalues from other processors  are
               needed  to correctly compute the conformally embedded represen-
               tation tree.
               When DOL<=NEEDIL<=NEEDIU<=DOU,  all  required  eigenvalues  are
               local to the processor and no communication is required to com-
               pute its part of the representation tree.

       MINRGP  (input) REAL
               The minimum relativ gap threshold to decide whether  an  eigen-
               value or a cluster boundary is reached.

       RTOL1   (input) REAL

       RTOL2   (input) REAL
               Parameters for bisection.
               An  interval  [LEFT,RIGHT]  has converged if RIGHT-LEFT.LT.MAX(
               RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )

       W       (input/output) REAL array, dimension (N)
               The first M elements of W contain the  APPROXIMATE  eigenvalues
               for  which  eigenvectors  are  to  be computed. The eigenvalues
               should be grouped by split-off block and ordered from  smallest
               to  largest within the block. (The output array W from DSTEGR2A
               is expected here.) Furthermore, they are with  respect  to  the
               shift of the corresponding root representation for their block.
               On exit, W holds those UNshifted eigenvalues for  which  eigen-
               vectors have already been computed.

       WERR    (input/output) REAL array, dimension (N)
               The  first  M elements contain the semiwidth of the uncertainty
               interval of the corresponding eigenvalue in W

       WGAP    (input/output) REAL array, dimension (N)
               The separation from the right neighbor eigenvalue in W.

       IBLOCK  (input) INTEGER array, dimension (N)
               The indices of the blocks  (submatrices)  associated  with  the
               corresponding  eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i)
               belongs to the first block from the top, =2 if W(i) belongs  to
               the second block, etc.

       INDEXW  (input) INTEGER array, dimension (N)
               The  indices  of the eigenvalues within each block (submatrix);
               for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the  i-th
               eigenvalue W(i) is the 10-th eigenvalue in the second block.

       GERS    (input) REAL array, dimension (2*N)
               The  N  Gerschgorin intervals (the i-th Gerschgorin interval is
               (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals  should  be
               computed from the original UNshifted matrix.
               Currently  NOT  used  but  kept as parameter in case it becomes
               needed in the future.

       SDIAM   (input) REAL array, dimension (N)
               The spectral diameters for all unreduced blocks.

       Z       (output) REAL array, dimension (LDZ, max(1,M) )
               If INFO = 0, the first M columns of Z contain  the  orthonormal
               eigenvectors  of the matrix T corresponding to the input eigen-
               values, with the i-th column of Z holding the eigenvector asso-
               ciated with W(i).
               In  the  distributed  version,  only  a  subset  of  columns is
               accessed, see DOL,DOU and ZOFFSET.

       LDZ     (input) INTEGER
               The leading dimension of the array Z.  LDZ >= 1, and if JOBZ  =
               'V', LDZ >= max(1,N).

       ISUPPZ  (output) INTEGER array, dimension ( 2*max(1,M) )
               The  support  of the eigenvectors in Z, i.e., the indices indi-
               cating the nonzero elements  in  Z.  The  I-th  eigenvector  is
               nonzero only in elements ISUPPZ( 2*I-1 ) through ISUPPZ( 2*I ).

       WORK    (workspace) REAL array, dimension (12*N)

       IWORK   (workspace) INTEGER array, dimension (7*N)

       VSTART  (input/output) LOGICAL
                .TRUE. on initialization, set to .FALSE. afterwards.

       FINISH  (input/output) LOGICAL
               A flag that indicates whether all  eigenpairs  have  been  com-
               puted.

       MAXCLS  (input/output) INTEGER
               The  largest  cluster worked on by this processor in the repre-
               sentation tree.

       NDEPTH  (input/output) INTEGER
               The current depth of the representation tree. Set  to  zero  on
               initial pass, changed when the deeper levels of the representa-
               tion tree are generated.

       PARITY  (input/output) INTEGER
               An internal parameter needed for the storage of the clusters on
               the current level of the representation tree.

       ZOFFSET (input) INTEGER
               Offset  for storing the eigenpairs when Z is distributed in 1D-
               cyclic fashion.

       INFO    (output) INTEGER
               = 0:  successful exit
               > 0:  A problem occured in SLARRV2.
               < 0:  One of the called subroutines signaled an internal
                     probrem. Needs inspection of the corresponding
                     parameter INFO for further information.

               =-1:  Problem in SLARRB2 when refining a child's eigenvalues.

               =-2:  Problem in SLARRF2 when computing the RRR of a child.
                     When a child is inside a tight cluster, it can be  diffi-
               cult
                     to find an RRR. A partial remedy from the user's point of
                     view is to make the parameter MINRGP smaller  and  recom-
               pile.
                     However, as the orthogonality of the computed vectors is
                     proportional to 1/MINRGP, the user should be aware that
                     he  might  be trading in precision when he decreases MIN-
               RGP.

               =-3:  Problem in SLARRB2 when refining a single eigenvalue
                     after the Rayleigh correction was rejected.

               = 5:  The Rayleigh Quotient Iteration failed to converge to
                     full accuracy in MAXITR steps.



ScaLAPACK routine               31 October 2017                     SLARRV2(3)