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