00001 SUBROUTINE CERRTR( PATH, NUNIT )
00002
00003
00004
00005
00006
00007
00008 CHARACTER*3 PATH
00009 INTEGER NUNIT
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 INTEGER NMAX
00030 PARAMETER ( NMAX = 2 )
00031
00032
00033 CHARACTER*2 C2
00034 INTEGER INFO
00035 REAL RCOND, SCALE
00036
00037
00038 REAL R1( NMAX ), R2( NMAX ), RW( NMAX )
00039 COMPLEX A( NMAX, NMAX ), B( NMAX ), W( NMAX ),
00040 $ X( NMAX )
00041
00042
00043 LOGICAL LSAMEN
00044 EXTERNAL LSAMEN
00045
00046
00047 EXTERNAL ALAESM, CHKXER, CLATBS, CLATPS, CLATRS, CTBCON,
00048 $ CTBRFS, CTBTRS, CTPCON, CTPRFS, CTPTRI, CTPTRS,
00049 $ CTRCON, CTRRFS, CTRTI2, CTRTRI, CTRTRS
00050
00051
00052 LOGICAL LERR, OK
00053 CHARACTER*32 SRNAMT
00054 INTEGER INFOT, NOUT
00055
00056
00057 COMMON / INFOC / INFOT, NOUT, OK, LERR
00058 COMMON / SRNAMC / SRNAMT
00059
00060
00061
00062 NOUT = NUNIT
00063 WRITE( NOUT, FMT = * )
00064 C2 = PATH( 2: 3 )
00065 A( 1, 1 ) = 1.
00066 A( 1, 2 ) = 2.
00067 A( 2, 2 ) = 3.
00068 A( 2, 1 ) = 4.
00069 OK = .TRUE.
00070
00071
00072
00073 IF( LSAMEN( 2, C2, 'TR' ) ) THEN
00074
00075
00076
00077 SRNAMT = 'CTRTRI'
00078 INFOT = 1
00079 CALL CTRTRI( '/', 'N', 0, A, 1, INFO )
00080 CALL CHKXER( 'CTRTRI', INFOT, NOUT, LERR, OK )
00081 INFOT = 2
00082 CALL CTRTRI( 'U', '/', 0, A, 1, INFO )
00083 CALL CHKXER( 'CTRTRI', INFOT, NOUT, LERR, OK )
00084 INFOT = 3
00085 CALL CTRTRI( 'U', 'N', -1, A, 1, INFO )
00086 CALL CHKXER( 'CTRTRI', INFOT, NOUT, LERR, OK )
00087 INFOT = 5
00088 CALL CTRTRI( 'U', 'N', 2, A, 1, INFO )
00089 CALL CHKXER( 'CTRTRI', INFOT, NOUT, LERR, OK )
00090
00091
00092
00093 SRNAMT = 'CTRTI2'
00094 INFOT = 1
00095 CALL CTRTI2( '/', 'N', 0, A, 1, INFO )
00096 CALL CHKXER( 'CTRTI2', INFOT, NOUT, LERR, OK )
00097 INFOT = 2
00098 CALL CTRTI2( 'U', '/', 0, A, 1, INFO )
00099 CALL CHKXER( 'CTRTI2', INFOT, NOUT, LERR, OK )
00100 INFOT = 3
00101 CALL CTRTI2( 'U', 'N', -1, A, 1, INFO )
00102 CALL CHKXER( 'CTRTI2', INFOT, NOUT, LERR, OK )
00103 INFOT = 5
00104 CALL CTRTI2( 'U', 'N', 2, A, 1, INFO )
00105 CALL CHKXER( 'CTRTI2', INFOT, NOUT, LERR, OK )
00106
00107
00108
00109
00110 SRNAMT = 'CTRTRS'
00111 INFOT = 1
00112 CALL CTRTRS( '/', 'N', 'N', 0, 0, A, 1, X, 1, INFO )
00113 CALL CHKXER( 'CTRTRS', INFOT, NOUT, LERR, OK )
00114 INFOT = 2
00115 CALL CTRTRS( 'U', '/', 'N', 0, 0, A, 1, X, 1, INFO )
00116 CALL CHKXER( 'CTRTRS', INFOT, NOUT, LERR, OK )
00117 INFOT = 3
00118 CALL CTRTRS( 'U', 'N', '/', 0, 0, A, 1, X, 1, INFO )
00119 CALL CHKXER( 'CTRTRS', INFOT, NOUT, LERR, OK )
00120 INFOT = 4
00121 CALL CTRTRS( 'U', 'N', 'N', -1, 0, A, 1, X, 1, INFO )
00122 CALL CHKXER( 'CTRTRS', INFOT, NOUT, LERR, OK )
00123 INFOT = 5
00124 CALL CTRTRS( 'U', 'N', 'N', 0, -1, A, 1, X, 1, INFO )
00125 CALL CHKXER( 'CTRTRS', INFOT, NOUT, LERR, OK )
00126 INFOT = 7
00127
00128
00129
00130 SRNAMT = 'CTRRFS'
00131 INFOT = 1
00132 CALL CTRRFS( '/', 'N', 'N', 0, 0, A, 1, B, 1, X, 1, R1, R2, W,
00133 $ RW, INFO )
00134 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00135 INFOT = 2
00136 CALL CTRRFS( 'U', '/', 'N', 0, 0, A, 1, B, 1, X, 1, R1, R2, W,
00137 $ RW, INFO )
00138 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00139 INFOT = 3
00140 CALL CTRRFS( 'U', 'N', '/', 0, 0, A, 1, B, 1, X, 1, R1, R2, W,
00141 $ RW, INFO )
00142 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00143 INFOT = 4
00144 CALL CTRRFS( 'U', 'N', 'N', -1, 0, A, 1, B, 1, X, 1, R1, R2, W,
00145 $ RW, INFO )
00146 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00147 INFOT = 5
00148 CALL CTRRFS( 'U', 'N', 'N', 0, -1, A, 1, B, 1, X, 1, R1, R2, W,
00149 $ RW, INFO )
00150 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00151 INFOT = 7
00152 CALL CTRRFS( 'U', 'N', 'N', 2, 1, A, 1, B, 2, X, 2, R1, R2, W,
00153 $ RW, INFO )
00154 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00155 INFOT = 9
00156 CALL CTRRFS( 'U', 'N', 'N', 2, 1, A, 2, B, 1, X, 2, R1, R2, W,
00157 $ RW, INFO )
00158 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00159 INFOT = 11
00160 CALL CTRRFS( 'U', 'N', 'N', 2, 1, A, 2, B, 2, X, 1, R1, R2, W,
00161 $ RW, INFO )
00162 CALL CHKXER( 'CTRRFS', INFOT, NOUT, LERR, OK )
00163
00164
00165
00166 SRNAMT = 'CTRCON'
00167 INFOT = 1
00168 CALL CTRCON( '/', 'U', 'N', 0, A, 1, RCOND, W, RW, INFO )
00169 CALL CHKXER( 'CTRCON', INFOT, NOUT, LERR, OK )
00170 INFOT = 2
00171 CALL CTRCON( '1', '/', 'N', 0, A, 1, RCOND, W, RW, INFO )
00172 CALL CHKXER( 'CTRCON', INFOT, NOUT, LERR, OK )
00173 INFOT = 3
00174 CALL CTRCON( '1', 'U', '/', 0, A, 1, RCOND, W, RW, INFO )
00175 CALL CHKXER( 'CTRCON', INFOT, NOUT, LERR, OK )
00176 INFOT = 4
00177 CALL CTRCON( '1', 'U', 'N', -1, A, 1, RCOND, W, RW, INFO )
00178 CALL CHKXER( 'CTRCON', INFOT, NOUT, LERR, OK )
00179 INFOT = 6
00180 CALL CTRCON( '1', 'U', 'N', 2, A, 1, RCOND, W, RW, INFO )
00181 CALL CHKXER( 'CTRCON', INFOT, NOUT, LERR, OK )
00182
00183
00184
00185 SRNAMT = 'CLATRS'
00186 INFOT = 1
00187 CALL CLATRS( '/', 'N', 'N', 'N', 0, A, 1, X, SCALE, RW, INFO )
00188 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00189 INFOT = 2
00190 CALL CLATRS( 'U', '/', 'N', 'N', 0, A, 1, X, SCALE, RW, INFO )
00191 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00192 INFOT = 3
00193 CALL CLATRS( 'U', 'N', '/', 'N', 0, A, 1, X, SCALE, RW, INFO )
00194 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00195 INFOT = 4
00196 CALL CLATRS( 'U', 'N', 'N', '/', 0, A, 1, X, SCALE, RW, INFO )
00197 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00198 INFOT = 5
00199 CALL CLATRS( 'U', 'N', 'N', 'N', -1, A, 1, X, SCALE, RW, INFO )
00200 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00201 INFOT = 7
00202 CALL CLATRS( 'U', 'N', 'N', 'N', 2, A, 1, X, SCALE, RW, INFO )
00203 CALL CHKXER( 'CLATRS', INFOT, NOUT, LERR, OK )
00204
00205
00206
00207 ELSE IF( LSAMEN( 2, C2, 'TP' ) ) THEN
00208
00209
00210
00211 SRNAMT = 'CTPTRI'
00212 INFOT = 1
00213 CALL CTPTRI( '/', 'N', 0, A, INFO )
00214 CALL CHKXER( 'CTPTRI', INFOT, NOUT, LERR, OK )
00215 INFOT = 2
00216 CALL CTPTRI( 'U', '/', 0, A, INFO )
00217 CALL CHKXER( 'CTPTRI', INFOT, NOUT, LERR, OK )
00218 INFOT = 3
00219 CALL CTPTRI( 'U', 'N', -1, A, INFO )
00220 CALL CHKXER( 'CTPTRI', INFOT, NOUT, LERR, OK )
00221
00222
00223
00224 SRNAMT = 'CTPTRS'
00225 INFOT = 1
00226 CALL CTPTRS( '/', 'N', 'N', 0, 0, A, X, 1, INFO )
00227 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00228 INFOT = 2
00229 CALL CTPTRS( 'U', '/', 'N', 0, 0, A, X, 1, INFO )
00230 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00231 INFOT = 3
00232 CALL CTPTRS( 'U', 'N', '/', 0, 0, A, X, 1, INFO )
00233 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00234 INFOT = 4
00235 CALL CTPTRS( 'U', 'N', 'N', -1, 0, A, X, 1, INFO )
00236 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00237 INFOT = 5
00238 CALL CTPTRS( 'U', 'N', 'N', 0, -1, A, X, 1, INFO )
00239 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00240 INFOT = 8
00241 CALL CTPTRS( 'U', 'N', 'N', 2, 1, A, X, 1, INFO )
00242 CALL CHKXER( 'CTPTRS', INFOT, NOUT, LERR, OK )
00243
00244
00245
00246 SRNAMT = 'CTPRFS'
00247 INFOT = 1
00248 CALL CTPRFS( '/', 'N', 'N', 0, 0, A, B, 1, X, 1, R1, R2, W, RW,
00249 $ INFO )
00250 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00251 INFOT = 2
00252 CALL CTPRFS( 'U', '/', 'N', 0, 0, A, B, 1, X, 1, R1, R2, W, RW,
00253 $ INFO )
00254 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00255 INFOT = 3
00256 CALL CTPRFS( 'U', 'N', '/', 0, 0, A, B, 1, X, 1, R1, R2, W, RW,
00257 $ INFO )
00258 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00259 INFOT = 4
00260 CALL CTPRFS( 'U', 'N', 'N', -1, 0, A, B, 1, X, 1, R1, R2, W,
00261 $ RW, INFO )
00262 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00263 INFOT = 5
00264 CALL CTPRFS( 'U', 'N', 'N', 0, -1, A, B, 1, X, 1, R1, R2, W,
00265 $ RW, INFO )
00266 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00267 INFOT = 8
00268 CALL CTPRFS( 'U', 'N', 'N', 2, 1, A, B, 1, X, 2, R1, R2, W, RW,
00269 $ INFO )
00270 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00271 INFOT = 10
00272 CALL CTPRFS( 'U', 'N', 'N', 2, 1, A, B, 2, X, 1, R1, R2, W, RW,
00273 $ INFO )
00274 CALL CHKXER( 'CTPRFS', INFOT, NOUT, LERR, OK )
00275
00276
00277
00278 SRNAMT = 'CTPCON'
00279 INFOT = 1
00280 CALL CTPCON( '/', 'U', 'N', 0, A, RCOND, W, RW, INFO )
00281 CALL CHKXER( 'CTPCON', INFOT, NOUT, LERR, OK )
00282 INFOT = 2
00283 CALL CTPCON( '1', '/', 'N', 0, A, RCOND, W, RW, INFO )
00284 CALL CHKXER( 'CTPCON', INFOT, NOUT, LERR, OK )
00285 INFOT = 3
00286 CALL CTPCON( '1', 'U', '/', 0, A, RCOND, W, RW, INFO )
00287 CALL CHKXER( 'CTPCON', INFOT, NOUT, LERR, OK )
00288 INFOT = 4
00289 CALL CTPCON( '1', 'U', 'N', -1, A, RCOND, W, RW, INFO )
00290 CALL CHKXER( 'CTPCON', INFOT, NOUT, LERR, OK )
00291
00292
00293
00294 SRNAMT = 'CLATPS'
00295 INFOT = 1
00296 CALL CLATPS( '/', 'N', 'N', 'N', 0, A, X, SCALE, RW, INFO )
00297 CALL CHKXER( 'CLATPS', INFOT, NOUT, LERR, OK )
00298 INFOT = 2
00299 CALL CLATPS( 'U', '/', 'N', 'N', 0, A, X, SCALE, RW, INFO )
00300 CALL CHKXER( 'CLATPS', INFOT, NOUT, LERR, OK )
00301 INFOT = 3
00302 CALL CLATPS( 'U', 'N', '/', 'N', 0, A, X, SCALE, RW, INFO )
00303 CALL CHKXER( 'CLATPS', INFOT, NOUT, LERR, OK )
00304 INFOT = 4
00305 CALL CLATPS( 'U', 'N', 'N', '/', 0, A, X, SCALE, RW, INFO )
00306 CALL CHKXER( 'CLATPS', INFOT, NOUT, LERR, OK )
00307 INFOT = 5
00308 CALL CLATPS( 'U', 'N', 'N', 'N', -1, A, X, SCALE, RW, INFO )
00309 CALL CHKXER( 'CLATPS', INFOT, NOUT, LERR, OK )
00310
00311
00312
00313 ELSE IF( LSAMEN( 2, C2, 'TB' ) ) THEN
00314
00315
00316
00317 SRNAMT = 'CTBTRS'
00318 INFOT = 1
00319 CALL CTBTRS( '/', 'N', 'N', 0, 0, 0, A, 1, X, 1, INFO )
00320 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00321 INFOT = 2
00322 CALL CTBTRS( 'U', '/', 'N', 0, 0, 0, A, 1, X, 1, INFO )
00323 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00324 INFOT = 3
00325 CALL CTBTRS( 'U', 'N', '/', 0, 0, 0, A, 1, X, 1, INFO )
00326 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00327 INFOT = 4
00328 CALL CTBTRS( 'U', 'N', 'N', -1, 0, 0, A, 1, X, 1, INFO )
00329 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00330 INFOT = 5
00331 CALL CTBTRS( 'U', 'N', 'N', 0, -1, 0, A, 1, X, 1, INFO )
00332 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00333 INFOT = 6
00334 CALL CTBTRS( 'U', 'N', 'N', 0, 0, -1, A, 1, X, 1, INFO )
00335 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00336 INFOT = 8
00337 CALL CTBTRS( 'U', 'N', 'N', 2, 1, 1, A, 1, X, 2, INFO )
00338 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00339 INFOT = 10
00340 CALL CTBTRS( 'U', 'N', 'N', 2, 0, 1, A, 1, X, 1, INFO )
00341 CALL CHKXER( 'CTBTRS', INFOT, NOUT, LERR, OK )
00342
00343
00344
00345 SRNAMT = 'CTBRFS'
00346 INFOT = 1
00347 CALL CTBRFS( '/', 'N', 'N', 0, 0, 0, A, 1, B, 1, X, 1, R1, R2,
00348 $ W, RW, INFO )
00349 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00350 INFOT = 2
00351 CALL CTBRFS( 'U', '/', 'N', 0, 0, 0, A, 1, B, 1, X, 1, R1, R2,
00352 $ W, RW, INFO )
00353 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00354 INFOT = 3
00355 CALL CTBRFS( 'U', 'N', '/', 0, 0, 0, A, 1, B, 1, X, 1, R1, R2,
00356 $ W, RW, INFO )
00357 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00358 INFOT = 4
00359 CALL CTBRFS( 'U', 'N', 'N', -1, 0, 0, A, 1, B, 1, X, 1, R1, R2,
00360 $ W, RW, INFO )
00361 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00362 INFOT = 5
00363 CALL CTBRFS( 'U', 'N', 'N', 0, -1, 0, A, 1, B, 1, X, 1, R1, R2,
00364 $ W, RW, INFO )
00365 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00366 INFOT = 6
00367 CALL CTBRFS( 'U', 'N', 'N', 0, 0, -1, A, 1, B, 1, X, 1, R1, R2,
00368 $ W, RW, INFO )
00369 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00370 INFOT = 8
00371 CALL CTBRFS( 'U', 'N', 'N', 2, 1, 1, A, 1, B, 2, X, 2, R1, R2,
00372 $ W, RW, INFO )
00373 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00374 INFOT = 10
00375 CALL CTBRFS( 'U', 'N', 'N', 2, 1, 1, A, 2, B, 1, X, 2, R1, R2,
00376 $ W, RW, INFO )
00377 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00378 INFOT = 12
00379 CALL CTBRFS( 'U', 'N', 'N', 2, 1, 1, A, 2, B, 2, X, 1, R1, R2,
00380 $ W, RW, INFO )
00381 CALL CHKXER( 'CTBRFS', INFOT, NOUT, LERR, OK )
00382
00383
00384
00385 SRNAMT = 'CTBCON'
00386 INFOT = 1
00387 CALL CTBCON( '/', 'U', 'N', 0, 0, A, 1, RCOND, W, RW, INFO )
00388 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00389 INFOT = 2
00390 CALL CTBCON( '1', '/', 'N', 0, 0, A, 1, RCOND, W, RW, INFO )
00391 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00392 INFOT = 3
00393 CALL CTBCON( '1', 'U', '/', 0, 0, A, 1, RCOND, W, RW, INFO )
00394 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00395 INFOT = 4
00396 CALL CTBCON( '1', 'U', 'N', -1, 0, A, 1, RCOND, W, RW, INFO )
00397 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00398 INFOT = 5
00399 CALL CTBCON( '1', 'U', 'N', 0, -1, A, 1, RCOND, W, RW, INFO )
00400 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00401 INFOT = 7
00402 CALL CTBCON( '1', 'U', 'N', 2, 1, A, 1, RCOND, W, RW, INFO )
00403 CALL CHKXER( 'CTBCON', INFOT, NOUT, LERR, OK )
00404
00405
00406
00407 SRNAMT = 'CLATBS'
00408 INFOT = 1
00409 CALL CLATBS( '/', 'N', 'N', 'N', 0, 0, A, 1, X, SCALE, RW,
00410 $ INFO )
00411 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00412 INFOT = 2
00413 CALL CLATBS( 'U', '/', 'N', 'N', 0, 0, A, 1, X, SCALE, RW,
00414 $ INFO )
00415 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00416 INFOT = 3
00417 CALL CLATBS( 'U', 'N', '/', 'N', 0, 0, A, 1, X, SCALE, RW,
00418 $ INFO )
00419 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00420 INFOT = 4
00421 CALL CLATBS( 'U', 'N', 'N', '/', 0, 0, A, 1, X, SCALE, RW,
00422 $ INFO )
00423 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00424 INFOT = 5
00425 CALL CLATBS( 'U', 'N', 'N', 'N', -1, 0, A, 1, X, SCALE, RW,
00426 $ INFO )
00427 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00428 INFOT = 6
00429 CALL CLATBS( 'U', 'N', 'N', 'N', 1, -1, A, 1, X, SCALE, RW,
00430 $ INFO )
00431 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00432 INFOT = 8
00433 CALL CLATBS( 'U', 'N', 'N', 'N', 2, 1, A, 1, X, SCALE, RW,
00434 $ INFO )
00435 CALL CHKXER( 'CLATBS', INFOT, NOUT, LERR, OK )
00436 END IF
00437
00438
00439
00440 CALL ALAESM( PATH, OK, NOUT )
00441
00442 RETURN
00443
00444
00445
00446 END