00001 SUBROUTINE SDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
00002 + LDA, S_WORK_SLANGE )
00003
00004
00005
00006
00007
00008
00009 INTEGER LDA, LDC, NN, NOUT
00010 REAL THRESH
00011
00012
00013 INTEGER NVAL( NN )
00014 REAL A( LDA, * ), C1( LDC, * ), C2( LDC, *),
00015 + CRF( * ), S_WORK_SLANGE( * )
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 REAL ZERO, ONE
00066 PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
00067 INTEGER NTESTS
00068 PARAMETER ( NTESTS = 1 )
00069
00070
00071 CHARACTER UPLO, CFORM, TRANS
00072 INTEGER I, IFORM, IIK, IIN, INFO, IUPLO, J, K, N,
00073 + NFAIL, NRUN, IALPHA, ITRANS
00074 REAL ALPHA, BETA, EPS, NORMA, NORMC
00075
00076
00077 CHARACTER UPLOS( 2 ), FORMS( 2 ), TRANSS( 2 )
00078 INTEGER ISEED( 4 ), ISEEDY( 4 )
00079 REAL RESULT( NTESTS )
00080
00081
00082 REAL SLAMCH, SLARND, SLANGE
00083 EXTERNAL SLAMCH, SLARND, SLANGE
00084
00085
00086 EXTERNAL SSYRK, SSFRK, STFTTR, STRTTF
00087
00088
00089 INTRINSIC ABS, MAX
00090
00091
00092 CHARACTER*32 SRNAMT
00093
00094
00095 COMMON / SRNAMC / SRNAMT
00096
00097
00098 DATA ISEEDY / 1988, 1989, 1990, 1991 /
00099 DATA UPLOS / 'U', 'L' /
00100 DATA FORMS / 'N', 'T' /
00101 DATA TRANSS / 'N', 'T' /
00102
00103
00104
00105
00106
00107 NRUN = 0
00108 NFAIL = 0
00109 INFO = 0
00110 DO 10 I = 1, 4
00111 ISEED( I ) = ISEEDY( I )
00112 10 CONTINUE
00113 EPS = SLAMCH( 'Precision' )
00114
00115 DO 150 IIN = 1, NN
00116
00117 N = NVAL( IIN )
00118
00119 DO 140 IIK = 1, NN
00120
00121 K = NVAL( IIN )
00122
00123 DO 130 IFORM = 1, 2
00124
00125 CFORM = FORMS( IFORM )
00126
00127 DO 120 IUPLO = 1, 2
00128
00129 UPLO = UPLOS( IUPLO )
00130
00131 DO 110 ITRANS = 1, 2
00132
00133 TRANS = TRANSS( ITRANS )
00134
00135 DO 100 IALPHA = 1, 4
00136
00137 IF ( IALPHA.EQ. 1) THEN
00138 ALPHA = ZERO
00139 BETA = ZERO
00140 ELSE IF ( IALPHA.EQ. 2) THEN
00141 ALPHA = ONE
00142 BETA = ZERO
00143 ELSE IF ( IALPHA.EQ. 3) THEN
00144 ALPHA = ZERO
00145 BETA = ONE
00146 ELSE
00147 ALPHA = SLARND( 2, ISEED )
00148 BETA = SLARND( 2, ISEED )
00149 END IF
00150
00151
00152
00153
00154
00155
00156 NRUN = NRUN + 1
00157
00158 IF ( ITRANS.EQ.1 ) THEN
00159
00160
00161
00162 DO J = 1, K
00163 DO I = 1, N
00164 A( I, J) = SLARND( 2, ISEED )
00165 END DO
00166 END DO
00167
00168 NORMA = SLANGE( 'I', N, K, A, LDA,
00169 + S_WORK_SLANGE )
00170
00171
00172 ELSE
00173
00174
00175
00176 DO J = 1,N
00177 DO I = 1, K
00178 A( I, J) = SLARND( 2, ISEED )
00179 END DO
00180 END DO
00181
00182 NORMA = SLANGE( 'I', K, N, A, LDA,
00183 + S_WORK_SLANGE )
00184
00185 END IF
00186
00187
00188
00189
00190
00191
00192 DO J = 1, N
00193 DO I = 1, N
00194 C1( I, J) = SLARND( 2, ISEED )
00195 C2(I,J) = C1(I,J)
00196 END DO
00197 END DO
00198
00199
00200
00201
00202 NORMC = SLANGE( 'I', N, N, C1, LDC,
00203 + S_WORK_SLANGE )
00204
00205 SRNAMT = 'STRTTF'
00206 CALL STRTTF( CFORM, UPLO, N, C1, LDC, CRF,
00207 + INFO )
00208
00209
00210
00211 SRNAMT = 'SSYRK '
00212 CALL SSYRK( UPLO, TRANS, N, K, ALPHA, A, LDA,
00213 + BETA, C1, LDC )
00214
00215
00216
00217 SRNAMT = 'SSFRK '
00218 CALL SSFRK( CFORM, UPLO, TRANS, N, K, ALPHA, A,
00219 + LDA, BETA, CRF )
00220
00221
00222
00223 SRNAMT = 'STFTTR'
00224 CALL STFTTR( CFORM, UPLO, N, CRF, C2, LDC,
00225 + INFO )
00226
00227
00228
00229 DO J = 1, N
00230 DO I = 1, N
00231 C1(I,J) = C1(I,J)-C2(I,J)
00232 END DO
00233 END DO
00234
00235
00236
00237
00238
00239
00240 RESULT(1) = SLANGE( 'I', N, N, C1, LDC,
00241 + S_WORK_SLANGE )
00242 RESULT(1) = RESULT(1)
00243 + / MAX( ABS( ALPHA ) * NORMA
00244 + + ABS( BETA ) , ONE )
00245 + / MAX( N , 1 ) / EPS
00246
00247 IF( RESULT(1).GE.THRESH ) THEN
00248 IF( NFAIL.EQ.0 ) THEN
00249 WRITE( NOUT, * )
00250 WRITE( NOUT, FMT = 9999 )
00251 END IF
00252 WRITE( NOUT, FMT = 9997 ) 'SSFRK',
00253 + CFORM, UPLO, TRANS, N, K, RESULT(1)
00254 NFAIL = NFAIL + 1
00255 END IF
00256
00257 100 CONTINUE
00258 110 CONTINUE
00259 120 CONTINUE
00260 130 CONTINUE
00261 140 CONTINUE
00262 150 CONTINUE
00263
00264
00265
00266 IF ( NFAIL.EQ.0 ) THEN
00267 WRITE( NOUT, FMT = 9996 ) 'SSFRK', NRUN
00268 ELSE
00269 WRITE( NOUT, FMT = 9995 ) 'SSFRK', NFAIL, NRUN
00270 END IF
00271
00272 9999 FORMAT( 1X,
00273 ' *** Error(s) or Failure(s) while testing SSFRK + ***')
00274 9997 FORMAT( 1X, ' Failure in ',A5,', CFORM=''',A1,''',',
00275 + ' UPLO=''',A1,''',',' TRANS=''',A1,''',', ' N=',I3,', K =', I3,
00276 + ', test=',G12.5)
00277 9996 FORMAT( 1X, 'All tests for ',A5,' auxiliary routine passed the ',
00278 + 'threshold (',I5,' tests run)')
00279 9995 FORMAT( 1X, A6, ' auxiliary routine:',I5,' out of ',I5,
00280 + ' tests failed to pass the threshold')
00281
00282 RETURN
00283
00284
00285
00286 END