00001 SUBROUTINE SDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
00002
00003
00004
00005
00006
00007
00008 INTEGER LDA, NN, NOUT
00009 REAL THRESH
00010
00011
00012 INTEGER NVAL( NN )
00013 REAL A( LDA, * ), ARF( * ), WORK( * )
00014
00015
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 REAL ONE
00052 PARAMETER ( ONE = 1.0E+0 )
00053 INTEGER NTESTS
00054 PARAMETER ( NTESTS = 1 )
00055
00056
00057 CHARACTER UPLO, CFORM, NORM
00058 INTEGER I, IFORM, IIN, IIT, INFO, INORM, IUPLO, J, N,
00059 + NERRS, NFAIL, NRUN
00060 REAL EPS, LARGE, NORMA, NORMARF, SMALL
00061
00062
00063 CHARACTER UPLOS( 2 ), FORMS( 2 ), NORMS( 4 )
00064 INTEGER ISEED( 4 ), ISEEDY( 4 )
00065 REAL RESULT( NTESTS )
00066
00067
00068 REAL SLAMCH, SLANSY, SLANSF, SLARND
00069 EXTERNAL SLAMCH, SLANSY, SLANSF, SLARND
00070
00071
00072 EXTERNAL STRTTF
00073
00074
00075 CHARACTER*32 SRNAMT
00076
00077
00078 COMMON / SRNAMC / SRNAMT
00079
00080
00081 DATA ISEEDY / 1988, 1989, 1990, 1991 /
00082 DATA UPLOS / 'U', 'L' /
00083 DATA FORMS / 'N', 'T' /
00084 DATA NORMS / 'M', '1', 'I', 'F' /
00085
00086
00087
00088
00089
00090 NRUN = 0
00091 NFAIL = 0
00092 NERRS = 0
00093 INFO = 0
00094 DO 10 I = 1, 4
00095 ISEED( I ) = ISEEDY( I )
00096 10 CONTINUE
00097
00098 EPS = SLAMCH( 'Precision' )
00099 SMALL = SLAMCH( 'Safe minimum' )
00100 LARGE = ONE / SMALL
00101 SMALL = SMALL * LDA * LDA
00102 LARGE = LARGE / LDA / LDA
00103
00104 DO 130 IIN = 1, NN
00105
00106 N = NVAL( IIN )
00107
00108 DO 120 IIT = 1, 3
00109
00110
00111
00112
00113
00114 DO J = 1, N
00115 DO I = 1, N
00116 A( I, J) = SLARND( 2, ISEED )
00117 END DO
00118 END DO
00119
00120 IF ( IIT.EQ.2 ) THEN
00121 DO J = 1, N
00122 DO I = 1, N
00123 A( I, J) = A( I, J ) * LARGE
00124 END DO
00125 END DO
00126 END IF
00127
00128 IF ( IIT.EQ.3 ) THEN
00129 DO J = 1, N
00130 DO I = 1, N
00131 A( I, J) = A( I, J) * SMALL
00132 END DO
00133 END DO
00134 END IF
00135
00136
00137
00138 DO 110 IUPLO = 1, 2
00139
00140 UPLO = UPLOS( IUPLO )
00141
00142
00143
00144 DO 100 IFORM = 1, 2
00145
00146 CFORM = FORMS( IFORM )
00147
00148 SRNAMT = 'STRTTF'
00149 CALL STRTTF( CFORM, UPLO, N, A, LDA, ARF, INFO )
00150
00151
00152
00153 IF( INFO.NE.0 ) THEN
00154 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) THEN
00155 WRITE( NOUT, * )
00156 WRITE( NOUT, FMT = 9999 )
00157 END IF
00158 WRITE( NOUT, FMT = 9998 ) SRNAMT, UPLO, CFORM, N
00159 NERRS = NERRS + 1
00160 GO TO 100
00161 END IF
00162
00163 DO 90 INORM = 1, 4
00164
00165
00166
00167 NORM = NORMS( INORM )
00168 NORMARF = SLANSF( NORM, CFORM, UPLO, N, ARF, WORK )
00169 NORMA = SLANSY( NORM, UPLO, N, A, LDA, WORK )
00170
00171 RESULT(1) = ( NORMA - NORMARF ) / NORMA / EPS
00172 NRUN = NRUN + 1
00173
00174 IF( RESULT(1).GE.THRESH ) THEN
00175 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) THEN
00176 WRITE( NOUT, * )
00177 WRITE( NOUT, FMT = 9999 )
00178 END IF
00179 WRITE( NOUT, FMT = 9997 ) 'SLANSF',
00180 + N, IIT, UPLO, CFORM, NORM, RESULT(1)
00181 NFAIL = NFAIL + 1
00182 END IF
00183 90 CONTINUE
00184 100 CONTINUE
00185 110 CONTINUE
00186 120 CONTINUE
00187 130 CONTINUE
00188
00189
00190
00191 IF ( NFAIL.EQ.0 ) THEN
00192 WRITE( NOUT, FMT = 9996 ) 'SLANSF', NRUN
00193 ELSE
00194 WRITE( NOUT, FMT = 9995 ) 'SLANSF', NFAIL, NRUN
00195 END IF
00196 IF ( NERRS.NE.0 ) THEN
00197 WRITE( NOUT, FMT = 9994 ) NERRS, 'SLANSF'
00198 END IF
00199
00200 9999 FORMAT( 1X,
00201 ' *** Error(s) or Failure(s) while testing SLANSF + ***')
00202 9998 FORMAT( 1X, ' Error in ',A6,' with UPLO=''',A1,''', FORM=''',
00203 + A1,''', N=',I5)
00204 9997 FORMAT( 1X, ' Failure in ',A6,' N=',I5,' TYPE=',I5,' UPLO=''',
00205 + A1, ''', FORM =''',A1,''', NORM=''',A1,''', test=',G12.5)
00206 9996 FORMAT( 1X, 'All tests for ',A6,' auxiliary routine passed the ',
00207 + 'threshold (',I5,' tests run)')
00208 9995 FORMAT( 1X, A6, ' auxiliary routine:',I5,' out of ',I5,
00209 + ' tests failed to pass the threshold')
00210 9994 FORMAT( 26X, I5,' error message recorded (',A6,')')
00211
00212 RETURN
00213
00214
00215
00216 END