DDRVSG2STG(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’– 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:

  • 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 () 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) β€” 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 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 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

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, DDRVSG2STG literally 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 in DOTYPE. If it's zero, DDRVSG2STG does nothing (again! it's giving "boundaries"). Must be at least zero. And here's the spicy part: if it's MAXTYP+1 and NSIZES is 1, then an extra type, MAXTYP+1, gets defined β€” which is "use whatever matrix is already sitting 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 every size in NN a matrix of that size and of type j gets generated. If NTYPES is smaller than the max number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP will not be generated. If NTYPES is bigger than MAXTYP, then DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) get ignored (sorry babes, off the list). Not modified.
  • ISEED β€” INTEGER array, dimension (4) β€” on entry, ISEED sets the seed of the random number generator. The array elements should be between 0 and 4095; if they're not, they get reduced mod 4096. Also ISEED(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 of ISEED are changed on exit, and you can use them in the next call to DDRVSG2STG to 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 be O(1), so THRESH should 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 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 β€” the 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 β€” the 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 β€” the 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 β€” the number of entries in WORK. This must be at least 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and lg( N ) = smallest integer k such that 2**k >= N. Not modified.
  • IWORK β€” INTEGER array, dimension (LIWORK) β€” workspace. Modified.
  • LIWORK β€” INTEGER β€” the number of entries in WORK (yes, it says WORK, that's what the page says, we don't ask questions 🀷). This must be at least 6*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: 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

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 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.

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) β€” the MODE value 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