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