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