TESTING/LIN/zdrvrfp.f(3)
π TESTING/LIN/zdrvrfp.f(3) β from the Library Functions Manual π
okay so bestie, buckle up, because this one is a big one β zdrvrfp is the LAPACK testing driver for the RFP (rectangular full packed) routines, and she does NOT do things halfway. β¨
πΈ SYNOPSIS πΈ
Functions/Subroutines:
subroutine zdrvrfp (nout, nn, nval, nns, nsval, nnt, ntval, thresh, a,
asav, afac, ainv, b, bsav, xact, x, arf, arfinv, z_work_zlatms,
z_work_zpot02, z_work_zpot03, d_work_zlatms, d_work_zlanhe,
d_work_zpot01, d_work_zpot02, d_work_zpot03)
ZDRVRFP β that's her, that's the icon. π
β¨ Function/Subroutine Documentation β¨
subroutine zdrvrfp (integer nout, integer nn, integer, dimension( nn ) nval,
integer nns, integer, dimension( nns ) nsval, integer nnt, integer,
dimension( nnt ) ntval, double precision thresh, complex*16, dimension(
* ) a, complex*16, dimension( * ) asav, complex*16, dimension( * ) afac,
complex*16, dimension( * ) ainv, complex*16, dimension( * ) b,
complex*16, dimension( * ) bsav, complex*16, dimension( * ) xact,
complex*16, dimension( * ) x, complex*16, dimension( * ) arf,
complex*16, dimension( * ) arfinv, complex*16, dimension( * )
z_work_zlatms, complex*16, dimension( * ) z_work_zpot02, complex*16,
dimension( * ) z_work_zpot03, double precision, dimension( * )
d_work_zlatms, double precision, dimension( * ) d_work_zlanhe, double
precision, dimension( * ) d_work_zpot01, double precision, dimension( *
) d_work_zpot02, double precision, dimension( * ) d_work_zpot03)
ZDRVRFP π
π¦ Purpose π¦
okay so what does she actually do? ZDRVRFP tests the LAPACK RFP routines:
ZPFTRFZPFTRSZPFTRI
She's running the exact same tests as ZDRVPO (which is the test for the full format Symmetric Positive Definite solver) β no cap, same energy, different format.
Here's the twist that makes it make sense: the tests themselves are performed in Full Format, and conversion back and forth from full format to RFP format is handled by ZTRTTF and ZTFTTR. So basically she dresses full-format in RFP clothes and back again, slay. π
First up, a specific matrix A of size N is created. There are nine types of different matrixes possible, and yes, all nine are iconic in their own way:
- Diagonal
- Random, CNDNUM = 2
- First row and column zero *
- Last row and column zero *
- Middle row and column zero *
and on the other side:
- Random, CNDNUM = sqrt(0.1/EPS)
- Random, CNDNUM = 0.1/EPS
- Scaled near underflow
- Scaled near overflow
(* β these ones test error exits from ZPFTRF, and no test ratios are computed for them. They're the chaos gremlins of the group. π)
A solution XACT of size N-by-NRHS is created and the associated right hand side B as well. Then ZPFTRF is called to compute L (or U), the Cholesky factor of A. Then L (or U) is used to solve the linear system of equations AX = B. That gives you X. Then L (or U) is used to compute the inverse of A, AINV. And then β drumroll β the following four tests are performed:
norm( L*L' - A ) / ( N * norm(A) * EPS )ornorm( U'*U - A ) / ( N * norm(A) * EPS )norm(B - A*X) / ( norm(A) * norm(X) * EPS )norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
where EPS is the machine precision, RCOND the condition number of A, and norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4). π the way that's so precise.
Errors occur when the INFO parameter is not as expected. Failures occur when a test ratio is greater than THRES. periodt.
π§ Parameters π§
NOUTβNOUT is INTEGER. The unit number for output. your output goes here bestie π«ΆNNβNN is INTEGER. The number of values of N contained in the vectorNVAL.NVALβNVAL is INTEGER array, dimension (NN). The values of the matrix dimension N.NNSβNNS is INTEGER. The number of values of NRHS contained in the vectorNSVAL.NSVALβNSVAL is INTEGER array, dimension (NNS). The values of the number of right-hand sides NRHS.NNTβNNT is INTEGER. The number of values of MATRIX TYPE contained in the vectorNTVAL.NTVALβNTVAL is INTEGER array, dimension (NNT). The values of matrix type (between 0 and 9 for PO/PP/PF matrices).THRESHβTHRESH is DOUBLE PRECISION. The threshold value for the test ratios. A result is included in the output file ifRESULT >= THRESH. To have every test ratio printed, useTHRESH = 0. (yes, zero, all of them, no filter, main character energy π)AβA is COMPLEX*16 array, dimension (NMAX*NMAX)ASAVβASAV is COMPLEX*16 array, dimension (NMAX*NMAX)AFACβAFAC is COMPLEX*16 array, dimension (NMAX*NMAX)AINVβAINV is COMPLEX*16 array, dimension (NMAX*NMAX)BβB is COMPLEX*16 array, dimension (NMAX*MAXRHS)BSAVβBSAV is COMPLEX*16 array, dimension (NMAX*MAXRHS)XACTβXACT is COMPLEX*16 array, dimension (NMAX*MAXRHS)XβX is COMPLEX*16 array, dimension (NMAX*MAXRHS)ARFβARF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)ARFINVβARFINV is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)Z_WORK_ZLATMSβZ_WORK_ZLATMS is COMPLEX*16 array, dimension ( 3*NMAX )Z_WORK_ZPOT02βZ_WORK_ZPOT02 is COMPLEX*16 array, dimension ( NMAX*MAXRHS )Z_WORK_ZPOT03βZ_WORK_ZPOT03 is COMPLEX*16 array, dimension ( NMAX*NMAX )D_WORK_ZLATMSβD_WORK_ZLATMS is DOUBLE PRECISION array, dimension ( NMAX )D_WORK_ZLANHEβD_WORK_ZLANHE is DOUBLE PRECISION array, dimension ( NMAX )D_WORK_ZPOT01βD_WORK_ZPOT01 is DOUBLE PRECISION array, dimension ( NMAX )D_WORK_ZPOT02βD_WORK_ZPOT02 is DOUBLE PRECISION array, dimension ( NMAX )D_WORK_ZPOT03βD_WORK_ZPOT03 is DOUBLE PRECISION array, dimension ( NMAX )
like, that's a LOT of workspace arrays and honestly? respect. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 238 of file zdrvrfp.f.
β Author (the meta one) β
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole page bestie, iykyk π β this little beauty comes to you from LAPACK, Version 3.12.0, on the TESTING/LIN/zdrvrfp.f(3) page, fr fr. go take a nap now, you've earned it πΈπ
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms