TESTING/EIG/sdrvst.f(3)
๐ฆ TESTING/EIG/sdrvst.f ๐ฆ
โจ NAME โจ
TESTING/EIG/sdrvst.f โ bestie, that's the file. The whole file. Periodt. ๐
๐ SYNOPSIS ๐
๐ธ Functions/Subroutines ๐ธ
subroutine sdrvstโ the main character, and yes she has a lot of arguments. Signature below, copied exactly, no cap:
subroutine sdrvst (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, d1, d2, d3, d4, eveigs, wa1, wa2, wa3, u, ldu, v, tau, z, work,
lwork, iwork, liwork, result, info)
SDRVST
๐ฅ Function/Subroutine Documentation ๐ฅ
๐ subroutine sdrvst ๐
subroutine sdrvst (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( * ) d1, real, dimension( * ) d2, real, dimension( * )
d3, real, dimension( * ) d4, real, dimension( * ) eveigs, real,
dimension( * ) wa1, real, dimension( * ) wa2, real, dimension( * ) wa3,
real, dimension( ldu, * ) u, integer ldu, real, dimension( ldu, * ) v,
real, dimension( * ) tau, real, dimension( ldu, * ) z, real, dimension(
* ) work, integer lwork, integer, dimension( * ) iwork, integer liwork,
real, dimension( * ) result, integer info)
SDRVST
๐ฏ Purpose ๐ฏ
Okay so SDRVST is literally the vibe check for the symmetric eigenvalue problem drivers. It checks them. All of them. No cap. ๐ซถ
Here's the iconic lineup it tests:
SSTEVโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix.SSTEVXโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix.SSTEVRโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix using the Relatively Robust Representation where it can.SSYEVโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix.SSYEVXโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix.SSYEVRโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix using the Relatively Robust Representation where it can.SSPEVโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix in packed storage.SSPEVXโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix in packed storage.SSBEVโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric band matrix.SSBEVXโ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric band matrix.SSYEVDโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix using a divide and conquer algorithm.SSPEVDโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix in packed storage, using a divide and conquer algorithm.SSBEVDโ computes all eigenvalues and, optionally, eigenvectors of a real symmetric band matrix, using a divide and conquer algorithm.
When SDRVST gets called, a number of matrix [blank] (()) and a number of matrix [blank] are specified. For each size (()) and each type of matrix, one matrix will be generated and used to test the appropriate drivers. For each matrix and each driver routine called, the following tests will be performed:
(1)โ| A - Z D Z' | / ( |A| n ulp )(2)โ| I - Z Z' | / ( n ulp )(3)โ| D1 - D2 | / ( |D1| ulp )
where Z is the matrix of eigenvectors returned when the eigenvector option is given, and D1 and D2 are the eigenvalues returned with and without the eigenvector option. That's the tea. โ
The [blank] are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size. The [blank] are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type [blank] 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 eigenvalues1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1)(4)โ A diagonal matrix with geometrically spaced eigenvalues1, ..., ULPand random signs.(5)โ A diagonal matrix with [blank] eigenvalues1, ULP, ..., ULPand random signs.(6)โ Same as(4), but multiplied bySQRT( overflow threshold ).(7)โ Same as(4), but multiplied bySQRT( underflow threshold ).(8)โ A matrix of the formU' D U, whereUis orthogonal andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal.(9)โ A matrix of the formU' D U, whereUis orthogonal andDhas geometrically spaced entries1, ..., ULPwith random signs on the diagonal.(10)โ A matrix of the formU' D U, whereUis orthogonal andDhas [blank] entries1, ULP,..., ULPwith random signs on the diagonal.(11)โ Same as(8), but multiplied bySQRT( overflow threshold ).(12)โ Same as(8), but multiplied bySQRT( underflow threshold ).(13)โ Symmetric matrix with random entries chosen from(-1,1).(14)โ Same as(13), but multiplied bySQRT( overflow threshold ).(15)โ Same as(13), but multiplied bySQRT( underflow threshold ).(16)โ A band matrix with half bandwidth randomly chosen between0andN-1, with evenly spaced eigenvalues1, ..., ULPwith random signs.(17)โ Same as(16), but multiplied bySQRT( overflow threshold ).(18)โ Same as(16), but multiplied bySQRT( underflow threshold ).NSIZESโINTEGER. The number of sizes of matrices to use. If it's zero,SDRVSTliterally does nothing (iconic lazy queen behavior ๐ค). It must be at least zero. Not modified.NNโINTEGER array, dimension (NSIZES). An array holding the sizes to use for the matrices. Zero values get skipped. The values must be at least zero. Not modified. ๐ฏNTYPESโINTEGER. The number of elements inDOTYPE. If it's zero,SDRVSTdoes nothing. It must be at least zero. If it'sMAXTYP+1andNSIZESis 1, then an extra type,MAXTYP+1, is defined โ and that one is "use whatever matrix is already inA." This is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE.. Not modified. โจ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. Not modified. ๐ISEEDโINTEGER array, dimension (4). On entry,ISEEDspecifies the seed of the random number generator. The array elements should be between 0 and 4095; if not, they will be reduced mod 4096. 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 toSDRVSTto continue the same random number sequence. Modified. ๐THRESHโREAL. A test will count as a fail if the error, computed as described above, exceedsTHRESH. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of 1, e.g., 10 or 100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero. Not modified. ๐ฆNOUNITโINTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to 0). Not modified. ๐AโREAL array, dimension (LDA , max(NN)). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. Modified. ๐LDAโINTEGER. The leading dimension ofA. It must be at least 1 and at leastmax( NN ). Not modified.D1โREAL array, dimension (max(NN)). The eigenvalues ofA, as computed bySSTEQRsimultaneously withZ. On exit, the eigenvalues inD1correspond with the matrix inA. Modified.D2โREAL array, dimension (max(NN)). The eigenvalues ofA, as computed bySSTEQRifZis not computed. On exit, the eigenvalues inD2correspond with the matrix inA. Modified.D3โREAL array, dimension (max(NN)). The eigenvalues ofA, as computed bySSTERF. On exit, the eigenvalues inD3correspond with the matrix inA. Modified.D4โREAL array, dimension. (Yep, the source really just says "dimension" and leaves it at that โ iconic minimalism ๐)EVEIGSโREAL array, dimension (max(NN)). The eigenvalues as computed bySSTEV('N', ... )(I reserve the right to change this to the output of whichever algorithm computes the most accurate eigenvalues).WA1โREAL array, dimension.WA2โREAL array, dimension.WA3โREAL array, dimension.UโREAL array, dimension (LDU, max(NN)). The orthogonal matrix computed bySSYTRD+SORGTR. Modified. ๐ฆLDUโINTEGER. The leading dimension ofU,Z, andV. It must be at least 1 and at leastmax( NN ). Not modified.VโREAL array, dimension (LDU, max(NN)). The Householder vectors computed bySSYTRDin reducingAto tridiagonal form. Modified.TAUโREAL array, dimension (max(NN)). The Householder factors computed bySSYTRDin reducingAto tridiagonal form. Modified.ZโREAL array, dimension (LDU, max(NN)). The orthogonal matrix of eigenvectors computed bySSTEQR,SPTEQR, andSSTEIN. Modified.WORKโREAL array, dimension (LWORK). Workspace. Modified.LWORKโINTEGER. The number of entries inWORK. This must be at least
1 + 4 * Nmax + 2 * Nmax * lg Nmax + 4 * Nmax**2
where Nmax = max( NN(j), 2 ) and lg = log base 2. Not modified. ๐งฎ
IWORKโINTEGER array, dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )whereNmax = max( NN(j), 2 )andlg = log base 2. Workspace. Modified.RESULTโREAL array, dimension (105). The values computed by the tests described above. The values are currently limited to1/ulp, to avoid overflow. Modified. ๐ฅINFOโINTEGER. If 0, then everything ran OK. Otherwise:-1:NSIZES < 0-2: SomeNN(j) < 0-3:NTYPES < 0-5:THRESH < 0-9:LDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-16:LDU < 1orLDU < NMAX.-21:LWORKtoo small.
If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF, or SORMTR returns an error code, the absolute value of it is returned. Modified. ๐ญ
๐งฉ Some Local Variables and Parameters
---- ----- --------- --- ----------
ZERO,ONEโ Real 0 and 1.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.NMAXโ Largest value inNN.NMATSโ The number of matrices generated so far.NERRSโ The number of tests which have exceededTHRESHso far (computed bySLAFTS).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.KTYPE(j)โ The general type (1-10) for type<j>.KMODE(j)โ TheMODEvalue to be passed to the matrix generator for type<j>.KMAGN(j)โ The order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) ).
๐งช The tests performed are: Routine tested
1= | A - U S U' | / ( |A| n ulp )โSSTEV('V', ... )2= | I - U U' | / ( n ulp )โSSTEV('V', ... )3= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSTEV('N', ... )4= | A - U S U' | / ( |A| n ulp )โSSTEVX('V','A', ... )5= | I - U U' | / ( n ulp )โSSTEVX('V','A', ... )6= |D(with Z) - EVEIGS| / (|D| ulp)โSSTEVX('N','A', ... )7= | A - U S U' | / ( |A| n ulp )โSSTEVR('V','A', ... )8= | I - U U' | / ( n ulp )โSSTEVR('V','A', ... )9= |D(with Z) - EVEIGS| / (|D| ulp)โSSTEVR('N','A', ... )10= | A - U S U' | / ( |A| n ulp )โSSTEVX('V','I', ... )11= | I - U U' | / ( n ulp )โSSTEVX('V','I', ... )12= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSTEVX('N','I', ... )13= | A - U S U' | / ( |A| n ulp )โSSTEVX('V','V', ... )14= | I - U U' | / ( n ulp )โSSTEVX('V','V', ... )15= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSTEVX('N','V', ... )16= | A - U S U' | / ( |A| n ulp )โSSTEVD('V', ... )17= | I - U U' | / ( n ulp )โSSTEVD('V', ... )18= |D(with Z) - EVEIGS| / (|D| ulp)โSSTEVD('N', ... )19= | A - U S U' | / ( |A| n ulp )โSSTEVR('V','I', ... )20= | I - U U' | / ( n ulp )โSSTEVR('V','I', ... )21= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSTEVR('N','I', ... )22= | A - U S U' | / ( |A| n ulp )โSSTEVR('V','V', ... )23= | I - U U' | / ( n ulp )โSSTEVR('V','V', ... )24= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSTEVR('N','V', ... )
25= | A - U S U' | / ( |A| n ulp )โSSYEV('L','V', ... )26= | I - U U' | / ( n ulp )โSSYEV('L','V', ... )27= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEV('L','N', ... )28= | A - U S U' | / ( |A| n ulp )โSSYEVX('L','V','A', ... )29= | I - U U' | / ( n ulp )โSSYEVX('L','V','A', ... )30= |D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVX('L','N','A', ... )
okay so weโre picking up mid-list, bestie โ no context reset, just numbers and vibes. ๐ the test list keeps rolling:
- 31=
| A - U S U' | / ( |A| n ulp )โSSYEVX('L','V','I', ... ) - 32=
| I - U U' | / ( n ulp )โSSYEVX('L','V','I', ... ) - 33=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVX('L','N','I', ... ) - 34=
| A - U S U' | / ( |A| n ulp )โSSYEVX('L','V','V', ... ) - 35=
| I - U U' | / ( n ulp )โSSYEVX('L','V','V', ... ) - 36=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVX('L','N','V', ... ) - 37=
| A - U S U' | / ( |A| n ulp )โSSPEV('L','V', ... ) - 38=
| I - U U' | / ( n ulp )โSSPEV('L','V', ... ) - 39=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEV('L','N', ... ) - 40=
| A - U S U' | / ( |A| n ulp )โSSPEVX('L','V','A', ... ) - 41=
| I - U U' | / ( n ulp )โSSPEVX('L','V','A', ... ) - 42=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVX('L','N','A', ... ) - 43=
| A - U S U' | / ( |A| n ulp )โSSPEVX('L','V','I', ... ) - 44=
| I - U U' | / ( n ulp )โSSPEVX('L','V','I', ... ) - 45=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVX('L','N','I', ... ) - 46=
| A - U S U' | / ( |A| n ulp )โSSPEVX('L','V','V', ... ) - 47=
| I - U U' | / ( n ulp )โSSPEVX('L','V','V', ... ) - 48=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVX('L','N','V', ... ) - 49=
| A - U S U' | / ( |A| n ulp )โSSBEV('L','V', ... ) - 50=
| I - U U' | / ( n ulp )โSSBEV('L','V', ... ) - 51=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEV('L','N', ... ) - 52=
| A - U S U' | / ( |A| n ulp )โSSBEVX('L','V','A', ... ) - 53=
| I - U U' | / ( n ulp )โSSBEVX('L','V','A', ... ) - 54=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVX('L','N','A', ... ) - 55=
| A - U S U' | / ( |A| n ulp )โSSBEVX('L','V','I', ... ) - 56=
| I - U U' | / ( n ulp )โSSBEVX('L','V','I', ... ) - 57=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVX('L','N','I', ... ) - 58=
| A - U S U' | / ( |A| n ulp )โSSBEVX('L','V','V', ... ) - 59=
| I - U U' | / ( n ulp )โSSBEVX('L','V','V', ... ) - 60=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVX('L','N','V', ... ) - 61=
| A - U S U' | / ( |A| n ulp )โSSYEVD('L','V', ... ) - 62=
| I - U U' | / ( n ulp )โSSYEVD('L','V', ... ) - 63=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVD('L','N', ... ) - 64=
| A - U S U' | / ( |A| n ulp )โSSPEVD('L','V', ... ) - 65=
| I - U U' | / ( n ulp )โSSPEVD('L','V', ... ) - 66=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVD('L','N', ... ) - 67=
| A - U S U' | / ( |A| n ulp )โSSBEVD('L','V', ... ) - 68=
| I - U U' | / ( n ulp )โSSBEVD('L','V', ... ) - 69=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVD('L','N', ... ) - 70=
| A - U S U' | / ( |A| n ulp )โSSYEVR('L','V','A', ... ) - 71=
| I - U U' | / ( n ulp )โSSYEVR('L','V','A', ... ) - 72=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVR('L','N','A', ... ) - 73=
| A - U S U' | / ( |A| n ulp )โSSYEVR('L','V','I', ... ) - 74=
| I - U U' | / ( n ulp )โSSYEVR('L','V','I', ... ) - 75=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVR('L','N','I', ... ) - 76=
| A - U S U' | / ( |A| n ulp )โSSYEVR('L','V','V', ... ) - 77=
| I - U U' | / ( n ulp )โSSYEVR('L','V','V', ... ) - 78=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSYEVR('L','N','V', ... )
Tests 25 through 78 are repeated (as tests 79 through 132) with UPLO='U'. yes bestie, the whole block gets a sequel. ๐
To be added in 1999 โ iconic time capsule, no notes:
- 79=
| A - U S U' | / ( |A| n ulp )โSSPEVR('L','V','A', ... ) - 80=
| I - U U' | / ( n ulp )โSSPEVR('L','V','A', ... ) - 81=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVR('L','N','A', ... ) - 82=
| A - U S U' | / ( |A| n ulp )โSSPEVR('L','V','I', ... ) - 83=
| I - U U' | / ( n ulp )โSSPEVR('L','V','I', ... ) - 84=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVR('L','N','I', ... ) - 85=
| A - U S U' | / ( |A| n ulp )โSSPEVR('L','V','V', ... ) - 86=
| I - U U' | / ( n ulp )โSSPEVR('L','V','V', ... ) - 87=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSPEVR('L','N','V', ... ) - 88=
| A - U S U' | / ( |A| n ulp )โSSBEVR('L','V','A', ... ) - 89=
| I - U U' | / ( n ulp )โSSBEVR('L','V','A', ... ) - 90=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVR('L','N','A', ... ) - 91=
| A - U S U' | / ( |A| n ulp )โSSBEVR('L','V','I', ... ) - 92=
| I - U U' | / ( n ulp )โSSBEVR('L','V','I', ... ) - 93=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVR('L','N','I', ... ) - 94=
| A - U S U' | / ( |A| n ulp )โSSBEVR('L','V','V', ... ) - 95=
| I - U U' | / ( n ulp )โSSBEVR('L','V','V', ... ) - 96=
|D(with Z) - D(w/o Z)| / (|D| ulp)โSSBEVR('L','N','V', ... )
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 449 of file sdrvst.f.
โจ Author (the Doxygen one) โจ
Generated automatically by Doxygen for LAPACK from the source code.
okay bye bestie! footer flex: LAPACK Version 3.12.0, source TESTING/EIG/sdrvst.f(3), generated automatically by Doxygen โ date: whatever Doxygen stamped when it generated this beauty. mwah ๐๐
๐ฆ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 ยท custom
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms