PDSTEBZ(l)
β¨ PDSTEBZ β bestie edition β¨
okay so. PDSTEBZ is a LAPACK routine (from the LAPACK routine manual, the l one, version 1.5, if you were wondering) and it's literally the girlboss of tridiagonal eigenvalue problems. pull up a chair. π
π NAME π
PDSTEBZ β compute the eigenvalues of a symmetric tridiagonal matrix in parallel β¨ (yes bestie, multiple processes, we're doing this TOGETHER)
πΈ SYNOPSIS πΈ
SUBROUTINE PDSTEBZ( ICTXT, RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D,
E, M, NSPLIT, W, IBLOCK, ISPLIT, WORK, LWORK, IWORK,
LIWORK, INFO )
CHARACTER ORDER, RANGE
INTEGER ICTXT, IL, INFO, IU, LIWORK, LWORK, M, N, NSPLIT
DOUBLE PRECISION ABSTOL, VL, VU
INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
π¦ PURPOSE π¦
So what does she actually do. PDSTEBZ computes the eigenvalues of a symmetric tridiagonal matrix in parallel, no cap. You, the user, get to ask for:
- all the eigenvalues,
- all eigenvalues in the interval
[VL, VU], - or the eigenvalues indexed
ILthroughIU.
A static partitioning of work is done at the beginning of PDSTEBZ which results in all processes finding an (almost) equal number of eigenvalues. balanced. equitable. iconic. π
β οΈ NOTE, and this one matters: it is assumed that the user is on an IEEE machine. If the user is not on an IEEE machine, set the compile time flagNO_IEEEto1(inSLmake.inc). The features of IEEE arithmetic that are needed for the "fast" Sturm Count are: - (a) infinity arithmetic - (b) the sign bit of a single precision floating point number is assumed to be in the 32nd bit position - (c) the sign of negative zero.
See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal Matrix", Report CS41, Computer Science Dept., Stanford University, July 21, 1966. π (yes she's citing her sources, she's academically unwell)
π ARGUMENTS π
the cast π
ICTXTβ (global input) INTEGER. The BLACS context handle. it's giving "who am I talking to" energy.RANGEβ (global input) CHARACTER. Specifies which eigenvalues are to be found.= 'A': ("All") all eigenvalues will be found.= 'V': ("Value") all eigenvalues in the interval[VL, VU]will be found.= 'I': ("Index") theIL-th throughIU-th eigenvalues (of the entire matrix) will be found.
ORDERβ (global input) CHARACTER. Specifies the order in which the eigenvalues and their block numbers are stored inWandIBLOCK.= 'B': ("By Block") the eigenvalues will be grouped by split-off block (seeIBLOCK,ISPLIT) and ordered from smallest to largest within the block.= 'E': ("Entire matrix") the eigenvalues for the entire matrix will be ordered from smallest to largest.
Nβ (global input) INTEGER. The order of the tridiagonal matrixT.N >= 0. πVLβ (global input) DOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues. Eigenvalues less thanVLwill not be returned. Not referenced ifRANGE='A'or'I'.VUβ (global input) DOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues. Eigenvalues greater thanVUwill not be returned.VUmust be greater thanVL. Not referenced ifRANGE='A'or'I'.ILβ (global input) INTEGER. IfRANGE='I', the index (from smallest to largest) of the smallest eigenvalue to be returned.ILmust be at least1. Not referenced ifRANGE='A'or'V'.IUβ (global input) INTEGER. IfRANGE='I', the index (from smallest to largest) of the largest eigenvalue to be returned.IUmust be at leastILand no greater thanN. Not referenced ifRANGE='A'or'V'.ABSTOLβ (global input) DOUBLE PRECISION. The absolute tolerance for the eigenvalues. An eigenvalue (or cluster) is considered to be located if it has been determined to lie in an interval whose width isABSTOLor less. IfABSTOLis less than or equal to zero, thenULP*|T|will be used, where|T|means the 1-norm ofT. Eigenvalues will be computed most accurately whenABSTOLis set to the underflow thresholdDLAMCH('U'), not zero. π (yes, zero is the trap answer)
π Note: if eigenvectors are desired later by inverse iteration (PDSTEIN),ABSTOLshould be set to2*PDLAMCH('S').
Dβ (global input) DOUBLE PRECISION array, dimension(N). Thendiagonal elements of the tridiagonal matrixT. To avoid overflow, the matrix must be scaled so that its largest entry is no greater thanoverflow**(1/2) * underflow**(1/4)in absolute value, and for greatest accuracy, it should not be much smaller than that.Eβ (global input) DOUBLE PRECISION array, dimension(N-1). The(n-1)off-diagonal elements of the tridiagonal matrixT. To avoid overflow, the matrix must be scaled so that its largest entry is no greater thanoverflow**(1/2) * underflow**(1/4)in absolute value, and for greatest accuracy, it should not be much smaller than that. (same deal asD, they're a matching set π«Ά)Mβ (global output) INTEGER. The actual number of eigenvalues found.0 <= M <= N. (See also the description ofINFO=2.)NSPLITβ (global output) INTEGER. The number of diagonal blocks in the matrixT.1 <= NSPLIT <= N.Wβ (global output) DOUBLE PRECISION array, dimension(N). On exit, the firstMelements ofWcontain the eigenvalues on all processes. πIBLOCKβ (global output) INTEGER array, dimension(N). At each row/columnjwhereE(j)is zero or small, the matrixTis considered to split into a block diagonal matrix. On exitIBLOCK(i)specifies which block (from1to the number of blocks) the eigenvalueW(i)belongs to.
β οΈ NOTE: in the (theoretically impossible) event that bisection does not converge for some or all eigenvalues,INFOis set to1and the ones for which it did not are identified by a negative block number.
ISPLITβ (global output) INTEGER array, dimension(N). The splitting points, at whichTbreaks up into submatrices. The first submatrix consists of rows/columns1toISPLIT(1), the second of rows/columnsISPLIT(1)+1throughISPLIT(2), etc., and theNSPLIT-th consists of rows/columnsISPLIT(NSPLIT-1)+1throughISPLIT(NSPLIT)=N. (Only the firstNSPLITelements will actually be used, but since the user cannot know a priori what valueNSPLITwill have,Nwords must be reserved forISPLIT.) πWORKβ (local workspace) DOUBLE PRECISION array, dimension( MAX( 5*N, 7 ) )LWORKβ (local input) INTEGER. size of arrayWORKmust be>= MAX( 5*N, 7 ). IfLWORK = -1, thenLWORKis global input and a workspace query is assumed; the routine only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued byPXERBLA.IWORKβ (local workspace) INTEGER array, dimension( MAX( 4*N, 14 ) )LIWORKβ (local input) INTEGER. size of arrayIWORKmust be>= MAX( 4*N, 14, NPROCS ). IfLIWORK = -1, thenLIWORKis global input and a workspace query is assumed; the routine only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued byPXERBLA.INFOβ (global output) INTEGER. the vibe check report π= 0: successful exit π₯³< 0: ifINFO = -i, thei-th argument had an illegal value> 0: some or all of the eigenvalues failed to converge or were not computed:= 1: Bisection failed to converge for some eigenvalues; these eigenvalues are flagged by a negative block number. The effect is that the eigenvalues may not be as accurate as the absolute and relative tolerances. This is generally caused by arithmetic which is less accurate thanPDLAMCHsays.= 2: There is a mismatch between the number of eigenvalues output and the number desired.= 3:RANGE='i', and the Gershgorin interval initially used was incorrect. No eigenvalues were computed. Probable cause: your machine has sloppy floating point arithmetic. Cure: Increase the PARAMETER"FUDGE", recompile, and try again.
π§ PARAMETERS π§
RELFACβ DOUBLE PRECISION, default =2.0. The relative tolerance. An interval[a,b]lies within "relative tolerance" ifb-a < RELFAC*ulp*max(|a|,|b|), where"ulp"is the machine precision (distance from1to the next larger floating point number.)FUDGEβ DOUBLE PRECISION, default =2.0. A "fudge factor" to widen the Gershgorin intervals. Ideally, a value of1should work, but on machines with sloppy arithmetic, this needs to be larger. The default for publicly released versions should be large enough to handle the worst machine around. Note that this has no effect on the accuracy of the solution. π¬
and that's the whole page bestie, you're so welcome, go forth and compute eigenvalues in parallel πβ¨π
this little love letter was brought to you by LAPACK version 1.5, dated 12 May 1997 β yes she's vintage, she's a classic, she's still slaying. π
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms