SCHKST(3)
πΈ NAME πΈ
okay bestie, so this page is from the Library Functions Manual and it's all about schkst.f(3) β like, the whole entire path is:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/schkst.f
that's literally it, that's the name, it's giving "I live in a build directory" energy π
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines π¦
subroutine SCHKST (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)β yes queen, this is the one, the whole cast list π«ΆSCHKST
π Function/Subroutine Documentation π
π subroutine SCHKST π
okay so here's the full signature, and no I did not skip a single argument, we are NOT doing that today:
subroutine SCHKST (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
real thresh, integer nounit, real, dimension( lda, * ) a, integer lda,
real, dimension( * ) ap, real, dimension( * ) sd, real, dimension( * )
se, real, dimension( * ) d1, real, dimension( * ) d2, real, dimension( *
) d3, real, dimension( * ) d4, real, dimension( * ) d5, real, dimension(
* ) wa1, real, dimension( * ) wa2, real, dimension( * ) wa3, real,
dimension( * ) wr, real, dimension( ldu, * ) u, integer ldu, real,
dimension( ldu, * ) v, real, dimension( * ) vp, real, dimension( * )
tau, real, dimension( ldu, * ) z, real, dimension( * ) work, integer
lwork, integer, dimension( * ) iwork, integer liwork, real, dimension( *
) result, integer info)
SCHKST β¨
π Purpose π
okay so listen up, because this is the whole lore π
SCHKST checks the symmetric eigenvalue problem routines. iconique behaviour, truly π
SSYTRD factors A as U S U' , where ' means transpose, S is symmetric tridiagonal, and U is orthogonal. and yes, SSYTRD can use either just the lower or just the upper triangle of A β SCHKST checks both cases because we're thorough like that π
U is represented as a product of Householder transformations, whose vectors are stored in the first n-1 columns of V, and whose scale factors are in TAU.
SSPTRD does the same as SSYTRD, except that A and V are stored in format. (that's literally what it says bestie, the word before "format" is justβ¦ vibes πΈ)
SORGTR constructs the matrix U from the contents of V and TAU.
SOPGTR constructs the matrix U from the contents of VP and TAU.
SSTEQR factors S as Z D1 Z' , where Z is the orthogonal matrix of eigenvectors and D1 is a diagonal matrix with the eigenvalues on the diagonal. D2 is the matrix of eigenvalues computed when Z is not computed.
SSTERF computes D3, the matrix of eigenvalues, by the PWK method, which does not yield eigenvectors. (no eigenvectors, no problem π)
SPTEQR factors S as Z4 D4 Z4' , for a symmetric positive definite tridiagonal matrix. D5 is the matrix of eigenvalues computed when Z is not computed.
SSTEBZ computes selected eigenvalues. WA1, WA2, and WA3 will denote eigenvalues computed to high absolute accuracy, with different range options. WR will denote eigenvalues computed to high relative accuracy. highkey a flex πͺ
SSTEIN computes Y, the eigenvectors of S, given the eigenvalues.
SSTEDC factors S as Z D1 Z' , where Z is the orthogonal matrix of eigenvectors and D1 is a diagonal matrix with the eigenvalues on the diagonal ('I' option). It may also update an input orthogonal matrix, usually the output from SSYTRD/SORGTR or SSPTRD/SOPGTR ('V' option). It may also just compute eigenvalues ('N' option). she does it all, main character energy fr fr β¨
SSTEMR factors S as Z D1 Z' , where Z is the orthogonal matrix of eigenvectors and D1 is a diagonal matrix with the eigenvalues on the diagonal ('I' option). SSTEMR uses the Relatively Robust Representation whenever possible. RRR?? she's so real for that π¦
When SCHKST is called, a number of matrix () and a number of matrix are specified. 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:
- (1)
| A - V S V' | / ( |A| n ulp )βSSYTRD( UPLO='U', ... ) - (2)
| I - UV' | / ( n ulp )βSORGTR( UPLO='U', ... ) - (3)
| A - V S V' | / ( |A| n ulp )βSSYTRD( UPLO='L', ... ) - (4)
| I - UV' | / ( n ulp )βSORGTR( UPLO='L', ... ) - (5-8) Same as 1-4, but for
SSPTRDandSOPGTR. (a little sequel, we love a franchise π¬) - (9)
| S - Z D Z' | / ( |S| n ulp )βSSTEQR('V',...) - (10)
| I - ZZ' | / ( n ulp )βSSTEQR('V',...) - (11)
| D1 - D2 | / ( |D1| ulp )βSSTEQR('N',...) - (12)
| D1 - D3 | / ( |D1| ulp )βSSTERF - (13)
0if the true eigenvalues (computed by sturm count) of S are within THRESH of those inD1.2*THRESHif they are not. (Tested usingSSTECH)
For S positive definite,
- (14)
| S - Z4 D4 Z4' | / ( |S| n ulp )βSPTEQR('V',...) - (15)
| I - Z4 Z4' | / ( n ulp )βSPTEQR('V',...) - (16)
| D4 - D5 | / ( 100 |D4| ulp )βSPTEQR('N',...)
When S is also diagonally dominant by the factor gamma < 1, π
(17) the omega moment:
(17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
SSTEBZ( 'A', 'E', ...)
- (18)
| WA1 - D3 | / ( |D3| ulp )βSSTEBZ( 'A', 'E', ...)
(19) the min/max mashup:
(19) ( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
SSTEBZ( 'I', 'E', ...)
- (20)
| S - Y WA1 Y' | / ( |S| n ulp )βSSTEBZ, SSTEIN - (21)
| I - Y Y' | / ( n ulp )βSSTEBZ, SSTEIN - (22)
| S - Z D Z' | / ( |S| n ulp )βSSTEDC('I') - (23)
| I - ZZ' | / ( n ulp )βSSTEDC('I') - (24)
| S - Z D Z' | / ( |S| n ulp )βSSTEDC('V') - (25)
| I - ZZ' | / ( n ulp )βSSTEDC('V') - (26)
| D1 - D2 | / ( |D1| ulp )βSSTEDC('V')andSSTEDC('N')
π«Ά heads up bestie: Test 27 is disabled at the moment because SSTEMR does not guarantee high relatvie accuracy. (yes, "relatvie" β I'm not fixing it, that's the original spelling, we respect the source material π)
(27) another omega situation:
(27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
SSTEMR('V', 'A')
(28) and its twin:
(28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
i
omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
SSTEMR('V', 'I')
π Tests 29 through 34 are disable at present because SSTEMR does not handle partial spectrum requests. (again β "disable", keeping it exactly as given, no edits from me π)
- (29)
| S - Z D Z' | / ( |S| n ulp )βSSTEMR('V', 'I') - (30)
| I - ZZ' | / ( n ulp )βSSTEMR('V', 'I')
(31) the comparison era:
(31) ( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
SSTEMR('N', 'I') vs. SSTEMR('V', 'I')
- (32)
| S - Z D Z' | / ( |S| n ulp )βSSTEMR('V', 'V') - (33)
| I - ZZ' | / ( n ulp )βSSTEMR('V', 'V')
(34) round two of the mashup:
(34) ( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
SSTEMR('N', 'V') vs. SSTEMR('V', 'V')
- (35)
| S - Z D Z' | / ( |S| n ulp )βSSTEMR('V', 'A') - (36)
| I - ZZ' | / ( n ulp )βSSTEMR('V', 'A')
(37) and the grand finale of comparisons:
(37) ( max { min | WA2(i)-WA3(j) | } +
i j
max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
i j
SSTEMR('N', 'A') vs. SSTEMR('V', 'A')
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:
- (1) The zero matrix.
- (2) The identity matrix.
- (3) A diagonal matrix with evenly spaced entries
1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1) - (4) A diagonal matrix with geometrically spaced entries
1, ..., ULPand random signs. - (5) A diagonal matrix with entries
1, ULP, ..., ULPand random signs. - (6) Same as (4), but multiplied by
SQRT( overflow threshold ) - (7) Same as (4), but multiplied by
SQRT( underflow threshold ) - (8) A matrix of the form
U' D U, where U is orthogonal and D has evenly spaced entries1, ..., ULPwith random signs on the diagonal. - (9) A matrix of the form
U' D U, where U is orthogonal and D has geometrically spaced entries1, ..., ULPwith random signs on the diagonal. - (10) A matrix of the form
U' D U, where U is orthogonal and D has entries1, ULP,..., ULPwith random signs on the diagonal. - (11) Same as (8), but multiplied by
SQRT( overflow threshold ) - (12) Same as (8), but multiplied by
SQRT( underflow threshold ) - (13) Symmetric matrix with random entries chosen from
(-1,1). - (14) Same as (13), but multiplied by
SQRT( overflow threshold ) - (15) Same as (13), but multiplied by
SQRT( underflow threshold ) - (16) Same as (8), but diagonal elements are all positive.
- (17) Same as (9), but diagonal elements are all positive.
- (18) Same as (10), but diagonal elements are all positive.
- (19) Same as (16), but multiplied by
SQRT( overflow threshold ) - (20) Same as (16), but multiplied by
SQRT( underflow threshold ) - (21) A diagonally dominant tridiagonal matrix with geometrically spaced diagonal entries
1, ..., ULP.
β Parameters β
NSIZESNSIZESβINTEGER, bestie. This is the number of sizes of matrices you're gonna use. If it's zero,SCHKSTdoes nothing β like, absolutely nothing, no cap. It must be at least zero. πNNβINTEGER array, dimension (NSIZES). This array holds the sizes used for the matrices. Zero values get skipped. The values must be at least zero. β¨NTYPESβINTEGER. The number of elements inDOTYPE. If it's zero,SCHKSTdoes nothing. It must be at least zero. If it'sMAXTYP+1andNSIZESis1, then an additional type,MAXTYP+1, is defined, which is to use whatever matrix is inA. This is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE.. π«ΆDOTYPEβLOGICAL array, dimension (NTYPES). IfDOTYPE(j)is.TRUE., then for each size inNNa matrix of that size and of typejwill be generated. IfNTYPESis smaller than the maximum number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwill not be generated. IfNTYPESis larger thanMAXTYP,DOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)will be ignored. πISEEDβINTEGER array, dimension (4). On entryISEEDspecifies 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 toSCHKSTto continue the same random number sequence. πTHRESHβREAL. A test will count as ___ if the ___ (the original literally has blanks here π), 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βINTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) πAβREAL array 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βINTEGER. The leading dimension ofA. It must be at least1and at leastmax( NN ). πAPβREAL array of dimension( max(NN)*max(NN+1)/2 ). The matrixAstored in packed format. π¦SDβREAL array of dimension( max(NN) ). The diagonal of the tridiagonal matrix computed bySSYTRD. On exit,SDandSEcontain the tridiagonal form of the matrix inA. πΈSEβREAL array of dimension( max(NN) ). The off-diagonal of the tridiagonal matrix computed bySSYTRD. On exit,SDandSEcontain the tridiagonal form of the matrix inA. πD1βREAL array of dimension( max(NN) ). The eigenvalues ofA, as computed bySSTEQRsimultaneously withZ. On exit, the eigenvalues inD1correspond with the matrix inA. βD2βREAL array of dimension( max(NN) ). The eigenvalues ofA, as computed bySSTEQRifZis not computed. On exit, the eigenvalues inD2correspond with the matrix inA. π₯D3βREAL array of dimension( max(NN) ). The eigenvalues ofA, as computed bySSTERF. On exit, the eigenvalues inD3correspond with the matrix inA. πD4βREAL array of dimension( max(NN) ). The eigenvalues ofA, as computed bySPTEQR(V).ZPTEQR factors S as Z4 D4 Z4*. On exit, the eigenvalues inD4correspond with the matrix inA. π§D5βREAL array of dimension( max(NN) ). The eigenvalues ofA, as computed bySPTEQR(N)whenZis not computed. On exit, the eigenvalues inD4correspond with the matrix inA. (Yep, the source saysD4here β not a typo from me π.) πWA1βREAL array of dimension( max(NN) ). All eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed bySSTEBZ. πWA2βREAL array of dimension( max(NN) ). Selected eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed bySSTEBZ. Choose random values forILandIU, and ask for theIL-th throughIU-th eigenvalues. πWA3βREAL array of dimension( max(NN) ). Selected eigenvalues ofA, computed to high absolute accuracy, with different range options. as computed bySSTEBZ. Determine the valuesVLandVUof theIL-th andIU-th eigenvalues and ask for all eigenvalues in this range. πWRβREAL array of dimension( max(NN) ). All eigenvalues ofA, computed to high absolute accuracy, with different options. as computed bySSTEBZ. π¦UβREAL array of dimension( LDU, max(NN) ).The orthogonal matrix computed bySSYTRD+SORGTR. πLDUβINTEGER. The leading dimension ofU,Z, andV. It must be at least1and at leastmax( NN ). πVβREAL array of dimension( LDU, max(NN) ).TheHousholdervectors computed bySSYTRDin 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 inSSYTRD, the sub- and superdiagonal are not set to1, although the true Householder vector has a1in that position. The routines that useV, such asSORGTR, set those entries to1before using them, and then restore them later.) β¨VPβREAL array of dimension( max(NN)*max(NN+1)/2 ). The matrixVstored in packed format. πTAUβREAL array of dimension( max(NN) ). The Householder factors computed bySSYTRDin reducingAto tridiagonal form. πΈZβREAL array of dimension( LDU, max(NN) ).The orthogonal matrix of eigenvectors computed bySSTEQR,SPTEQR, andSSTEIN. πWORKβREAL array of dimension( LWORK ). π«ΆLWORKβINTEGER. 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βINTEGER array,Workspace. βLIWORKβINTEGER. 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βREAL array, dimension (26). The values computed by the tests described above. The values are currently limited to1/ulp, to avoid overflow. πINFOβ the page just listsINFOand then dips π. There's no description text after it in this excerpt. π
INFO is an INTEGER, bestie, and itβs literally the vibe check for the whole run π. Hereβs how to read it:
0β everything ran OK, slay β-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.
If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF, or SORMC2 returns an error code, the absolute value of it is returned. iykyk π«Ά
Some Local Variables and Parameters π
Okay so hereβs the supporting cast, no cap:
ZERO,ONEβ Real0and1.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.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.
The following four arrays decode JTYPE:
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 π
Shoutout to the legends behind this:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 587 of file schkst.f.
Author π
Generated automatically by Doxygen for LAPACK from the source code. π
This page is LAPACK Version 3.12.0, sourced from /home/abui...IG/schkst.f(3) β catch you later, bestie πβ¨π¦
π¦ 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