DDRVSG2STG(3)

πŸ“¦
version 3.12.1 Β· 2 versions
, in arch rolling

πŸŽ€ 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 only DDRVSG2STG, 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) β€” DSYGV with ITYPE = 1 and UPLO ='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 calling DSPGV
  • (3) β€” as (1) but calling DSBGV
  • (4) β€” as (1) but with UPLO = 'L'
  • (5) β€” as (4) but calling DSPGV
  • (6) β€” as (4) but calling DSBGV
  • (7) β€” DSYGV with ITYPE = 2 and UPLO ='U':
| A B Z - Z D | / ( |A| |Z| n ulp )
  • (8) β€” as (7) but calling DSPGV
  • (9) β€” as (7) but with UPLO = 'L'
  • (10) β€” as (9) but calling DSPGV
  • (11) β€” DSYGV with ITYPE = 3 and UPLO ='U':
| B A Z - Z D | / ( |A| |Z| n ulp )
  • (12) β€” as (11) but calling DSPGV
  • (13) β€” as (11) but with UPLO = 'L'
  • (14) β€” as (13) but calling DSPGV

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 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 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 entries 1, ..., ULP with random signs on the diagonal.
  • (9) β€” A matrix of the form U* D U, where U is orthogonal and D has geometrically spaced entries 1, ..., ULP with random signs on the diagonal.
  • (10) β€” A matrix of the form U* D U, where U is orthogonal and D has entries 1, ULP,..., ULP with 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 with KA = 1 and KB = 1
  • (17) β€” Same as (8), but with KA = 2 and KB = 1
  • (18) β€” Same as (8), but with KA = 2 and KB = 2
  • (19) β€” Same as (8), but with KA = 3 and KB = 1
  • (20) β€” Same as (8), but with KA = 3 and KB = 2
  • (21) β€” Same as (8), but with KA = 3 and KB = 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, DDRVSG2STG literally 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 in DOTYPE. if it's zero, DDRVSG2STG does nothing. must be at least zero. special case: if it's MAXTYP+1 and NSIZES is 1, then an extra type, MAXTYP+1, is defined β€” it means "use whatever matrix is in A." this is only useful if DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . not modified. πŸ¦‹
  • DOTYPE (LOGICAL array, dimension (NTYPES)) β€” if DOTYPE(j) is .TRUE., then for each size in NN a matrix of that size and type j gets generated. if NTYPES is smaller than the max number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP won't be generated. if NTYPES is larger than MAXTYP, then DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) get ignored. not modified. 🌸
  • ISEED (INTEGER array, dimension (4)) β€” on entry, this is the seed for the random number generator. elements should be between 0 and 4095; if not, they get reduced mod 4096. also ISEED(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 of ISEED change on exit, and you can use them in the next call to DDRVSG2STG to 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 be O(1), so THRESH should 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. must be at least zero. not modified. πŸ‘‘
  • NOUNIT (INTEGER) β€” the FORTRAN unit number for printing out error messages (e.g., if a routine returns IINFO not equal to 0.) not modified. πŸ’œ
  • A (DOUBLE PRECISION array, dimension (LDA , max(NN))) β€” holds the matrix whose eigenvalues are to be computed. on exit, A contains the last matrix actually used. modified. πŸ“
  • LDA (INTEGER) β€” leading dimension of A and AB. must be at least 1 and at least max( NN ). not modified. 🧚
  • B (DOUBLE PRECISION array, dimension (LDB , max(NN))) β€” holds the symmetric positive definite matrix for the generalized problem. on exit, B contains the last matrix actually used. modified. πŸ’–
  • LDB (INTEGER) β€” leading dimension of B and BB. must be at least 1 and at least max( NN ). not modified. ⭐
  • D (DOUBLE PRECISION array, dimension (max(NN))) β€” the eigenvalues of A. on exit, the eigenvalues in D correspond with the matrix in A. modified. 🌈
  • Z (DOUBLE PRECISION array, dimension (LDZ, max(NN))) β€” the matrix of eigenvectors. modified. πŸ¦‹
  • LDZ (INTEGER) β€” leading dimension of Z. must be at least 1 and at least max( 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 in WORK. must be at least 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and lg( N ) is the smallest integer k such that 2**k >= N. not modified. πŸ’…
  • IWORK (INTEGER array, dimension (LIWORK)) β€” workspace. modified. ✨
  • LIWORK (INTEGER) β€” number of entries in WORK. must be at least 6*N. not modified. 😭 (yes it says WORK, not IWORK β€” that's the page, bestie, I don't make the rules)
  • RESULT (DOUBLE PRECISION array, dimension (70)) β€” the values computed by the 70 tests described above. modified. πŸ”₯
  • INFO (INTEGER) β€” if 0, then everything ran OK. otherwise:
    • -1: NSIZES < 0
    • -2: some NN(j) < 0
    • -3: NTYPES < 0
    • -5: THRESH < 0
    • -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
    • -16: LDZ < 1 or LDZ < NMAX.
    • -21: NWORK too small.
    • -23: LIWORK too small. 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

  • 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 in NN.
  • NMATS β€” the number of matrices generated so far.
  • NERRS β€” the number of tests which have exceeded THRESH so far (computed by DLAFTS).
  • COND, IMODE β€” values to be passed to the matrix generators.
  • ANORM β€” norm of A; 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 . (yes, it ends with "for type ." β€” that's what it says 😭)
    • KMODE(j) β€” the MODE value 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