DDRVSG2STG(3)
π NAME π
TESTING/EIG/ddrvsg2stg.f β bestie, this is the page for TESTING/EIG/ddrvsg2stg.f, from the Library Functions Manual, aka TESTING/EIG/ddrvsg2stg.f(3). Itβs giving βtest routine for the real symmetric generalized eigenproblem driversβ energy, and weβre gonna get through every single detail together. π
β¨ SYNOPSIS β¨
π«Ά Functions/Subroutines
subroutine ddrvsg2stg (...)β the one and onlyDDRVSG2STG, no cap.
subroutine ddrvsg2stg (nsizes, nn, ntypes, dotype, iseed, thresh,
nounit, a, lda, b, ldb, d, d2, z, ldz, ab, bb, ap, bp, work, nwork,
iwork, liwork, result, info)
πΈ Function/Subroutine Documentation πΈ
π subroutine ddrvsg2stg π
subroutine ddrvsg2stg (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( ldb, * ) b,
integer ldb, double precision, dimension( * ) d, double precision,
dimension( * ) d2, double precision, dimension( ldz, * ) z, integer ldz,
double precision, dimension( lda, * ) ab, double precision, dimension(
ldb, * ) bb, double precision, dimension( * ) ap, double precision,
dimension( * ) bp, double precision, dimension( * ) work, integer nwork,
integer, dimension( * ) iwork, integer liwork, double precision,
dimension( * ) result, integer info)
DDRVSG2STG β say it with your chest, bestie. π
π¦ Purpose π¦
Okay so DDRVSG2STG checks the real symmetric generalized eigenproblem drivers. Like, itβs the vibe-checker for the whole driver friend group:
DSYGVβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem.DSYGVDβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem using a divide and conquer algorithm.DSYGVXβ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem.DSPGVβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage.DSPGVDβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage using a divide and conquer algorithm.DSPGVXβ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage.DSBGVβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem.DSBGVDβ computes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem using a divide and conquer algorithm.DSBGVXβ computes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem.
When DDRVSG2STG is called, a number of matrix sizes (()) and a number of matrix types (()) are specified. For each size (()) and each type of matrix, one matrix A of the given type will be generated; a random well-conditioned matrix B is also generated and the pair (A,B) is used to test the drivers. π«Ά
For each pair (A,B), the following tests are performed:
(1)βDSYGVwithITYPE = 1andUPLO ='U':
| A Z - B Z D | / ( |A| |Z| n ulp )
| D - D2 | / ( |D| ulp ) where D is computed by
DSYGV and D2 is computed by
DSYGV_2STAGE. This test is
only performed for DSYGV
(2)β as(1)but callingDSPGV(3)β as(1)but callingDSBGV(4)β as(1)but withUPLO = 'L'(5)β as(4)but callingDSPGV(6)β as(4)but callingDSBGV(7)βDSYGVwithITYPE = 2andUPLO ='U':
| A B Z - Z D | / ( |A| |Z| n ulp )
(8)β as(7)but callingDSPGV(9)β as(7)but withUPLO = 'L'(10)β as(9)but callingDSPGV(11)βDSYGVwithITYPE = 3andUPLO ='U':
| B A Z - Z D | / ( |A| |Z| n ulp )
(12)β as(11)but callingDSPGV(13)β as(11)but withUPLO = 'L'(14)β as(13)but callingDSPGV
DSYGVD, DSPGVD and DSBGVD performed the same 14 tests.
DSYGVX, DSPGVX and DSBGVX performed the above 14 tests with the parameter RANGE = 'A', 'N' and 'I', respectively.
The sizes are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size. The types are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type j will be generated. This type is used for the matrix A which has half-bandwidth KA. B is generated as a well-conditioned positive definite matrix with half-bandwidth KB (<= KA). Currently, the list of possible types for A is:
(1)β The zero matrix.(2)β The identity matrix.(3)β A diagonal matrix with evenly spaced entries1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1)(4)β A diagonal matrix with geometrically spaced entries1, ..., ULPand random signs.(5)β A diagonal matrix with entries1, 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 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)β Same as(8), but withKA = 1andKB = 1(17)β Same as(8), but withKA = 2andKB = 1(18)β Same as(8), but withKA = 2andKB = 2(19)β Same as(8), but withKA = 3andKB = 1(20)β Same as(8), but withKA = 3andKB = 2(21)β Same as(8), but withKA = 3andKB = 3
okay bestie, we're back in the argument zone and it's giving main character energy π every single parameter is here, no cap. iykyk. let's go π«Ά
NSIZES(INTEGER) β how many matrix sizes we're testing. if it's zero,DDRVSG2STGliterally does nothing, like, at all. must be at least zero. not modified. β¨NN(INTEGER array, dimension (NSIZES)) β the actual sizes for the matrices. zero values get skipped, and every value has to be at least zero. not modified. πNTYPES(INTEGER) β number of elements inDOTYPE. if it's zero,DDRVSG2STGdoes nothing. must be at least zero. special case: if it'sMAXTYP+1andNSIZESis1, then an extra type,MAXTYP+1, is defined β it means "use whatever matrix is 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 typejgets generated. ifNTYPESis smaller than the max number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwon't be generated. ifNTYPESis larger thanMAXTYP, thenDOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)get ignored. not modified. πΈISEED(INTEGER array, dimension (4)) β on entry, this is the seed for the random number generator. elements should be between0and4095; if not, they get reduced mod4096. alsoISEED(4)must be odd. the RNG uses a linear congruential sequence limited to small integers, so it should produce machine independent random numbers. the values ofISEEDchange on exit, and you can use them in the next call toDDRVSG2STGto continue the same random number sequence. modified. π₯THRESH(DOUBLE PRECISION) β okay, the page says, and I quote: "A test will count as if the , computed as described above, exceeds THRESH." (yes, that's literally what it says, no cap π). 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. 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 to0.) not modified. πA(DOUBLE PRECISION array, dimension (LDA , max(NN))) β holds the matrix whose eigenvalues are to be computed. on exit,Acontains the last matrix actually used. modified. πLDA(INTEGER) β leading dimension ofAandAB. must be at least1and at leastmax( NN ). not modified. π§B(DOUBLE PRECISION array, dimension (LDB , max(NN))) β holds the symmetric positive definite matrix for the generalized problem. on exit,Bcontains the last matrix actually used. modified. πLDB(INTEGER) β leading dimension ofBandBB. must be at least1and at leastmax( NN ). not modified. βD(DOUBLE PRECISION array, dimension (max(NN))) β the eigenvalues ofA. on exit, the eigenvalues inDcorrespond with the matrix inA. modified. πZ(DOUBLE PRECISION array, dimension (LDZ, max(NN))) β the matrix of eigenvectors. modified. π¦LDZ(INTEGER) β leading dimension ofZ. must be at least1and at leastmax( NN ). not modified. πAB(DOUBLE PRECISION array, dimension (LDA, max(NN))) β workspace. modified. β¨BB(DOUBLE PRECISION array, dimension (LDB, max(NN))) β workspace. modified. β¨AP(DOUBLE PRECISION array, dimension (max(NN)**2)) β workspace. modified. β¨BP(DOUBLE PRECISION array, dimension (max(NN)**2)) β workspace. modified. β¨WORK(DOUBLE PRECISION array, dimension (NWORK)) β workspace. modified. β¨NWORK(INTEGER) β number of entries inWORK. must be at least1+5*N+2*N*lg(N)+3*N**2whereN = max( NN(j) )andlg( N )is the smallest integerksuch that2**k >= N. not modified. πIWORK(INTEGER array, dimension (LIWORK)) β workspace. modified. β¨LIWORK(INTEGER) β number of entries inWORK. must be at least6*N. not modified. π (yes it saysWORK, notIWORKβ that's the page, bestie, I don't make the rules)RESULT(DOUBLE PRECISION array, dimension (70)) β the values computed by the70tests described above. modified. π₯INFO(INTEGER) β if0, 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:LDZ < 1orLDZ < NMAX.-21:NWORKtoo small.-23:LIWORKtoo small. ifDLATMR,SLATMS,DSYGV,DSPGV,DSBGV,SSYGVD,SSPGVD,DSBGVD,DSYGVX,DSPGVXorSSBGVXreturns an error code, the absolute value of it is returned. modified. π
Some Local Variables and Parameters
ZERO,ONEβ real0and1. πMAXTYPβ the number of types defined.NTESTβ the number of tests that have been run on this matrix.NTESTTβ the total number of tests for this call.NMAXβ largest value inNN.NMATSβ the number of matrices generated so far.NERRSβ the number of tests which have exceededTHRESHso far (computed byDLAFTS).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 previous2values.- the following four arrays decode
JTYPE:KTYPE(j)β the general type (1-10) for type . (yes, it ends with "for type ." β that's what it says π)KMODE(j)β theMODEvalue to be passed to the matrix generator for type . (same vibe)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 358 of file ddrvsg2stg.f. π
π€ Author (the Doxygen one)
Generated automatically by Doxygen for LAPACK from the source code. β¨
okay bestie, that's the whole entire page! no cap, every single detail is here. this icon is from LAPACK Version 3.12.0, source file TESTING/EIG/ddrvsg2stg.f(3) β and the footer doesn't give a date, but you know it's serving. periodt πβ¨π
π¦ 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