SSTEGR2B(3) ScaLAPACK routine of NEC Numeric Library Collection SSTEGR2B(3)
NAME
SSTEGR2B - computes the selected eigenvalues and eigenvectors of the
real symmetric tridiagonal matrix in parallel on multiple processors
SYNOPSIS
SUBROUTINE SSTEGR2B(
JOBZ, N, D, E, M, W, Z, LDZ, NZC, ISUPPZ, WORK,
LWORK, IWORK, LIWORK, DOL, DOU, NEEDIL, NEEDIU,
INDWLC, PIVMIN, SCALE, WL, WU, VSTART, FINISH, MAX-
CLS, NDEPTH, PARITY, ZOFFSET, INFO )
CHARACTER JOBZ
INTEGER DOL, DOU, INDWLC, INFO, LDZ, LIWORK, LWORK, M, MAX-
CLS, N, NDEPTH, NEEDIL, NEEDIU, NZC, PARITY, ZOFF-
SET
REAL PIVMIN, SCALE, WL, WU
LOGICAL VSTART, FINISH
INTEGER ISUPPZ( * ), IWORK( * )
REAL D( * ), E( * ), W( * ), WORK( * )
REAL Z( LDZ, * )
PURPOSE
SSTEGR2B should only be called after a call to SSTEGR2A. From eigen-
values and initial representations computed by SSTEGR2A, SSTEGR2B com-
putes the selected eigenvalues and eigenvectors of the real symmetric
tridiagonal matrix in parallel on multiple processors. It is poten-
tially invoked multiple times on a given processor because the locally
relevant representation tree might depend on spectral information that
is "owned" by other processors and might need to be communicated.
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'.
SSTEGR2B 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. SSTEGR2B needs more workspace in Z than the sequential SSTEGR.
It is used to store the conformal embedding of the local representa-
tion tree.
ARGUMENTS
JOBZ (input) CHARACTER*1
= 'N': Compute eigenvalues only;
= 'V': Compute eigenvalues and eigenvectors.
N (input) INTEGER
The order of the matrix. N >= 0.
D (input/output) REAL array, dimension (N)
On entry, the N diagonal elements of the tridiagonal matrix T.
On exit, D is overwritten.
E (input/output) REAL array, dimension (N)
On entry, the (N-1) subdiagonal elements of the tridiagonal
matrix T in elements 1 to N-1 of E. E(N) need not be set on
input, but is used internally as workspace.
On exit, E is overwritten.
M (input) INTEGER
The total number of eigenvalues found in SSTEGR2A. 0 <= M <=
N.
W (input) REAL array, dimension (N)
The first M elements contain approximations to the selected
eigenvalues in ascending order. Note that only the eigenvalues
from the locally relevant part of the representation tree, that
is all the clusters that include eigenvalues from DOL:DOU, are
reliable on this processor. (It does not need to know about any
others anyway.)
Z (output) REAL array, dimension (LDZ, max(1,M) )
If JOBZ = 'V', and if INFO = 0, then a subset of the first M
columns of Z contain the orthonormal eigenvectors of the matrix
T corresponding to the selected eigenvalues, with the i-th col-
umn of Z holding the eigenvector associated with W(i).
See DOL, DOU for more information.
LDZ (input) INTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
'V', then LDZ >= max(1,N).
NZC (input) INTEGER
The number of eigenvectors to be held in the array Z.
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 computed eigenvector
is nonzero only in elements ISUPPZ( 2*i-1 ) through ISUPPZ( 2*i
). This is relevant in the case when the matrix is split.
ISUPPZ is only set if N>2.
WORK (workspace/output) REAL array, dimension (LWORK)
On exit, if INFO = 0, WORK(1) returns the optimal (and minimal)
LWORK.
LWORK (input) INTEGER
The dimension of the array WORK. LWORK >= max(1,18*N) if JOBZ =
'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
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.
IWORK (workspace/output) INTEGER array, dimension (LIWORK)
On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
LIWORK (input) INTEGER
The dimension of the array IWORK. LIWORK >= max(1,10*N) if the
eigenvectors are desired, and LIWORK >= max(1,8*N) if only the
eigenvalues are to be computed.
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.
DOL (input) INTEGER
DOU (input) INTEGER From the eigenvalues W(1:M), only
eigenvectors Z(:,DOL) to Z(:,DOU) are computed.
If DOL > 1, then Z(:,DOL-1-ZOFFSET) is used and overwritten.
If DOU < M, then Z(:,DOU+1-ZOFFSET) is used and overwritten.
NEEDIL (input/output) INTEGER
NEEDIU (input/output) INTEGER Describes which are the left and
right outermost eigenvalues still to be computed. Initially
computed by SLARRE2A, modified in the course of the algorithm.
INDWLC (output) REAL
Pointer into the workspace, location where the local eigenvalue
representations are stored. ("Local eigenvalues" are those rel-
ative to the individual shifts of the RRRs.)
PIVMIN (input) REAL
The minimum pivot in the sturm sequence for T.
SCALE (input) REAL
The scaling factor for T. Used for unscaling the eigenvalues at
the very end of the algorithm.
WL (input) REAL
WU (input) REAL The interval (WL, WU] contains all the
wanted eigenvalues.
VSTART (input/output) LOGICAL
.TRUE. on initialization, set to .FALSE. afterwards.
FINISH (input/output) LOGICAL
indicates whether all eigenpairs have been computed
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
On exit, INFO
= 0: successful exit
other:if INFO = -i, the i-th argument had an illegal value
if INFO = 20X, internal error in SLARRV2.
Here, the digit X = ABS( IINFO ) < 10, where IINFO is
the nonzero error code returned by SLARRV2.
ScaLAPACK routine 31 October 2017 SSTEGR2B(3)