ZDRVBD(3)
π NAME
okay so bestie, welcome to zdrvbd.f(3) β straight outta the Library Functions Manual, and itβs giving βSVD test driver main character energyβ fr fr. π
The file itself is:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/zdrvbd.f
No cap, that path is a whole journey. π€οΈ
bestie, this is part 1 of a long page. Buckle up β the parameters are literally coming.
π SYNOPSIS
π οΈ Functions/Subroutines
subroutine ZDRVBD (nsizes, mm, nn, ntypes, dotype, iseed, thresh, a,
lda, u, ldu, vt, ldvt, asav, usav, vtsav, s, ssav, e, work, lwork,
rwork, iwork, nounit, info)
ZDRVBD
π Function/Subroutine Documentation
Hereβs the full signature, bestie β every type, every dimension, all of it:
subroutine ZDRVBD (integer nsizes, integer, dimension( * ) mm, integer,
dimension( * ) nn, integer ntypes, logical, dimension( * ) dotype,
integer, dimension( 4 ) iseed, double precision thresh, complex*16,
dimension( lda, * ) a, integer lda, complex*16, dimension( ldu, * ) u,
integer ldu, complex*16, dimension( ldvt, * ) vt, integer ldvt,
complex*16, dimension( lda, * ) asav, complex*16, dimension( ldu, * )
usav, complex*16, dimension( ldvt, * ) vtsav, double precision,
dimension( * ) s, double precision, dimension( * ) ssav, double
precision, dimension( * ) e, complex*16, dimension( * ) work, integer
lwork, double precision, dimension( * ) rwork, integer, dimension( * )
iwork, integer nounit, integer info)
ZDRVBD
Thatβs our icon: ZDRVBD. π
π― Purpose
okay so ZDRVBD checks the singular value decomposition (SVD) driver ZGESVD, ZGESDD, ZGESVJ, ZGEJSV, ZGESVDX, and ZGESVDQ. It is lowkey the vibe-check queen for these routines. β¨
ZGESVD and ZGESDD factor A = U diag(S) VT, where U and VT are unitary and diag(S) is diagonal with the entries of the array S on its diagonal. The entries of S are the singular values, nonnegative and stored in decreasing order. U and VT can be optionally not computed, overwritten on A, or computed partially. Periodt.
A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN. U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
When ZDRVBD is called, a number of matrix sizes (Mβs and Nβs) and a number of matrix types are specified. For each size (M,N) and each type of matrix, and for the minimal workspace as well as workspace adequate to permit blocking, an M x N matrix will be generated and used to test the SVD routines. For each matrix, A will be factored as A = U diag(S) VT and the following 12 tests computed:
- Test for
ZGESVD:- (1)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (2)
| I - U'U | / ( M ulp ) - (3)
| I - VT VT' | / ( N ulp ) - (4)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (5)
| U - Upartial | / ( M ulp )whereUpartialis a partially computedU. - (6)
| VT - VTpartial | / ( N ulp )whereVTpartialis a partially computedVT. - (7)
| S - Spartial | / ( MNMIN ulp |S| )whereSpartialis the vector of singular values from the partial SVD
- (1)
- Test for
ZGESDD:- (8)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (9)
| I - U'U | / ( M ulp ) - (10)
| I - VT VT' | / ( N ulp ) - (11)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (12)
| U - Upartial | / ( M ulp )whereUpartialis a partially computedU. - (13)
| VT - VTpartial | / ( N ulp )whereVTpartialis a partially computedVT. - (14)
| S - Spartial | / ( MNMIN ulp |S| )whereSpartialis the vector of singular values from the partial SVD
- (8)
- Test for
ZGESVDQ:- (36)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (37)
| I - U'U | / ( M ulp ) - (38)
| I - VT VT' | / ( N ulp ) - (39)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.)
- (36)
- Test for
ZGESVJ:- (15)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (16)
| I - U'U | / ( M ulp ) - (17)
| I - VT VT' | / ( N ulp ) - (18)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.)
- (15)
- Test for
ZGEJSV:- (19)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (20)
| I - U'U | / ( M ulp ) - (21)
| I - VT VT' | / ( N ulp ) - (22)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.)
- (19)
- Test for
ZGESVDX( 'V', 'V', 'A' )/ZGESVDX( 'N', 'N', 'A' ):- (23)
| A - U diag(S) VT | / ( |A| max(M,N) ulp ) - (24)
| I - U'U | / ( M ulp ) - (25)
| I - VT VT' | / ( N ulp ) - (26)
ScontainsMNMINnonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (27)
| U - Upartial | / ( M ulp )whereUpartialis a partially computedU. - (28)
| VT - VTpartial | / ( N ulp )whereVTpartialis a partially computedVT. - (29)
| S - Spartial | / ( MNMIN ulp |S| )whereSpartialis the vector of singular values from the partial SVD
- (23)
- Test for
ZGESVDX( 'V', 'V', 'I' ):- (30)
| U' A VT''' - diag(S) | / ( |A| max(M,N) ulp ) - (31)
| I - U'U | / ( M ulp ) - (32)
| I - VT VT' | / ( N ulp )
- (30)
- Test for
ZGESVDX( 'V', 'V', 'V' ):- (33)
| U' A VT''' - diag(S) | / ( |A| max(M,N) ulp ) - (34)
| I - U'U | / ( M ulp ) - (35)
| I - VT VT' | / ( N ulp )
- (33)
The sizes are specified by the arrays MM(1:NSIZES) and NN(1:NSIZES); the value of each element pair (MM(j),NN(j)) specifies one size. The types are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type will be generated.
Currently, the list of possible types is:
- The zero matrix.
- The identity matrix.
- A matrix of the form
U D V, whereUandVare unitary andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal. - Same as (3), but multiplied by the underflow-threshold /
ULP. - Same as (3), but multiplied by the overflow-threshold *
ULP.
πΈ Parameters
NSIZES
NSIZES is INTEGER. Itβs the number of sizes of matrices to use. If it is zero, ZDRVBD does nothing. It must be at least zero.
MM
MM is INTEGER array, dimension (NSIZES). An array containing the matrix sizes to be used. For each j=1,...,NSIZES, if MM(j) is zero, then MM(j) and NN(j) will be ignored. The MM(j) values must be at least zero.
NN
NN is INTEGER array, dimension (NSIZES). An array containing the matrix sizes to be used. For each j=1,...,NSIZES, if NN(j) is zero, then MM(j) and NN(j) will be ignored. The NN(j) values must be at least zero.
NTYPES
NTYPES is INTEGER. The number of elements in DOTYPE. If it is zero, ZDRVBD does nothing. It must be at least zero. If it is MAXTYP+1 and NSIZES is 1, then an additional type, MAXTYP+1 is defined, which is to use whatever matrices are in A and B. This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE..
DOTYPE
DOTYPE is LOGICAL array, dimension (NTYPES). If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix of type j will be generated. If NTYPES is smaller than the maximum number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP will not be generated. If NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) will be ignored.
ISEED
ISEED is INTEGER array, dimension (4). On entry ISEED specifies the seed of the random number generator. The array elements should be between 0 and 4095; if not they will be reduced mod 4096. Also, ISEED(4) must be odd. The random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. The values of ISEED are changed on exit, and can be used in the next call to ZDRVBD to continue the same random number sequence.
THRESH
THRESH is DOUBLE PRECISION. A test will count as failed if the error, computed as described above, exceeds THRESH. 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. It must be at least zero.
A
A is COMPLEX*16 array, dimension (LDA,max(NN)). Used to hold the matrix whose singular values are to be computed. On exit, A contains the last matrix actually used.
LDA
LDA is INTEGER. The leading dimension of A. It must be at least 1 and at least max( MM ).
U
U is COMPLEX*16 array, dimension (LDU,max(MM)). Used to hold the computed matrix of right singular vectors. On exit, U contains the last such vectors actually computed.
LDU
LDU is INTEGER. The leading dimension of U. It must be at least 1 and at least max( MM ).
VT
VT is COMPLEX*16 array, dimension (LDVT,max(NN)). Used to hold the computed matrix of left singular vectors. On exit, VT contains the last such vectors actually computed.
LDVTβINTEGER. It's the leading dimension ofVT, bestie. Gotta be at least1and at leastmax( NN ). No cap β¨ASAVβCOMPLEX*16array, dimension(LDA,max(NN)). Holds a different copy of the matrix whose singular values are to be computed. On exit,Acontains the last matrix actually used. (Yes,Aβ that's literally what it says π)USAVβCOMPLEX*16array, dimension(LDU,max(MM)). Holds a different copy of the computed matrix of right singular vectors. On exit,USAVcontains the last such vectors actually computed. πVTSAVβCOMPLEX*16array, dimension(LDVT,max(NN)). Holds a different copy of the computed matrix of left singular vectors. On exit,VTSAVcontains the last such vectors actually computed. π¦SβDOUBLE PRECISIONarray, dimension(max(min(MM,NN))). Contains the computed singular values. Periodt.SSAVβDOUBLE PRECISIONarray, dimension(max(min(MM,NN))). Contains another copy of the computed singular values. Iconic backup behavior.EβDOUBLE PRECISIONarray, dimension(max(min(MM,NN))). Workspace forZGESVD. Slay.WORKβCOMPLEX*16array, dimension(LWORK). The workspace main character.LWORKβINTEGER. The number of entries inWORK. This must be at leastMAX(3*MIN(M,N)+MAX(M,N)**2,5*MIN(M,N),3*MAX(M,N))for all pairs(M,N)=(MM(j),NN(j)). That's the whole vibe check, don't skimp π₯RWORKβDOUBLE PRECISIONarray, dimension( 5*max(max(MM,NN)) ). Real ones know.IWORKβINTEGERarray, dimension at least8*min(M,N). Integer energy only πNOUNITβINTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) Note theIINFO, bestie β that's what it says.INFOβINTEGER. If0, then everything ran OK. But if not, here are the receipts:-1:NSIZES < 0-2: SomeMM(j) < 0-3: SomeNN(j) < 0-4:NTYPES < 0-7:THRESH < 0-10:LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).-12:LDU < 1 or LDU < MMAX.-14:LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).-21:LWORK too small.
If ZLATMS, or ZGESVD returns an error code, the absolute value of it is returned.
π Author
The brain trust, fr fr:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 397 of file zdrvbd.f. That's where the magic lives β¨
β¨ Author
Generated automatically by Doxygen for LAPACK from the source code. So you know it's official π
okay that's the whole parameter glow-up, bestie. This page is serving LAPACK Version 3.12.0, straight from /home/abui...IG/zdrvbd.f(3) β catch you in the source, 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