CDRVSG(3)
๐ cdrvsg.f(3) โ Library Functions Manual ๐
bestie, this is the CDRVSG page, the file is cdrvsg.f, and the header path is /home/abui...IG/cdrvsg.f(3). Library Functions Manual is the manual name, folded in right here so you don't have to parse the raw header line. ๐ซถ
๐ธ NAME ๐ธ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/cdrvsg.f
like, that's literally the NAME section. iconic. ๐
๐ SYNOPSIS ๐
โจ Functions/Subroutines โจ
subroutine CDRVSG (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, b, ldb, d, z, ldz, ab, bb, ap, bp, work, nwork, rwork, lrwork,
iwork, liwork, result, info)
CDRVSG
๐ฆ Function/Subroutine Documentation ๐ฆ
subroutine CDRVSG (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
real thresh, integer nounit, complex, dimension( lda, * ) a, integer
lda, complex, dimension( ldb, * ) b, integer ldb, real, dimension( * )
d, complex, dimension( ldz, * ) z, integer ldz, complex, dimension( lda,
* ) ab, complex, dimension( ldb, * ) bb, complex, dimension( * ) ap,
complex, dimension( * ) bp, complex, dimension( * ) work, integer nwork,
real, dimension( * ) rwork, integer lrwork, integer, dimension( * )
iwork, integer liwork, real, dimension( * ) result, integer info)
CDRVSG
๐ Purpose: ๐
Okay so CDRVSG checks the complex Hermitian generalized eigenproblem drivers. It's giving test-suite main character energy, and here's the driver fam it's checking:
CHEGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem.CHEGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem using a divide and conquer algorithm.CHEGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem.CHPGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage.CHPGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage using a divide and conquer algorithm.CHPGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage.CHBGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem.CHBGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem using a divide and conquer algorithm.CHBGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem.
When CDRVSG 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. obsessed with this setup, ngl.
For each pair (A,B), the following tests are performed:
(1)โCHEGVwithITYPE = 1andUPLO ='U':| A Z - B Z D | / ( |A| |Z| n ulp )(2)โ as(1)but callingCHPGV(3)โ as(1)but callingCHBGV(4)โ as(1)but withUPLO = 'L'(5)โ as(4)but callingCHPGV(6)โ as(4)but callingCHBGV(7)โCHEGVwithITYPE = 2andUPLO ='U':| A B Z - Z D | / ( |A| |Z| n ulp )(8)โ as(7)but callingCHPGV(9)โ as(7)but withUPLO = 'L'(10)โ as(9)but callingCHPGV(11)โCHEGVwithITYPE = 3andUPLO ='U':| B A Z - Z D | / ( |A| |Z| n ulp )(12)โ as(11)but callingCHPGV(13)โ as(11)but withUPLO = 'L'(14)โ as(13)but callingCHPGV
CHEGVD, CHPGVD and CHBGVD performed the same 14 tests. slay.
CHEGVX, CHPGVX and CHBGVX 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 entries 1, ..., ULP and random signs. (ULP = (first number larger than 1) - 1 )(4)A diagonal matrix with geometrically spaced entries 1, ..., ULP and random signs.(5)A diagonal matrix with entries 1, ULP, ..., ULP and 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 unitary andDhas evenly spaced entries 1, ..., ULP with random signs on the diagonal.(9)A matrix of the formU* D U, whereUis unitary andDhas geometrically spaced entries 1, ..., ULP with random signs on the diagonal.(10)A matrix of the formU* D U, whereUis unitary andDhas entries 1, ULP,..., ULP with random signs on the diagonal.(11)Same as(8), but multiplied bySQRT( overflow threshold )(12)Same as(8), but multiplied bySQRT( underflow threshold )(13)Hermitian 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 = 3NSIZESโ INTEGER. This is how many matrix sizes you're gonna throw at it. If it's zero,CDRVSGliterally does nothing (respect, honestly). Gotta be at least zero. Not modified โ she's just reading, not touching. ๐ซถNNโ INTEGER array, dimension(NSIZES). The actual sizes your matrices are gonna be. Zero values get skipped (they're not invited to the party). Every value has to be at least zero. Not modified.NTYPESโ INTEGER. How many elements live inDOTYPE. If it's zero,CDRVSGdoes nothing. Must be at least zero. โ ๏ธ Special little exception: if it'sMAXTYP+1andNSIZESis1, then an extra type โMAXTYP+1โ gets defined, and that one means "just use whatever matrix is already chilling inA". This is only useful whenDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE.. Not modified.DOTYPEโ LOGICAL array, dimension(NTYPES). IfDOTYPE(j)is.TRUE., then for every size inNNyou get a matrix of that size and of typejgenerated. IfNTYPESis smaller than the max number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPjust don't get generated. IfNTYPESis larger thanMAXTYP, thenDOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)get ignored (they're extra, nobody asked). Not modified.ISEEDโ INTEGER array, dimension(4). The random number generator's seed, bestie โ the vibe check for randomness. ๐ฒ On entry, the elements should be between0and4095; if they're not, they get reducedmod 4096. AlsoISEED(4)must be odd (no cap, that's just the rule). The generator uses a linear congruential sequence limited to small integers, so it should produce machine independent random numbers. On exit the values ofISEEDare changed, and you can pass them into the nextCDRVSGcall to continue the same random number sequence. Modified. โจTHRESHโ REAL. A test will count as (the source literally drops a word here, that's just how the page is ๐) if the (same, also blank) โ computed as described above โ exceedsTHRESH. Key deets: the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of1, like, e.g.,10or100. In particular it should not depend on the precision (single vs. double) or on the size of the matrix. Must be at least zero. Not modified.NOUNITโ INTEGER. The FORTRAN unit number used for printing out error messages (e.g., if a routine returnsIINFOnot equal to0). That's where the drama gets reported. Not modified. ๐Aโ COMPLEX array, dimension(LDA, max(NN)). Holds the matrix whose eigenvalues are gonna be computed. On exit,Acontains the last matrix actually used. Modified.LDAโ INTEGER. The leading dimension ofA. It must be at least1and at leastmax( NN ). Not modified.Bโ COMPLEX array, dimension(LDB, max(NN)). Holds the Hermitian positive definite matrix for the generalized problem. On exit,Bcontains the last matrix actually used. Modified.LDBโ INTEGER. The leading dimension ofB. Must be at least1and at leastmax( NN ). Not modified.Dโ REAL array, dimension(max(NN)). The eigenvalues ofA. On exit, the eigenvalues sitting inDcorrespond with the matrix inA. ๐ Modified.Zโ COMPLEX array, dimension(LDZ, max(NN)). The matrix of eigenvectors. Modified.LDZโ INTEGER. The leading dimension ofZZ(yes, the page saysZZโ iconic typo energy, we keep it fr fr). Must be at least1and at leastmax( NN ). Not modified.ABโ COMPLEX array, dimension(LDA, max(NN)). Workspace. Modified.BBโ COMPLEX array, dimension(LDB, max(NN)). Workspace. Modified.APโ COMPLEX array, dimension(max(NN)**2). Workspace. Modified.BPโ COMPLEX array, dimension(max(NN)**2). Workspace. Modified.WORKโ COMPLEX array, dimension(NWORK). Workspace. Modified.NWORKโ INTEGER. How many entries fit inWORK. This must be at least2*N + N**2whereN = max( NN(j), 2 ). Not modified.RWORKโ REAL array, dimension(LRWORK). Workspace. Modified.LRWORKโ INTEGER. How many entries fit inRWORK. Must be at leastmax( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 )whereN = max( NN(j) )andlg( N )= smallest integerksuch that2**k >= N. ๐งฎ Not modified.IWORKโ INTEGER array, dimension(LIWORK))(double paren, we don't question it ๐). Workspace. Modified.LIWORKโ INTEGER. How many entries fit inIWORK. Must be at least2 + 5*max( NN(j) ). Not modified.RESULTโ REAL array, dimension(70). The values computed by the 70 tests described above. Seventy. Iconic number. ๐ Modified.INFOโ INTEGER. If it's0, everything ran OK, slay. 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:LRWORKtoo small.-25:LIWORKtoo small.
And if CLATMR, CLATMS, CHEGV, CHPGV, CHBGV, CHEGVD, CHPGVD, CHPGVD, CHEGVX, CHPGVX, CHBGVX returns an error code, the absolute value of it is returned. Modified.
๐ง Some Local Variables and Parameters ๐ง
(That's literally the heading โ "Some Local Variables and Parameters" โ and the page draws little dashes under it:)
---- ----- --------- --- ----------
ZERO,ONEโ real0and1. Humble. Essential.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 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.
And the following four arrays decode JTYPE (iykyk ๐ซถ):
KTYPE(j)โ the general type (1-10) for type (blank in the source, we leave the gap).KMODE(j)โ theMODEvalue to be passed to the matrix generator for type (again, blank).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 366 of file cdrvsg.f.
๐ธ Author ๐ธ
Generated automatically by Doxygen for LAPACK from the source code. (Not a human, just a very diligent little robot ๐งโจ)
That's the whole thing, bestie โ you made it to the end. ๐ This page is from LAPACK, Version 3.12.0, and its footer path is /home/abui...IG/cdrvsg.f(3). Go forth and test your symmetric generalized eigenvalue routines with confidence. Mwah. ๐๐ฆ
๐ฆ 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