PSSTEBZ(l)
π PSSTEBZ π
okay bestie, buckle up, because we're about to talk about PSSTEBZ, a routine from the LAPACK library (version 1.5, she's vintage but she EATS). this is a lowercase-l manpage, which is LAPACK's whole thing, don't ask. π«Ά
β¨ NAME β¨
PSSTEBZ β compute the eigenvalues of a symmetric tridiagonal matrix in parallel π
πΈ SYNOPSIS πΈ
SUBROUTINE PSSTEBZ( 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
REAL ABSTOL, VL, VU
INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
REAL D( * ), E( * ), W( * ), WORK( * )
like, look at that argument list. it's giving "twenty-one parameters and not one of them is optional." iconic. π
π¦ PURPOSE π¦
PSSTEBZ computes the eigenvalues of a symmetric tridiagonal matrix in parallel. no cap. you the user get to ask for:
- all the eigenvalues,
- all the eigenvalues sitting in the interval
[VL, VU], or - the eigenvalues indexed
ILthroughIU.
and then a static partitioning of work gets done at the very beginning of PSSTEBZ, which means every process ends up finding an (almost) equal number of eigenvalues. balanced. fair. we love to see it. β¨
NOTE: it is assumed that you're on an IEEE machine. if you're 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 double precision floating point number is assumed to be in the 32nd or 64th bit position (c) the sign of negative zero. yes bestie, all three. no skipping.
also, for the lore girlies: see W. Kahan, "Accurate Eigenvalues of a Symmetric Tridiagonal Matrix", Report CS41, Computer Science Dept., Stanford University, July 21, 1966. an absolute legend, and also apparently very into signs of negative zero. π
π ARGUMENTS π
ICTXT(global input)INTEGERβ the BLACS context handle. that's it, that's the whole description, she's mysterious.RANGE(global input)CHARACTERβ specifies which eigenvalues are gonna 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. constraint:N >= 0. πVL(global input)REALβ 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)REALβ 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)REALβ 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 thresholdSLAMCH('U'), not zero. Note: if eigenvectors are desired later by inverse iteration (PSSTEIN),ABSTOLshould be set to2*PSLAMCH('S'). write that down, bestie. πD(global input)REALarray, 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)REALarray, dimension(N-1)β the(n-1)off-diagonal elements of the tridiagonal matrixT. same overflow tea asD: 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.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)REALarray, dimension(N)β on exit, the firstMelements ofWcontain the eigenvalues on all processes. β¨IBLOCK(global output)INTEGERarray, 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. spooky. π
ISPLIT(global output)INTEGERarray, 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.) it's giving "we over-allocated because we had no choice." πWORK(local workspace)REALarray, 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)INTEGERarray, 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. here's the whole menu:= 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 thanPSLAMCHsays. (rude.)= 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 thePARAMETER"FUDGE", recompile, and try again. π
π§ PARAMETERS π§
RELFACREAL, 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.)FUDGEREAL, 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. so fudge away, bestie, it's free. π
and that's the whole page!! π written by the LAPACK girlies, LAPACK version 1.5, dated 12 May 1997 β she's been serving accurate eigenvalues since before you were born, and she's still slaying. mwah. πβ¨π¦
π¦ 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