schkee.f
来自「famous linear algebra library (LAPACK) p」· F 代码 · 共 1,816 行 · 第 1/5 页
F
1,816 行
* line 6: NPARMS, INTEGER
* Number of values of the parameter NRHS
*
* line 7: NSVAL, INTEGER array, dimension (NPARMS)
* The values for the number of right hand sides NRHS.
*
* line 8: THRESH
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* line 9: NEWSD, INTEGER
* A code indicating how to set the random number seed.
* = 0: Set the seed to a default value before each run
* = 1: Initialize the seed to a default value only before the
* first run
* = 2: Like 1, but use the seed values on the next line
*
* If line 9 was 2:
*
* line 10: INTEGER array, dimension (4)
* Four integer values for the random number seed.
*
* lines 10-EOF: Lines specifying matrix types, as for SVD.
* The 3-character path name is 'SBB'.
*
*-----------------------------------------------------------------------
*
* SEC input file:
*
* line 2: THRESH, REAL
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* lines 3-EOF:
*
* Input for testing the eigencondition routines consists of a set of
* specially constructed test cases and their solutions. The data
* format is not intended to be modified by the user.
*
*-----------------------------------------------------------------------
*
* SBL and SBK input files:
*
* line 1: 'SBL' in columns 1-3 to test SGEBAL, or 'SBK' in
* columns 1-3 to test SGEBAK.
*
* The remaining lines consist of specially constructed test cases.
*
*-----------------------------------------------------------------------
*
* SGL and SGK input files:
*
* line 1: 'SGL' in columns 1-3 to test SGGBAL, or 'SGK' in
* columns 1-3 to test SGGBAK.
*
* The remaining lines consist of specially constructed test cases.
*
*-----------------------------------------------------------------------
*
* GLM data file:
*
* line 1: 'GLM' in columns 1 to 3.
*
* line 2: NN, INTEGER
* Number of values of M, P, and N.
*
* line 3: MVAL, INTEGER array, dimension(NN)
* Values of M (row dimension).
*
* line 4: PVAL, INTEGER array, dimension(NN)
* Values of P (row dimension).
*
* line 5: NVAL, INTEGER array, dimension(NN)
* Values of N (column dimension), note M <= N <= M+P.
*
* line 6: THRESH, REAL
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* line 7: TSTERR, LOGICAL
* Flag indicating whether or not to test the error exits for
* the LAPACK routines and driver routines.
*
* line 8: NEWSD, INTEGER
* A code indicating how to set the random number seed.
* = 0: Set the seed to a default value before each run
* = 1: Initialize the seed to a default value only before the
* first run
* = 2: Like 1, but use the seed values on the next line
*
* If line 8 was 2:
*
* line 9: INTEGER array, dimension (4)
* Four integer values for the random number seed.
*
* lines 9-EOF: Lines specifying matrix types, as for NEP.
* The 3-character path name is 'GLM' for the generalized
* linear regression model routines.
*
*-----------------------------------------------------------------------
*
* GQR data file:
*
* line 1: 'GQR' in columns 1 to 3.
*
* line 2: NN, INTEGER
* Number of values of M, P, and N.
*
* line 3: MVAL, INTEGER array, dimension(NN)
* Values of M.
*
* line 4: PVAL, INTEGER array, dimension(NN)
* Values of P.
*
* line 5: NVAL, INTEGER array, dimension(NN)
* Values of N.
*
* line 6: THRESH, REAL
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* line 7: TSTERR, LOGICAL
* Flag indicating whether or not to test the error exits for
* the LAPACK routines and driver routines.
*
* line 8: NEWSD, INTEGER
* A code indicating how to set the random number seed.
* = 0: Set the seed to a default value before each run
* = 1: Initialize the seed to a default value only before the
* first run
* = 2: Like 1, but use the seed values on the next line
*
* If line 8 was 2:
*
* line 9: INTEGER array, dimension (4)
* Four integer values for the random number seed.
*
* lines 9-EOF: Lines specifying matrix types, as for NEP.
* The 3-character path name is 'GQR' for the generalized
* QR and RQ routines.
*
*-----------------------------------------------------------------------
*
* GSV data file:
*
* line 1: 'GSV' in columns 1 to 3.
*
* line 2: NN, INTEGER
* Number of values of M, P, and N.
*
* line 3: MVAL, INTEGER array, dimension(NN)
* Values of M (row dimension).
*
* line 4: PVAL, INTEGER array, dimension(NN)
* Values of P (row dimension).
*
* line 5: NVAL, INTEGER array, dimension(NN)
* Values of N (column dimension).
*
* line 6: THRESH, REAL
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* line 7: TSTERR, LOGICAL
* Flag indicating whether or not to test the error exits for
* the LAPACK routines and driver routines.
*
* line 8: NEWSD, INTEGER
* A code indicating how to set the random number seed.
* = 0: Set the seed to a default value before each run
* = 1: Initialize the seed to a default value only before the
* first run
* = 2: Like 1, but use the seed values on the next line
*
* If line 8 was 2:
*
* line 9: INTEGER array, dimension (4)
* Four integer values for the random number seed.
*
* lines 9-EOF: Lines specifying matrix types, as for NEP.
* The 3-character path name is 'GSV' for the generalized
* SVD routines.
*
*-----------------------------------------------------------------------
*
* LSE data file:
*
* line 1: 'LSE' in columns 1 to 3.
*
* line 2: NN, INTEGER
* Number of values of M, P, and N.
*
* line 3: MVAL, INTEGER array, dimension(NN)
* Values of M.
*
* line 4: PVAL, INTEGER array, dimension(NN)
* Values of P.
*
* line 5: NVAL, INTEGER array, dimension(NN)
* Values of N, note P <= N <= P+M.
*
* line 6: THRESH, REAL
* Threshold value for the test ratios. Information will be
* printed about each test for which the test ratio is greater
* than or equal to the threshold.
*
* line 7: TSTERR, LOGICAL
* Flag indicating whether or not to test the error exits for
* the LAPACK routines and driver routines.
*
* line 8: NEWSD, INTEGER
* A code indicating how to set the random number seed.
* = 0: Set the seed to a default value before each run
* = 1: Initialize the seed to a default value only before the
* first run
* = 2: Like 1, but use the seed values on the next line
*
* If line 8 was 2:
*
* line 9: INTEGER array, dimension (4)
* Four integer values for the random number seed.
*
* lines 9-EOF: Lines specifying matrix types, as for NEP.
* The 3-character path name is 'GSV' for the generalized
* SVD routines.
*
*-----------------------------------------------------------------------
*
* NMAX is currently set to 132 and must be at least 12 for some of the
* precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
* statements below. For SVD, we assume NRHS may be as big as N. The
* parameter NEED is set to 14 to allow for 14 N-by-N matrices for SGG.
*
* =====================================================================
*
* .. Parameters ..
INTEGER NMAX
PARAMETER ( NMAX = 132 )
INTEGER NCMAX
PARAMETER ( NCMAX = 20 )
INTEGER NEED
PARAMETER ( NEED = 14 )
INTEGER LWORK
PARAMETER ( LWORK = NMAX*( 5*NMAX+5 )+1 )
INTEGER LIWORK
PARAMETER ( LIWORK = NMAX*( 5*NMAX+20 ) )
INTEGER MAXIN
PARAMETER ( MAXIN = 20 )
INTEGER MAXT
PARAMETER ( MAXT = 30 )
INTEGER NIN, NOUT
PARAMETER ( NIN = 5, NOUT = 6 )
* ..
* .. Local Scalars ..
LOGICAL FATAL, GLM, GQR, GSV, LSE, NEP, SBB, SBK, SBL,
$ SEP, SES, SEV, SGG, SGK, SGL, SGS, SGV, SGX,
$ SSB, SSX, SVD, SVX, SXV, TSTCHK, TSTDIF,
$ TSTDRV, TSTERR
CHARACTER C1
CHARACTER*3 C3, PATH
CHARACTER*6 VNAME
CHARACTER*10 INTSTR
CHARACTER*80 LINE
INTEGER I, I1, IC, INFO, ITMP, K, LENP, MAXTYP, NEWSD,
$ NK, NN, NPARMS, NRHS, NTYPES,
$ VERS_MAJOR, VERS_MINOR, VERS_PATCH
REAL EPS, S1, S2, THRESH, THRSHN
* ..
* .. Local Arrays ..
LOGICAL DOTYPE( MAXT ), LOGWRK( NMAX )
INTEGER IOLDSD( 4 ), ISEED( 4 ), IWORK( LIWORK ),
$ KVAL( MAXIN ), MVAL( MAXIN ), MXBVAL( MAXIN ),
$ NBCOL( MAXIN ), NBMIN( MAXIN ), NBVAL( MAXIN ),
$ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ),
$ PVAL( MAXIN )
INTEGER INMIN( MAXIN ), INWIN( MAXIN ), INIBL( MAXIN ),
$ ISHFTS( MAXIN ), IACC22( MAXIN )
REAL A( NMAX*NMAX, NEED ), B( NMAX*NMAX, 5 ),
$ C( NCMAX*NCMAX, NCMAX*NCMAX ), D( NMAX, 12 ),
$ RESULT( 500 ), TAUA( NMAX ), TAUB( NMAX ),
$ WORK( LWORK ), X( 5*NMAX )
* ..
* .. External Functions ..
LOGICAL LSAMEN
REAL SECOND, SLAMCH
EXTERNAL LSAMEN, SECOND, SLAMCH
* ..
* .. External Subroutines ..
EXTERNAL ALAREQ, SCHKBB, SCHKBD, SCHKBK, SCHKBL, SCHKEC,
$ SCHKGG, SCHKGK, SCHKGL, SCHKHS, SCHKSB, SCHKST,
$ SCKGLM, SCKGQR, SCKGSV, SCKLSE, SDRGES, SDRGEV,
$ SDRGSX, SDRGVX, SDRVBD, SDRVES, SDRVEV, SDRVGG,
$ SDRVSG, SDRVST, SDRVSX, SDRVVX, SERRBD, SERRED,
$ SERRGG, SERRHS, SERRST, ILAVER, XLAENV
* ..
* .. Intrinsic Functions ..
INTRINSIC LEN, MIN
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
CHARACTER*6 SRNAMT
INTEGER INFOT, MAXB, NPROC, NSHIFT, NUNIT, SELDIM,
$ SELOPT
* ..
* .. Arrays in Common ..
LOGICAL SELVAL( 20 )
INTEGER IPARMS( 100 )
REAL SELWI( 20 ), SELWR( 20 )
* ..
* .. Common blocks ..
COMMON / CENVIR / NPROC, NSHIFT, MAXB
COMMON / CLAENV / IPARMS
COMMON / INFOC / INFOT, NUNIT, OK, LERR
COMMON / SRNAMC / SRNAMT
COMMON / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
* ..
* .. Data statements ..
DATA INTSTR / '0123456789' /
DATA IOLDSD / 0, 0, 0, 1 /
* ..
* .. Executable Statements ..
*
S1 = SECOND( )
FATAL = .FALSE.
NUNIT = NOUT
*
* Return to here to read multiple sets of data
*
10 CONTINUE
*
* Read the first line and set the 3-character test path
*
READ( NIN, FMT = '(A80)', END = 380 )LINE
PATH = LINE( 1: 3 )
NEP = LSAMEN( 3, PATH, 'NEP' ) .OR. LSAMEN( 3, PATH, 'SHS' )
SEP = LSAMEN( 3, PATH, 'SEP' ) .OR. LSAMEN( 3, PATH, 'SST' ) .OR.
$ LSAMEN( 3, PATH, 'SSG' )
SVD = LSAMEN( 3, PATH, 'SVD' ) .OR. LSAMEN( 3, PATH, 'SBD' )
SEV = LSAMEN( 3, PATH, 'SEV' )
SES = LSAMEN( 3, PATH, 'SES' )
SVX = LSAMEN( 3, PATH, 'SVX' )
SSX = LSAMEN( 3, PATH, 'SSX' )
SGG = LSAMEN( 3, PATH, 'SGG' )
SGS = LSAMEN( 3, PATH, 'SGS' )
SGX = LSAMEN( 3, PATH, 'SGX' )
SGV = LSAMEN( 3, PATH, 'SGV' )
SXV = LSAMEN( 3, PATH, 'SXV' )
SSB = LSAMEN( 3, PATH, 'SSB' )
SBB = LSAMEN( 3, PATH, 'SBB' )
GLM = LSAMEN( 3, PATH, 'GLM' )
GQR = LSAMEN( 3, PATH, 'GQR' ) .OR. LSAMEN( 3, PATH, 'GRQ' )
GSV = LSAMEN( 3, PATH, 'GSV' )
LSE = LSAMEN( 3, PATH, 'LSE' )
SBL = LSAMEN( 3, PATH, 'SBL' )
SBK = LSAMEN( 3, PATH, 'SBK' )
SGL = LSAMEN( 3, PATH, 'SGL' )
SGK = LSAMEN( 3, PATH, 'SGK' )
*
* Report values of parameters.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?