00001 SUBROUTINE DCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
00002 $ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
00003 $ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
00004
00005
00006
00007
00008
00009
00010 INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
00011 DOUBLE PRECISION THRESH
00012
00013
00014 INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
00015 DOUBLE PRECISION A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
00016 $ BF( * ), BT( * ), BWK( * ), BZ( * ),
00017 $ RWORK( * ), TAUA( * ), TAUB( * ), WORK( * )
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
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 INTEGER NTESTS
00112 PARAMETER ( NTESTS = 7 )
00113 INTEGER NTYPES
00114 PARAMETER ( NTYPES = 8 )
00115
00116
00117 LOGICAL FIRSTT
00118 CHARACTER DISTA, DISTB, TYPE
00119 CHARACTER*3 PATH
00120 INTEGER I, IINFO, IM, IMAT, IN, IP, KLA, KLB, KUA, KUB,
00121 $ LDA, LDB, LWORK, M, MODEA, MODEB, N, NFAIL,
00122 $ NRUN, NT, P
00123 DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB
00124
00125
00126 LOGICAL DOTYPE( NTYPES )
00127 DOUBLE PRECISION RESULT( NTESTS )
00128
00129
00130 EXTERNAL ALAHDG, ALAREQ, ALASUM, DGQRTS, DGRQTS, DLATB9,
00131 $ DLATMS
00132
00133
00134 INTRINSIC ABS
00135
00136
00137
00138
00139
00140 PATH( 1: 3 ) = 'GQR'
00141 INFO = 0
00142 NRUN = 0
00143 NFAIL = 0
00144 FIRSTT = .TRUE.
00145 CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00146 LDA = NMAX
00147 LDB = NMAX
00148 LWORK = NMAX*NMAX
00149
00150
00151
00152 DO 60 IM = 1, NM
00153 M = MVAL( IM )
00154
00155
00156
00157 DO 50 IP = 1, NP
00158 P = PVAL( IP )
00159
00160
00161
00162 DO 40 IN = 1, NN
00163 N = NVAL( IN )
00164
00165 DO 30 IMAT = 1, NTYPES
00166
00167
00168
00169 IF( .NOT.DOTYPE( IMAT ) )
00170 $ GO TO 30
00171
00172
00173
00174
00175
00176
00177 CALL DLATB9( 'GRQ', IMAT, M, P, N, TYPE, KLA, KUA,
00178 $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
00179 $ CNDNMA, CNDNMB, DISTA, DISTB )
00180
00181
00182
00183 CALL DLATMS( M, N, DISTA, ISEED, TYPE, RWORK, MODEA,
00184 $ CNDNMA, ANORM, KLA, KUA, 'No packing', A,
00185 $ LDA, WORK, IINFO )
00186 IF( IINFO.NE.0 ) THEN
00187 WRITE( NOUT, FMT = 9999 )IINFO
00188 INFO = ABS( IINFO )
00189 GO TO 30
00190 END IF
00191
00192
00193
00194 CALL DLATMS( P, N, DISTB, ISEED, TYPE, RWORK, MODEB,
00195 $ CNDNMB, BNORM, KLB, KUB, 'No packing', B,
00196 $ LDB, WORK, IINFO )
00197 IF( IINFO.NE.0 ) THEN
00198 WRITE( NOUT, FMT = 9999 )IINFO
00199 INFO = ABS( IINFO )
00200 GO TO 30
00201 END IF
00202
00203 NT = 4
00204
00205 CALL DGRQTS( M, P, N, A, AF, AQ, AR, LDA, TAUA, B, BF,
00206 $ BZ, BT, BWK, LDB, TAUB, WORK, LWORK,
00207 $ RWORK, RESULT )
00208
00209
00210
00211
00212 DO 10 I = 1, NT
00213 IF( RESULT( I ).GE.THRESH ) THEN
00214 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
00215 FIRSTT = .FALSE.
00216 CALL ALAHDG( NOUT, 'GRQ' )
00217 END IF
00218 WRITE( NOUT, FMT = 9998 )M, P, N, IMAT, I,
00219 $ RESULT( I )
00220 NFAIL = NFAIL + 1
00221 END IF
00222 10 CONTINUE
00223 NRUN = NRUN + NT
00224
00225
00226
00227
00228
00229
00230 CALL DLATB9( 'GQR', IMAT, M, P, N, TYPE, KLA, KUA,
00231 $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
00232 $ CNDNMA, CNDNMB, DISTA, DISTB )
00233
00234
00235
00236 CALL DLATMS( N, M, DISTA, ISEED, TYPE, RWORK, MODEA,
00237 $ CNDNMA, ANORM, KLA, KUA, 'No packing', A,
00238 $ LDA, WORK, IINFO )
00239 IF( IINFO.NE.0 ) THEN
00240 WRITE( NOUT, FMT = 9999 )IINFO
00241 INFO = ABS( IINFO )
00242 GO TO 30
00243 END IF
00244
00245
00246
00247 CALL DLATMS( N, P, DISTB, ISEED, TYPE, RWORK, MODEA,
00248 $ CNDNMA, BNORM, KLB, KUB, 'No packing', B,
00249 $ LDB, WORK, IINFO )
00250 IF( IINFO.NE.0 ) THEN
00251 WRITE( NOUT, FMT = 9999 )IINFO
00252 INFO = ABS( IINFO )
00253 GO TO 30
00254 END IF
00255
00256 NT = 4
00257
00258 CALL DGQRTS( N, M, P, A, AF, AQ, AR, LDA, TAUA, B, BF,
00259 $ BZ, BT, BWK, LDB, TAUB, WORK, LWORK,
00260 $ RWORK, RESULT )
00261
00262
00263
00264
00265 DO 20 I = 1, NT
00266 IF( RESULT( I ).GE.THRESH ) THEN
00267 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
00268 FIRSTT = .FALSE.
00269 CALL ALAHDG( NOUT, PATH )
00270 END IF
00271 WRITE( NOUT, FMT = 9997 )N, M, P, IMAT, I,
00272 $ RESULT( I )
00273 NFAIL = NFAIL + 1
00274 END IF
00275 20 CONTINUE
00276 NRUN = NRUN + NT
00277
00278 30 CONTINUE
00279 40 CONTINUE
00280 50 CONTINUE
00281 60 CONTINUE
00282
00283
00284
00285 CALL ALASUM( PATH, NOUT, NFAIL, NRUN, 0 )
00286
00287 9999 FORMAT( ' DLATMS in DCKGQR: INFO = ', I5 )
00288 9998 FORMAT( ' M=', I4, ' P=', I4, ', N=', I4, ', type ', I2,
00289 $ ', test ', I2, ', ratio=', G13.6 )
00290 9997 FORMAT( ' N=', I4, ' M=', I4, ', P=', I4, ', type ', I2,
00291 $ ', test ', I2, ', ratio=', G13.6 )
00292 RETURN
00293
00294
00295
00296 END