DDRVSG2STG(3)
π NAME π
DDRVSG2STG(3) from the Library Functions Manual β the file is /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/ddrvsg2stg.f π¦
πΈ SYNOPSIS πΈ
Functions/Subroutines β¨
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)
DDRVSG2STG
π«Ά 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
Purpose π₯
Okay bestie, so DDRVSG2STG checks the real symmetric generalized eigenproblem drivers. That's the whole assignment, and it ate. π
The drivers in question are:
DSYGVcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem.DSYGVDcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem using a divide and conquer algorithm.DSYGVXcomputes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem.DSPGVcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage.DSPGVDcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage using a divide and conquer algorithm.DSPGVXcomputes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite generalized eigenproblem in packed storage.DSBGVcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem.DSBGVDcomputes all eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem using a divide and conquer algorithm.DSBGVXcomputes selected eigenvalues and, optionally, eigenvectors of a real symmetric-definite banded generalized eigenproblem.
When DDRVSG2STG is called, a number of matrix () and a number of matrix 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. π
Not me keeping those literal blanks in βmatrix ()β and βsize ()β β the source has them, so they stay. No cap. π
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 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. 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
Part 2 is still coming, so don't go anywhere β this page keeps going π
okay so picking up right where we left off, mid argument-list, no dramatic entrance needed π here's the rest of the parameters, and yeah there's a lot of them β hydrate first π
NSIZESβ INTEGER β how many matrix sizes you're gonna throw at this thing. If it's zero,DDRVSG2STGliterally does nothing (iconic minimalism). Must be at least zero. Not modified.NNβ INTEGER array, dimension (NSIZES) β the actual sizes to use for the matrices. Zero values get skipped, no cap. The values must be at least zero. Not modified.NTYPESβ INTEGER β the number of elements inDOTYPE. If it's zero,DDRVSG2STGdoes nothing (again! it's giving "boundaries"). Must be at least zero. And here's the spicy part: if it'sMAXTYP+1andNSIZESis 1, then an extra type,MAXTYP+1, gets defined β which is "use whatever matrix is already sitting 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 every size inNNa matrix of that size and of typejgets generated. IfNTYPESis smaller than the max number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwill not be generated. IfNTYPESis bigger thanMAXTYP, thenDOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)get ignored (sorry babes, off the list). Not modified.ISEEDβ INTEGER array, dimension (4) β on entry,ISEEDsets the seed of the random number generator. The array elements should be between 0 and 4095; if they're not, they get reducedmod 4096. AlsoISEED(4)must be odd, no exceptions π. The RNG uses a linear congruential sequence limited to small integers, so it should produce machine independent random numbers (slay, portability). The values ofISEEDare changed on exit, and you can use them in the next call toDDRVSG2STGto continue the same random number sequence. Modified.THRESHβ DOUBLE PRECISION β "A test will count as if the , computed as described above, exceeds THRESH." β ngl the source page has a lil gap right there, that's not me being lazy π«Ά. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of 1, like 10 or 100. 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 used for printing out error messages (like, say, if a routine returnsIINFOnot equal to 0). 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 β the leading dimension ofAandAB. Must be at least 1, and 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 β the leading dimension ofBandBB. Must be at least 1, and 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 β the leading dimension ofZ. Must be at least 1, and 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 β the number of entries inWORK. This must be at least1+5*N+2*N*lg(N)+3*N**2whereN = max( NN(j) )andlg( N ) = smallest integer k such that 2**k >= N. Not modified.IWORKβ INTEGER array, dimension (LIWORK) β workspace. Modified.LIWORKβ INTEGER β the number of entries inWORK(yes, it saysWORK, that's what the page says, we don't ask questions π€·). This must be at least6*N. Not modified.RESULTβ DOUBLE PRECISION array, dimension (70) β the values computed by the 70 tests described above. Seventy. Seven-zero. 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:LDZ < 1orLDZ < NMAX-21:NWORKtoo small-23:LIWORKtoo small
And if DLATMR, SLATMS, DSYGV, DSPGV, DSBGV, SSYGVD, SSPGVD, DSBGVD, DSYGVX, DSPGVX or SSBGVX returns an error code, the absolute value of it is returned. Modified.
π§ Some Local Variables and Parameters
okay these aren't arguments you pass, they're the internal cast of characters β main character energy for the compiler only:
ZERO,ONEβ real 0 and 1.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.
And the numeric mood board:
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 . (again with the lil gap in the source, love that for us)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 358 of file ddrvsg2stg.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole thing bestie, we ate and left zero crumbs π the whole vibe is LAPACK Version 3.12.0, straight from /home/abui...drvsg2stg.f(3) β go forth and test those symmetric generalized eigenproblems, iykyk π¦β¨
π¦ 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