DCHKST(3)
π¦ dchkst.f(3) β Library Functions Manual π¦
okay so bestie, this is the Library Functions Manual page for DCHKST, and we're starting from the very top. Buckle up, it's giving Fortran documentation with a side of main character energy. π
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/dchkst.f
That's the whole NAME section, bestie. Literally just the path. No cap. π
πΈ SYNOPSIS πΈ
π Functions/Subroutines π
subroutine DCHKST (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, ap, sd, se, d1, d2, d3, d4, d5, wa1, wa2, wa3, wr, u, ldu, v,
vp, tau, z, work, lwork, iwork, liwork, result, info)
DCHKST
That's the subroutine calling card. All the argument names are right there, slaying in order. β¨
π Function/Subroutine Documentation π
π subroutine DCHKST π
subroutine DCHKST (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
double precision thresh, integer nounit, double precision, dimension(
lda, * ) a, integer lda, double precision, dimension( * ) ap, double
precision, dimension( * ) sd, double precision, dimension( * ) se,
double precision, dimension( * ) d1, double precision, dimension( * )
d2, double precision, dimension( * ) d3, double precision, dimension( *
) d4, double precision, dimension( * ) d5, double precision, dimension(
* ) wa1, double precision, dimension( * ) wa2, double precision,
dimension( * ) wa3, double precision, dimension( * ) wr, double
precision, dimension( ldu, * ) u, integer ldu, double precision,
dimension( ldu, * ) v, double precision, dimension( * ) vp, double
precision, dimension( * ) tau, double precision, dimension( ldu, * ) z,
double precision, dimension( * ) work, integer lwork, integer,
dimension( * ) iwork, integer liwork, double precision, dimension( * )
result, integer info)
DCHKST
Here's the full typed signature, with all the integer, logical, and double precision details intact. Do not lose a single comma or dimension, bestie β this is the exact shape of the subroutine. π«Ά
π Purpose π
the purpose prose is incoming in the next part, bestie β this chunk stops right at the label.
okay so bestie, this is the part where we get into what this thing actually does π buckle up.
DCHKST checks the symmetric eigenvalue problem routines. that's the whole vibe.
DSYTRDfactorsAasU S U', where'means transpose,Sis symmetric tridiagonal, andUis orthogonal.DSYTRDcan use either just the lower or just the upper triangle ofA;DCHKSTchecks both cases.Uis represented as a product of Householder transformations, whose vectors are stored in the firstn-1columns ofV, and whose scale factors are inTAU. iconic behavior tbh.DSPTRDdoes the same asDSYTRD, except thatAandVare stored in ____ format.DORGTRconstructs the matrixUfrom the contents ofVandTAU. king shit πDOPGTRconstructs the matrixUfrom the contents ofVPandTAU.DSTEQRfactorsSasZ D1 Z', whereZis the orthogonal matrix of eigenvectors andD1is a diagonal matrix with the eigenvalues on the diagonal.D2is the matrix of eigenvalues computed whenZis not computed.DSTERFcomputesD3, the matrix of eigenvalues, by the PWK method, which does not yield eigenvectors.DPTEQRfactorsSasZ4 D4 Z4', for a symmetric positive definite tridiagonal matrix.D5is the matrix of eigenvalues computed whenZis not computed.DSTEBZcomputes selected eigenvalues.WA1,WA2, andWA3will denote eigenvalues computed to high absolute accuracy, with different range options.WRwill denote eigenvalues computed to high relative accuracy.DSTEINcomputesY, the eigenvectors ofS, given the eigenvalues.DSTEDCfactorsSasZ D1 Z', whereZis the orthogonal matrix of eigenvectors andD1is a diagonal matrix with the eigenvalues on the diagonal ('I'option). It may also update an input orthogonal matrix, usually the output fromDSYTRD/DORGTRorDSPTRD/DOPGTR('V'option). It may also just compute eigenvalues ('N'option).DSTEMRfactorsSasZ D1 Z', whereZis the orthogonal matrix of eigenvectors andD1is a diagonal matrix with the eigenvalues on the diagonal ('I'option).DSTEMRuses the Relatively Robust Representation whenever possible.
when DCHKST is called, a number of matrix ____ (____) and a number of matrix ____ are specified. (yeah the source has a couple words missing there β not me, i promise π) for each size (____) and each type of matrix, one matrix will be generated and used to test the symmetric eigenroutines. for each matrix, a number of tests will be performed:
| A - V S V' | / ( |A| n ulp )βDSYTRD( UPLO='U', ... )| I - UV' | / ( n ulp )βDORGTR( UPLO='U', ... )| A - V S V' | / ( |A| n ulp )βDSYTRD( UPLO='L', ... )| I - UV' | / ( n ulp )βDORGTR( UPLO='L', ... )- tests 5-8: same as 1-4, but for
DSPTRDandDOPGTR. (yes that's four tests bundled up, slay a little consolidation β¨) | S - Z D Z' | / ( |S| n ulp )βDSTEQR('V',...)| I - ZZ' | / ( n ulp )βDSTEQR('V',...)| D1 - D2 | / ( |D1| ulp )βDSTEQR('N',...)| D1 - D3 | / ( |D1| ulp )βDSTERF0if the true eigenvalues (computed by sturm count) ofSare withinTHRESHof those inD1.2*THRESHif they are not. (Tested usingDSTECH)
for S positive definite, we got more:
| S - Z4 D4 Z4' | / ( |S| n ulp )βDPTEQR('V',...)| I - Z4 Z4' | / ( n ulp )βDPTEQR('V',...)| D4 - D5 | / ( 100 |D4| ulp )βDPTEQR('N',...)
and when S is also diagonally dominant by the factor gamma < 1:
- this whole situation:
max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
DSTEBZ( 'A', 'E', ...)
| WA1 - D3 | / ( |D3| ulp )βDSTEBZ( 'A', 'E', ...)- this double max-min masterpiece:
( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
DSTEBZ( 'I', 'E', ...)
| S - Y WA1 Y' | / ( |S| n ulp )βDSTEBZ, SSTEIN| I - Y Y' | / ( n ulp )βDSTEBZ, SSTEIN| S - Z D Z' | / ( |S| n ulp )βDSTEDC('I')| I - ZZ' | / ( n ulp )βDSTEDC('I')| S - Z D Z' | / ( |S| n ulp )βDSTEDC('V')| I - ZZ' | / ( n ulp )βDSTEDC('V')| D1 - D2 | / ( |D1| ulp )βDSTEDC('V')andDSTEDC('N')
okay heads up: test 27 is disabled at the moment because DSTEMR does not guarantee high relative accuracy. so it's sitting there, off, vibing π
- (this is test 27, disabled, remember)
max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
DSTEMR('V', 'A')
- (test 28, also in the disabled pile)
max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
DSTEMR('V', 'I')
and tests 29 through 34 are disabled at present because DSTEMR does not handle partial spectrum requests. so the next few are ghost tests π» still documenting them tho, no cap.
| S - Z D Z' | / ( |S| n ulp )βDSTEMR('V', 'I')| I - ZZ' | / ( n ulp )βDSTEMR('V', 'I')
28.
( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
DSTEMR('N', 'I') vs. SSTEMR('V', 'I')
| S - Z D Z' | / ( |S| n ulp )βDSTEMR('V', 'V')| I - ZZ' | / ( n ulp )βDSTEMR('V', 'V')
31.
( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
DSTEMR('N', 'V') vs. SSTEMR('V', 'V')
| S - Z D Z' | / ( |S| n ulp )βDSTEMR('V', 'A')| I - ZZ' | / ( n ulp )βDSTEMR('V', 'A')
34.
( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
DSTEMR('N', 'A') vs. SSTEMR('V', 'A')
and that's the full test roster, bestie. 37-ish whole personality traits π
the ____ are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size.
the ____ are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type ____ will be generated.
currently, the list of possible types is:
- The zero matrix.
- The identity matrix.
- A diagonal matrix with evenly spaced entries
1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1) - A diagonal matrix with geometrically spaced entries
1, ..., ULPand random signs. - A diagonal matrix with ____ entries
1, ULP, ..., ULPand random signs. - Same as (4), but multiplied by
SQRT( overflow threshold ) - Same as (4), but multiplied by
SQRT( underflow threshold ) - A matrix of the form
U' D U, whereUis orthogonal andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal. - A matrix of the form
U' D U, whereUis orthogonal andDhas geometrically spaced entries1, ..., ULPwith random signs on the diagonal. - A matrix of the form
U' D U, whereUis orthogonal andDhas ____ entries1, ULP,..., ULPwith random signs on the diagonal. - Same as (8), but multiplied by
SQRT( overflow threshold ) - Same as (8), but multiplied by
SQRT( underflow threshold ) - Symmetric matrix with random entries chosen from
(-1,1). - Same as (13), but multiplied by
SQRT( overflow threshold ) - Same as (13), but multiplied by
SQRT( underflow threshold ) - Same as (8), but diagonal elements are all positive.
- Same as (9), but diagonal elements are all positive.
- Same as (10), but diagonal elements are all positive.
- Same as (16), but multiplied by
SQRT( overflow threshold ) - Same as (16), but multiplied by
SQRT( underflow threshold ) - A diagonally dominant tridiagonal matrix with geometrically spaced diagonal entries
1, ..., ULP.
π Parameters π
NSIZES
NSIZES is INTEGER
The number of sizes of matrices to use. If it is zero, DCHKST does nothing. It must be at least zero. (zero = it simply does not perceive you π)
NN
NN is INTEGER array, dimension (NSIZES)
An array containing the sizes to be used for the matrices. Zero values will be skipped. The values must be at least zero.
NTYPES
NTYPES is INTEGER
The number of elements in DOTYPE. If it is zero, DCHKST does nothing. It must be at least zero. If it is MAXTYP+1 and NSIZES is 1, then an additional type, MAXTYP+1 is defined, which is to use whatever matrix is in A. This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE.. iykyk π«Ά
DOTYPE
β¦and for DOTYPE, bestie: itβs a LOGICAL array, dimension (NTYPES). If DOTYPE(j) is .TRUE., then for each size in NN a matrix of that size and of type j will be generated. If NTYPES is smaller than the maximum number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP will not be generated. If NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) will be ignored. π«Ά
ISEEDβISEEDisINTEGERarray, dimension(4). On entry,ISEEDspecifies the seed of the random number generator. The array elements should be between0and4095; if not, they will be reduced mod4096. Also,ISEED(4)must be odd. The random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. The values ofISEEDare changed on exit, and can be used in the next call toDCHKSTto continue the same random number sequence. π²THRESHβTHRESHisDOUBLE PRECISION. A test will count as if the , computed as described above, exceedsTHRESH. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of1, e.g.,10or100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero. πNOUNITβNOUNITisINTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) π¨AβAisDOUBLE PRECISIONarray of dimension( LDA , max(NN) ). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. β¨LDAβLDAisINTEGER. The leading dimension ofA. It must be at least1and at leastmax( NN ). πAPβAPisDOUBLE PRECISIONarray of dimension( max(NN)*max(NN+1)/2 ). The matrixAstored in packed format. πSDβSDisDOUBLE PRECISIONarray of dimension( max(NN) ). The diagonal of the tridiagonal matrix computed byDSYTRD. On exit,SDandSEcontain the tridiagonal form of the matrix inA. π¦SEβSEisDOUBLE PRECISIONarray of dimension( max(NN) ). The off-diagonal of the tridiagonal matrix computed byDSYTRD. On exit,SDandSEcontain the tridiagonal form of the matrix inA. πΈD1βD1isDOUBLE PRECISIONarray of dimension( max(NN) ). The eigenvalues ofA, as computed byDSTEQRsimultaneously withZ. On exit, the eigenvalues inD1correspond with the matrix inA. πD2βD2isDOUBLE PRECISIONarray of dimension( max(NN) ). The eigenvalues ofA, as computed byDSTEQRifZis not computed. On exit, the eigenvalues inD2correspond with the matrix inA. βD3βD3isDOUBLE PRECISIONarray of dimension( max(NN) ). The eigenvalues ofA, as computed byDSTERF. On exit, the eigenvalues inD3correspond with the matrix inA. π₯D4βD4isDOUBLE PRECISIONarray of dimension( max(NN) ). The eigenvalues ofA, as computed byDPTEQR(V).DPTEQRfactorsSasZ4 D4 Z4*. On exit, the eigenvalues inD4correspond with the matrix inA. πD5βD5isDOUBLE PRECISIONarray of dimension( max(NN) ). The eigenvalues ofA, as computed byDPTEQR(N)whenZis not computed. On exit, the eigenvalues inD4correspond with the matrix inA. π«§WA1βWA1isDOUBLE PRECISIONarray of dimension( max(NN) ). All eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed byDSTEBZ. πWA2βWA2isDOUBLE PRECISIONarray of dimension( max(NN) ). Selected eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed byDSTEBZ. Choose random values forILandIU, and ask for theIL-th throughIU-th eigenvalues. π―WA3βWA3isDOUBLE PRECISIONarray of dimension( max(NN) ). Selected eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed byDSTEBZ. Determine the valuesVLandVUof theIL-th andIU-th eigenvalues and ask for all eigenvalues in this range. π§WRβWRisDOUBLE PRECISIONarray of dimension( max(NN) ). All eigenvalues ofA, computed to high absolute accuracy, with different options. as computed byDSTEBZ. πUβUisDOUBLE PRECISIONarray of dimension( LDU, max(NN) ). The orthogonal matrix computed byDSYTRD+DORGTR. πLDUβLDUisINTEGER. The leading dimension ofU,Z, andV. It must be at least1and at leastmax( NN ). πVβVisDOUBLE PRECISIONarray of dimension( LDU, max(NN) ). The Housholder vectors computed byDSYTRDin reducingAto tridiagonal form. The vectors computed withUPLO='U'are in the upper triangle, and the vectors computed withUPLO='L'are in the lower triangle. (As described inDSYTRD, the sub- and superdiagonal are not set to1, although the true Householder vector has a1in that position. The routines that useV, such asDORGTR, set those entries to1before using them, and then restore them later.) π¦VPβVPisDOUBLE PRECISIONarray of dimension( max(NN)*max(NN+1)/2 ). The matrixVstored in packed format. πTAUβTAUisDOUBLE PRECISIONarray of dimension( max(NN) ). The Householder factors computed byDSYTRDin reducingAto tridiagonal form. π«ZβZisDOUBLE PRECISIONarray of dimension( LDU, max(NN) ). The orthogonal matrix of eigenvectors computed byDSTEQR,DPTEQR, andDSTEIN. πWORKβWORKisDOUBLE PRECISIONarray of dimension( LWORK ). π οΈLWORKβLWORKisINTEGER. The number of entries inWORK. This must be at least1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2whereNmax = max( NN(j), 2 )andlg = log base 2. π¦IWORKβIWORKisINTEGERarray, Workspace. π§°LIWORKβLIWORKisINTEGER. The number of entries inIWORK. This must be at least6 + 6*Nmax + 5 * Nmax * lg NmaxwhereNmax = max( NN(j), 2 )andlg = log base 2. ποΈRESULTβRESULTisDOUBLE PRECISIONarray, dimension(26). The values computed by the tests described above. The values are currently limited to1/ulp, to avoid overflow. πINFO0β everything ran OK. we love a clean run π-1βNSIZES < 0-2β someNN(j) < 0-3βNTYPES < 0-5βTHRESH < 0-9βLDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-23βLDU < 1orLDU < NMAX.-29βLWORKtoo small. bestie pls give it more room π
and ok so if DLATMR, SLATMS, DSYTRD, DORGTR, DSTEQR, SSTERF, or DORMC2 returns an error code, the absolute value of it is what comes back at you. no cap, that's the deal π
β¨ Some Local Variables and Parameters β¨
okay this is the little cast list of the internals, and honestly it's giving backstage tour energy π
ZERO,ONEβ Real0and1. iconic, no notes.MAXTYPβ the number of types defined.NTESTβ the number of tests performed, or which can be performed so far, for the current matrix.NTESTTβ the total number of tests performed so far.NBLOCKβ blocksize as returned byENVIR.NMAXβ largest value inNN.NMATSβ the number of matrices generated so far.NERRSβ the number of tests which have exceededTHRESHso far. (we don't talk about these ones π)COND,IMODEβ values to be passed to the matrix generators.ANORMβ norm ofA; passed to matrix generators.OVFL,UNFLβ overflow and underflow thresholds.ULP,ULPINVβ finest relative precision and its inverse.RTOVFL,RTUNFLβ square roots of the previous 2 values.
and then the following four arrays decode JTYPE, lowkey the cheat sheet of the whole thing π§
KTYPE(j)β the general type (1-10) for type .KMODE(j)β theMODEvalue to be passed to the matrix generator for type .KMAGN(j)β the order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) ))
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
definition at line 587 of file dchkst.f. look at her, line 587, thriving β¨
π Author
generated automatically by Doxygen for LAPACK from the source code. yes bestie, the robots wrote this one π€π
and that's the whole page, we made it to the end π«Ά this was LAPACK, Version 3.12.0, rendered from /home/abui...IG/dchkst.f(3) β mwah, go forth and check those tridiagonal eigenvalues, you absolute icon ππ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms