00001 SUBROUTINE SDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
00002 $ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
00003 $ RWORK, IWORK, NOUT )
00004
00005
00006
00007
00008
00009
00010 LOGICAL TSTERR
00011 INTEGER LA, LAFB, NN, NOUT, NRHS
00012 REAL THRESH
00013
00014
00015 LOGICAL DOTYPE( * )
00016 INTEGER IWORK( * ), NVAL( * )
00017 REAL A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
00018 $ RWORK( * ), S( * ), WORK( * ), X( * ),
00019 $ XACT( * )
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 REAL ONE, ZERO
00095 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
00096 INTEGER NTYPES
00097 PARAMETER ( NTYPES = 8 )
00098 INTEGER NTESTS
00099 PARAMETER ( NTESTS = 7 )
00100 INTEGER NTRAN
00101 PARAMETER ( NTRAN = 3 )
00102
00103
00104 LOGICAL EQUIL, NOFACT, PREFAC, TRFCON, ZEROT
00105 CHARACTER DIST, EQUED, FACT, TRANS, TYPE, XTYPE
00106 CHARACTER*3 PATH
00107 INTEGER I, I1, I2, IEQUED, IFACT, IKL, IKU, IMAT, IN,
00108 $ INFO, IOFF, ITRAN, IZERO, J, K, K1, KL, KU,
00109 $ LDA, LDAFB, LDB, MODE, N, NB, NBMIN, NERRS,
00110 $ NFACT, NFAIL, NIMAT, NKL, NKU, NRUN, NT,
00111 $ N_ERR_BNDS
00112 REAL AINVNM, AMAX, ANORM, ANORMI, ANORMO, ANRMPV,
00113 $ CNDNUM, COLCND, RCOND, RCONDC, RCONDI, RCONDO,
00114 $ ROLDC, ROLDI, ROLDO, ROWCND, RPVGRW,
00115 $ RPVGRW_SVXX
00116
00117
00118 CHARACTER EQUEDS( 4 ), FACTS( 3 ), TRANSS( NTRAN )
00119 INTEGER ISEED( 4 ), ISEEDY( 4 )
00120 REAL RESULT( NTESTS ), BERR( NRHS ),
00121 $ ERRBNDS_N( NRHS, 3 ), ERRBNDS_C( NRHS, 3 )
00122
00123
00124 LOGICAL LSAME
00125 REAL SGET06, SLAMCH, SLANGB, SLANGE, SLANTB,
00126 $ SLA_GBRPVGRW
00127 EXTERNAL LSAME, SGET06, SLAMCH, SLANGB, SLANGE, SLANTB,
00128 $ SLA_GBRPVGRW
00129
00130
00131 EXTERNAL ALADHD, ALAERH, ALASVM, SERRVX, SGBEQU, SGBSV,
00132 $ SGBSVX, SGBT01, SGBT02, SGBT05, SGBTRF, SGBTRS,
00133 $ SGET04, SLACPY, SLAQGB, SLARHS, SLASET, SLATB4,
00134 $ SLATMS, XLAENV, SGBSVXX
00135
00136
00137 INTRINSIC ABS, MAX, MIN
00138
00139
00140 LOGICAL LERR, OK
00141 CHARACTER*32 SRNAMT
00142 INTEGER INFOT, NUNIT
00143
00144
00145 COMMON / INFOC / INFOT, NUNIT, OK, LERR
00146 COMMON / SRNAMC / SRNAMT
00147
00148
00149 DATA ISEEDY / 1988, 1989, 1990, 1991 /
00150 DATA TRANSS / 'N', 'T', 'C' /
00151 DATA FACTS / 'F', 'N', 'E' /
00152 DATA EQUEDS / 'N', 'R', 'C', 'B' /
00153
00154
00155
00156
00157
00158 PATH( 1: 1 ) = 'Single precision'
00159 PATH( 2: 3 ) = 'GB'
00160 NRUN = 0
00161 NFAIL = 0
00162 NERRS = 0
00163 DO 10 I = 1, 4
00164 ISEED( I ) = ISEEDY( I )
00165 10 CONTINUE
00166
00167
00168
00169 IF( TSTERR )
00170 $ CALL SERRVX( PATH, NOUT )
00171 INFOT = 0
00172
00173
00174
00175 NB = 1
00176 NBMIN = 2
00177 CALL XLAENV( 1, NB )
00178 CALL XLAENV( 2, NBMIN )
00179
00180
00181
00182 DO 150 IN = 1, NN
00183 N = NVAL( IN )
00184 LDB = MAX( N, 1 )
00185 XTYPE = 'N'
00186
00187
00188
00189 NKL = MAX( 1, MIN( N, 4 ) )
00190 IF( N.EQ.0 )
00191 $ NKL = 1
00192 NKU = NKL
00193 NIMAT = NTYPES
00194 IF( N.LE.0 )
00195 $ NIMAT = 1
00196
00197 DO 140 IKL = 1, NKL
00198
00199
00200
00201
00202 IF( IKL.EQ.1 ) THEN
00203 KL = 0
00204 ELSE IF( IKL.EQ.2 ) THEN
00205 KL = MAX( N-1, 0 )
00206 ELSE IF( IKL.EQ.3 ) THEN
00207 KL = ( 3*N-1 ) / 4
00208 ELSE IF( IKL.EQ.4 ) THEN
00209 KL = ( N+1 ) / 4
00210 END IF
00211 DO 130 IKU = 1, NKU
00212
00213
00214
00215
00216
00217 IF( IKU.EQ.1 ) THEN
00218 KU = 0
00219 ELSE IF( IKU.EQ.2 ) THEN
00220 KU = MAX( N-1, 0 )
00221 ELSE IF( IKU.EQ.3 ) THEN
00222 KU = ( 3*N-1 ) / 4
00223 ELSE IF( IKU.EQ.4 ) THEN
00224 KU = ( N+1 ) / 4
00225 END IF
00226
00227
00228
00229
00230 LDA = KL + KU + 1
00231 LDAFB = 2*KL + KU + 1
00232 IF( LDA*N.GT.LA .OR. LDAFB*N.GT.LAFB ) THEN
00233 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00234 $ CALL ALADHD( NOUT, PATH )
00235 IF( LDA*N.GT.LA ) THEN
00236 WRITE( NOUT, FMT = 9999 )LA, N, KL, KU,
00237 $ N*( KL+KU+1 )
00238 NERRS = NERRS + 1
00239 END IF
00240 IF( LDAFB*N.GT.LAFB ) THEN
00241 WRITE( NOUT, FMT = 9998 )LAFB, N, KL, KU,
00242 $ N*( 2*KL+KU+1 )
00243 NERRS = NERRS + 1
00244 END IF
00245 GO TO 130
00246 END IF
00247
00248 DO 120 IMAT = 1, NIMAT
00249
00250
00251
00252 IF( .NOT.DOTYPE( IMAT ) )
00253 $ GO TO 120
00254
00255
00256
00257 ZEROT = IMAT.GE.2 .AND. IMAT.LE.4
00258 IF( ZEROT .AND. N.LT.IMAT-1 )
00259 $ GO TO 120
00260
00261
00262
00263
00264 CALL SLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM,
00265 $ MODE, CNDNUM, DIST )
00266 RCONDC = ONE / CNDNUM
00267
00268 SRNAMT = 'SLATMS'
00269 CALL SLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
00270 $ CNDNUM, ANORM, KL, KU, 'Z', A, LDA, WORK,
00271 $ INFO )
00272
00273
00274
00275 IF( INFO.NE.0 ) THEN
00276 CALL ALAERH( PATH, 'SLATMS', INFO, 0, ' ', N, N,
00277 $ KL, KU, -1, IMAT, NFAIL, NERRS, NOUT )
00278 GO TO 120
00279 END IF
00280
00281
00282
00283
00284 IZERO = 0
00285 IF( ZEROT ) THEN
00286 IF( IMAT.EQ.2 ) THEN
00287 IZERO = 1
00288 ELSE IF( IMAT.EQ.3 ) THEN
00289 IZERO = N
00290 ELSE
00291 IZERO = N / 2 + 1
00292 END IF
00293 IOFF = ( IZERO-1 )*LDA
00294 IF( IMAT.LT.4 ) THEN
00295 I1 = MAX( 1, KU+2-IZERO )
00296 I2 = MIN( KL+KU+1, KU+1+( N-IZERO ) )
00297 DO 20 I = I1, I2
00298 A( IOFF+I ) = ZERO
00299 20 CONTINUE
00300 ELSE
00301 DO 40 J = IZERO, N
00302 DO 30 I = MAX( 1, KU+2-J ),
00303 $ MIN( KL+KU+1, KU+1+( N-J ) )
00304 A( IOFF+I ) = ZERO
00305 30 CONTINUE
00306 IOFF = IOFF + LDA
00307 40 CONTINUE
00308 END IF
00309 END IF
00310
00311
00312
00313 CALL SLACPY( 'Full', KL+KU+1, N, A, LDA, ASAV, LDA )
00314
00315 DO 110 IEQUED = 1, 4
00316 EQUED = EQUEDS( IEQUED )
00317 IF( IEQUED.EQ.1 ) THEN
00318 NFACT = 3
00319 ELSE
00320 NFACT = 1
00321 END IF
00322
00323 DO 100 IFACT = 1, NFACT
00324 FACT = FACTS( IFACT )
00325 PREFAC = LSAME( FACT, 'F' )
00326 NOFACT = LSAME( FACT, 'N' )
00327 EQUIL = LSAME( FACT, 'E' )
00328
00329 IF( ZEROT ) THEN
00330 IF( PREFAC )
00331 $ GO TO 100
00332 RCONDO = ZERO
00333 RCONDI = ZERO
00334
00335 ELSE IF( .NOT.NOFACT ) THEN
00336
00337
00338
00339
00340
00341
00342 CALL SLACPY( 'Full', KL+KU+1, N, ASAV, LDA,
00343 $ AFB( KL+1 ), LDAFB )
00344 IF( EQUIL .OR. IEQUED.GT.1 ) THEN
00345
00346
00347
00348
00349 CALL SGBEQU( N, N, KL, KU, AFB( KL+1 ),
00350 $ LDAFB, S, S( N+1 ), ROWCND,
00351 $ COLCND, AMAX, INFO )
00352 IF( INFO.EQ.0 .AND. N.GT.0 ) THEN
00353 IF( LSAME( EQUED, 'R' ) ) THEN
00354 ROWCND = ZERO
00355 COLCND = ONE
00356 ELSE IF( LSAME( EQUED, 'C' ) ) THEN
00357 ROWCND = ONE
00358 COLCND = ZERO
00359 ELSE IF( LSAME( EQUED, 'B' ) ) THEN
00360 ROWCND = ZERO
00361 COLCND = ZERO
00362 END IF
00363
00364
00365
00366 CALL SLAQGB( N, N, KL, KU, AFB( KL+1 ),
00367 $ LDAFB, S, S( N+1 ),
00368 $ ROWCND, COLCND, AMAX,
00369 $ EQUED )
00370 END IF
00371 END IF
00372
00373
00374
00375
00376 IF( EQUIL ) THEN
00377 ROLDO = RCONDO
00378 ROLDI = RCONDI
00379 END IF
00380
00381
00382
00383 ANORMO = SLANGB( '1', N, KL, KU, AFB( KL+1 ),
00384 $ LDAFB, RWORK )
00385 ANORMI = SLANGB( 'I', N, KL, KU, AFB( KL+1 ),
00386 $ LDAFB, RWORK )
00387
00388
00389
00390 CALL SGBTRF( N, N, KL, KU, AFB, LDAFB, IWORK,
00391 $ INFO )
00392
00393
00394
00395 CALL SLASET( 'Full', N, N, ZERO, ONE, WORK,
00396 $ LDB )
00397 SRNAMT = 'SGBTRS'
00398 CALL SGBTRS( 'No transpose', N, KL, KU, N,
00399 $ AFB, LDAFB, IWORK, WORK, LDB,
00400 $ INFO )
00401
00402
00403
00404 AINVNM = SLANGE( '1', N, N, WORK, LDB,
00405 $ RWORK )
00406 IF( ANORMO.LE.ZERO .OR. AINVNM.LE.ZERO ) THEN
00407 RCONDO = ONE
00408 ELSE
00409 RCONDO = ( ONE / ANORMO ) / AINVNM
00410 END IF
00411
00412
00413
00414
00415 AINVNM = SLANGE( 'I', N, N, WORK, LDB,
00416 $ RWORK )
00417 IF( ANORMI.LE.ZERO .OR. AINVNM.LE.ZERO ) THEN
00418 RCONDI = ONE
00419 ELSE
00420 RCONDI = ( ONE / ANORMI ) / AINVNM
00421 END IF
00422 END IF
00423
00424 DO 90 ITRAN = 1, NTRAN
00425
00426
00427
00428 TRANS = TRANSS( ITRAN )
00429 IF( ITRAN.EQ.1 ) THEN
00430 RCONDC = RCONDO
00431 ELSE
00432 RCONDC = RCONDI
00433 END IF
00434
00435
00436
00437 CALL SLACPY( 'Full', KL+KU+1, N, ASAV, LDA,
00438 $ A, LDA )
00439
00440
00441
00442
00443 SRNAMT = 'SLARHS'
00444 CALL SLARHS( PATH, XTYPE, 'Full', TRANS, N,
00445 $ N, KL, KU, NRHS, A, LDA, XACT,
00446 $ LDB, B, LDB, ISEED, INFO )
00447 XTYPE = 'C'
00448 CALL SLACPY( 'Full', N, NRHS, B, LDB, BSAV,
00449 $ LDB )
00450
00451 IF( NOFACT .AND. ITRAN.EQ.1 ) THEN
00452
00453
00454
00455
00456
00457
00458 CALL SLACPY( 'Full', KL+KU+1, N, A, LDA,
00459 $ AFB( KL+1 ), LDAFB )
00460 CALL SLACPY( 'Full', N, NRHS, B, LDB, X,
00461 $ LDB )
00462
00463 SRNAMT = 'SGBSV '
00464 CALL SGBSV( N, KL, KU, NRHS, AFB, LDAFB,
00465 $ IWORK, X, LDB, INFO )
00466
00467
00468
00469 IF( INFO.NE.IZERO )
00470 $ CALL ALAERH( PATH, 'SGBSV ', INFO,
00471 $ IZERO, ' ', N, N, KL, KU,
00472 $ NRHS, IMAT, NFAIL, NERRS,
00473 $ NOUT )
00474
00475
00476
00477
00478 CALL SGBT01( N, N, KL, KU, A, LDA, AFB,
00479 $ LDAFB, IWORK, WORK,
00480 $ RESULT( 1 ) )
00481 NT = 1
00482 IF( IZERO.EQ.0 ) THEN
00483
00484
00485
00486
00487 CALL SLACPY( 'Full', N, NRHS, B, LDB,
00488 $ WORK, LDB )
00489 CALL SGBT02( 'No transpose', N, N, KL,
00490 $ KU, NRHS, A, LDA, X, LDB,
00491 $ WORK, LDB, RESULT( 2 ) )
00492
00493
00494
00495
00496 CALL SGET04( N, NRHS, X, LDB, XACT,
00497 $ LDB, RCONDC, RESULT( 3 ) )
00498 NT = 3
00499 END IF
00500
00501
00502
00503
00504 DO 50 K = 1, NT
00505 IF( RESULT( K ).GE.THRESH ) THEN
00506 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00507 $ CALL ALADHD( NOUT, PATH )
00508 WRITE( NOUT, FMT = 9997 )'SGBSV ',
00509 $ N, KL, KU, IMAT, K, RESULT( K )
00510 NFAIL = NFAIL + 1
00511 END IF
00512 50 CONTINUE
00513 NRUN = NRUN + NT
00514 END IF
00515
00516
00517
00518 IF( .NOT.PREFAC )
00519 $ CALL SLASET( 'Full', 2*KL+KU+1, N, ZERO,
00520 $ ZERO, AFB, LDAFB )
00521 CALL SLASET( 'Full', N, NRHS, ZERO, ZERO, X,
00522 $ LDB )
00523 IF( IEQUED.GT.1 .AND. N.GT.0 ) THEN
00524
00525
00526
00527
00528 CALL SLAQGB( N, N, KL, KU, A, LDA, S,
00529 $ S( N+1 ), ROWCND, COLCND,
00530 $ AMAX, EQUED )
00531 END IF
00532
00533
00534
00535
00536 SRNAMT = 'SGBSVX'
00537 CALL SGBSVX( FACT, TRANS, N, KL, KU, NRHS, A,
00538 $ LDA, AFB, LDAFB, IWORK, EQUED,
00539 $ S, S( N+1 ), B, LDB, X, LDB,
00540 $ RCOND, RWORK, RWORK( NRHS+1 ),
00541 $ WORK, IWORK( N+1 ), INFO )
00542
00543
00544
00545 IF( INFO.NE.IZERO )
00546 $ CALL ALAERH( PATH, 'SGBSVX', INFO, IZERO,
00547 $ FACT // TRANS, N, N, KL, KU,
00548 $ NRHS, IMAT, NFAIL, NERRS,
00549 $ NOUT )
00550
00551
00552
00553
00554 IF( INFO.NE.0 ) THEN
00555 ANRMPV = ZERO
00556 DO 70 J = 1, INFO
00557 DO 60 I = MAX( KU+2-J, 1 ),
00558 $ MIN( N+KU+1-J, KL+KU+1 )
00559 ANRMPV = MAX( ANRMPV,
00560 $ ABS( A( I+( J-1 )*LDA ) ) )
00561 60 CONTINUE
00562 70 CONTINUE
00563 RPVGRW = SLANTB( 'M', 'U', 'N', INFO,
00564 $ MIN( INFO-1, KL+KU ),
00565 $ AFB( MAX( 1, KL+KU+2-INFO ) ),
00566 $ LDAFB, WORK )
00567 IF( RPVGRW.EQ.ZERO ) THEN
00568 RPVGRW = ONE
00569 ELSE
00570 RPVGRW = ANRMPV / RPVGRW
00571 END IF
00572 ELSE
00573 RPVGRW = SLANTB( 'M', 'U', 'N', N, KL+KU,
00574 $ AFB, LDAFB, WORK )
00575 IF( RPVGRW.EQ.ZERO ) THEN
00576 RPVGRW = ONE
00577 ELSE
00578 RPVGRW = SLANGB( 'M', N, KL, KU, A,
00579 $ LDA, WORK ) / RPVGRW
00580 END IF
00581 END IF
00582 RESULT( 7 ) = ABS( RPVGRW-WORK( 1 ) ) /
00583 $ MAX( WORK( 1 ), RPVGRW ) /
00584 $ SLAMCH( 'E' )
00585
00586 IF( .NOT.PREFAC ) THEN
00587
00588
00589
00590
00591 CALL SGBT01( N, N, KL, KU, A, LDA, AFB,
00592 $ LDAFB, IWORK, WORK,
00593 $ RESULT( 1 ) )
00594 K1 = 1
00595 ELSE
00596 K1 = 2
00597 END IF
00598
00599 IF( INFO.EQ.0 ) THEN
00600 TRFCON = .FALSE.
00601
00602
00603
00604 CALL SLACPY( 'Full', N, NRHS, BSAV, LDB,
00605 $ WORK, LDB )
00606 CALL SGBT02( TRANS, N, N, KL, KU, NRHS,
00607 $ ASAV, LDA, X, LDB, WORK, LDB,
00608 $ RESULT( 2 ) )
00609
00610
00611
00612
00613 IF( NOFACT .OR. ( PREFAC .AND.
00614 $ LSAME( EQUED, 'N' ) ) ) THEN
00615 CALL SGET04( N, NRHS, X, LDB, XACT,
00616 $ LDB, RCONDC, RESULT( 3 ) )
00617 ELSE
00618 IF( ITRAN.EQ.1 ) THEN
00619 ROLDC = ROLDO
00620 ELSE
00621 ROLDC = ROLDI
00622 END IF
00623 CALL SGET04( N, NRHS, X, LDB, XACT,
00624 $ LDB, ROLDC, RESULT( 3 ) )
00625 END IF
00626
00627
00628
00629
00630 CALL SGBT05( TRANS, N, KL, KU, NRHS, ASAV,
00631 $ LDA, B, LDB, X, LDB, XACT,
00632 $ LDB, RWORK, RWORK( NRHS+1 ),
00633 $ RESULT( 4 ) )
00634 ELSE
00635 TRFCON = .TRUE.
00636 END IF
00637
00638
00639
00640
00641 RESULT( 6 ) = SGET06( RCOND, RCONDC )
00642
00643
00644
00645
00646 IF( .NOT.TRFCON ) THEN
00647 DO 80 K = K1, NTESTS
00648 IF( RESULT( K ).GE.THRESH ) THEN
00649 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00650 $ CALL ALADHD( NOUT, PATH )
00651 IF( PREFAC ) THEN
00652 WRITE( NOUT, FMT = 9995 )
00653 $ 'SGBSVX', FACT, TRANS, N, KL,
00654 $ KU, EQUED, IMAT, K,
00655 $ RESULT( K )
00656 ELSE
00657 WRITE( NOUT, FMT = 9996 )
00658 $ 'SGBSVX', FACT, TRANS, N, KL,
00659 $ KU, IMAT, K, RESULT( K )
00660 END IF
00661 NFAIL = NFAIL + 1
00662 END IF
00663 80 CONTINUE
00664 NRUN = NRUN + 7 - K1
00665 ELSE
00666 IF( RESULT( 1 ).GE.THRESH .AND. .NOT.
00667 $ PREFAC ) THEN
00668 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00669 $ CALL ALADHD( NOUT, PATH )
00670 IF( PREFAC ) THEN
00671 WRITE( NOUT, FMT = 9995 )'SGBSVX',
00672 $ FACT, TRANS, N, KL, KU, EQUED,
00673 $ IMAT, 1, RESULT( 1 )
00674 ELSE
00675 WRITE( NOUT, FMT = 9996 )'SGBSVX',
00676 $ FACT, TRANS, N, KL, KU, IMAT, 1,
00677 $ RESULT( 1 )
00678 END IF
00679 NFAIL = NFAIL + 1
00680 NRUN = NRUN + 1
00681 END IF
00682 IF( RESULT( 6 ).GE.THRESH ) THEN
00683 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00684 $ CALL ALADHD( NOUT, PATH )
00685 IF( PREFAC ) THEN
00686 WRITE( NOUT, FMT = 9995 )'SGBSVX',
00687 $ FACT, TRANS, N, KL, KU, EQUED,
00688 $ IMAT, 6, RESULT( 6 )
00689 ELSE
00690 WRITE( NOUT, FMT = 9996 )'SGBSVX',
00691 $ FACT, TRANS, N, KL, KU, IMAT, 6,
00692 $ RESULT( 6 )
00693 END IF
00694 NFAIL = NFAIL + 1
00695 NRUN = NRUN + 1
00696 END IF
00697 IF( RESULT( 7 ).GE.THRESH ) THEN
00698 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00699 $ CALL ALADHD( NOUT, PATH )
00700 IF( PREFAC ) THEN
00701 WRITE( NOUT, FMT = 9995 )'SGBSVX',
00702 $ FACT, TRANS, N, KL, KU, EQUED,
00703 $ IMAT, 7, RESULT( 7 )
00704 ELSE
00705 WRITE( NOUT, FMT = 9996 )'SGBSVX',
00706 $ FACT, TRANS, N, KL, KU, IMAT, 7,
00707 $ RESULT( 7 )
00708 END IF
00709 NFAIL = NFAIL + 1
00710 NRUN = NRUN + 1
00711 END IF
00712
00713 END IF
00714
00715
00716
00717
00718
00719 CALL SLACPY( 'Full', KL+KU+1, N, ASAV, LDA, A,
00720 $ LDA )
00721 CALL SLACPY( 'Full', N, NRHS, BSAV, LDB, B, LDB )
00722
00723 IF( .NOT.PREFAC )
00724 $ CALL SLASET( 'Full', 2*KL+KU+1, N, ZERO, ZERO,
00725 $ AFB, LDAFB )
00726 CALL SLASET( 'Full', N, NRHS, ZERO, ZERO, X, LDB )
00727 IF( IEQUED.GT.1 .AND. N.GT.0 ) THEN
00728
00729
00730
00731
00732 CALL SLAQGB( N, N, KL, KU, A, LDA, S,
00733 $ S( N+1 ), ROWCND, COLCND, AMAX, EQUED )
00734 END IF
00735
00736
00737
00738
00739 SRNAMT = 'SGBSVXX'
00740 N_ERR_BNDS = 3
00741 CALL SGBSVXX( FACT, TRANS, N, KL, KU, NRHS, A, LDA,
00742 $ AFB, LDAFB, IWORK, EQUED, S, S( N+1 ), B, LDB,
00743 $ X, LDB, RCOND, RPVGRW_SVXX, BERR, N_ERR_BNDS,
00744 $ ERRBNDS_N, ERRBNDS_C, 0, ZERO, WORK,
00745 $ IWORK( N+1 ), INFO )
00746
00747
00748
00749 IF( INFO.EQ.N+1 ) GOTO 90
00750 IF( INFO.NE.IZERO ) THEN
00751 CALL ALAERH( PATH, 'SGBSVXX', INFO, IZERO,
00752 $ FACT // TRANS, N, N, -1, -1, NRHS,
00753 $ IMAT, NFAIL, NERRS, NOUT )
00754 GOTO 90
00755 END IF
00756
00757
00758
00759
00760
00761 IF ( INFO .GT. 0 .AND. INFO .LT. N+1 ) THEN
00762 RPVGRW = SLA_GBRPVGRW(N, KL, KU, INFO, A, LDA,
00763 $ AFB, LDAFB )
00764 ELSE
00765 RPVGRW = SLA_GBRPVGRW(N, KL, KU, N, A, LDA,
00766 $ AFB, LDAFB )
00767 ENDIF
00768
00769 RESULT( 7 ) = ABS( RPVGRW-rpvgrw_svxx ) /
00770 $ MAX( rpvgrw_svxx, RPVGRW ) /
00771 $ SLAMCH( 'E' )
00772
00773 IF( .NOT.PREFAC ) THEN
00774
00775
00776
00777
00778 CALL SGBT01( N, N, KL, KU, A, LDA, AFB, LDAFB,
00779 $ IWORK, WORK,
00780 $ RESULT( 1 ) )
00781 K1 = 1
00782 ELSE
00783 K1 = 2
00784 END IF
00785
00786 IF( INFO.EQ.0 ) THEN
00787 TRFCON = .FALSE.
00788
00789
00790
00791 CALL SLACPY( 'Full', N, NRHS, BSAV, LDB, WORK,
00792 $ LDB )
00793 CALL SGBT02( TRANS, N, N, KL, KU, NRHS, ASAV,
00794 $ LDA, X, LDB, WORK, LDB,
00795 $ RESULT( 2 ) )
00796
00797
00798
00799 IF( NOFACT .OR. ( PREFAC .AND. LSAME( EQUED,
00800 $ 'N' ) ) ) THEN
00801 CALL SGET04( N, NRHS, X, LDB, XACT, LDB,
00802 $ RCONDC, RESULT( 3 ) )
00803 ELSE
00804 IF( ITRAN.EQ.1 ) THEN
00805 ROLDC = ROLDO
00806 ELSE
00807 ROLDC = ROLDI
00808 END IF
00809 CALL SGET04( N, NRHS, X, LDB, XACT, LDB,
00810 $ ROLDC, RESULT( 3 ) )
00811 END IF
00812 ELSE
00813 TRFCON = .TRUE.
00814 END IF
00815
00816
00817
00818
00819 RESULT( 6 ) = SGET06( RCOND, RCONDC )
00820
00821
00822
00823
00824 IF( .NOT.TRFCON ) THEN
00825 DO 45 K = K1, NTESTS
00826 IF( RESULT( K ).GE.THRESH ) THEN
00827 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00828 $ CALL ALADHD( NOUT, PATH )
00829 IF( PREFAC ) THEN
00830 WRITE( NOUT, FMT = 9995 )'SGBSVXX',
00831 $ FACT, TRANS, N, KL, KU, EQUED,
00832 $ IMAT, K, RESULT( K )
00833 ELSE
00834 WRITE( NOUT, FMT = 9996 )'SGBSVXX',
00835 $ FACT, TRANS, N, KL, KU, IMAT, K,
00836 $ RESULT( K )
00837 END IF
00838 NFAIL = NFAIL + 1
00839 END IF
00840 45 CONTINUE
00841 NRUN = NRUN + 7 - K1
00842 ELSE
00843 IF( RESULT( 1 ).GE.THRESH .AND. .NOT.PREFAC )
00844 $ THEN
00845 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00846 $ CALL ALADHD( NOUT, PATH )
00847 IF( PREFAC ) THEN
00848 WRITE( NOUT, FMT = 9995 )'SGBSVXX', FACT,
00849 $ TRANS, N, KL, KU, EQUED, IMAT, 1,
00850 $ RESULT( 1 )
00851 ELSE
00852 WRITE( NOUT, FMT = 9996 )'SGBSVXX', FACT,
00853 $ TRANS, N, KL, KU, IMAT, 1,
00854 $ RESULT( 1 )
00855 END IF
00856 NFAIL = NFAIL + 1
00857 NRUN = NRUN + 1
00858 END IF
00859 IF( RESULT( 6 ).GE.THRESH ) THEN
00860 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00861 $ CALL ALADHD( NOUT, PATH )
00862 IF( PREFAC ) THEN
00863 WRITE( NOUT, FMT = 9995 )'SGBSVXX', FACT,
00864 $ TRANS, N, KL, KU, EQUED, IMAT, 6,
00865 $ RESULT( 6 )
00866 ELSE
00867 WRITE( NOUT, FMT = 9996 )'SGBSVXX', FACT,
00868 $ TRANS, N, KL, KU, IMAT, 6,
00869 $ RESULT( 6 )
00870 END IF
00871 NFAIL = NFAIL + 1
00872 NRUN = NRUN + 1
00873 END IF
00874 IF( RESULT( 7 ).GE.THRESH ) THEN
00875 IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00876 $ CALL ALADHD( NOUT, PATH )
00877 IF( PREFAC ) THEN
00878 WRITE( NOUT, FMT = 9995 )'SGBSVXX', FACT,
00879 $ TRANS, N, KL, KU, EQUED, IMAT, 7,
00880 $ RESULT( 7 )
00881 ELSE
00882 WRITE( NOUT, FMT = 9996 )'SGBSVXX', FACT,
00883 $ TRANS, N, KL, KU, IMAT, 7,
00884 $ RESULT( 7 )
00885 END IF
00886 NFAIL = NFAIL + 1
00887 NRUN = NRUN + 1
00888 END IF
00889
00890 END IF
00891
00892 90 CONTINUE
00893 100 CONTINUE
00894 110 CONTINUE
00895 120 CONTINUE
00896 130 CONTINUE
00897 140 CONTINUE
00898 150 CONTINUE
00899
00900
00901
00902 CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
00903
00904
00905
00906
00907 CALL SEBCHVXX(THRESH, PATH)
00908
00909 9999 FORMAT( ' *** In SDRVGB, LA=', I5, ' is too small for N=', I5,
00910 $ ', KU=', I5, ', KL=', I5, / ' ==> Increase LA to at least ',
00911 $ I5 )
00912 9998 FORMAT( ' *** In SDRVGB, LAFB=', I5, ' is too small for N=', I5,
00913 $ ', KU=', I5, ', KL=', I5, /
00914 $ ' ==> Increase LAFB to at least ', I5 )
00915 9997 FORMAT( 1X, A, ', N=', I5, ', KL=', I5, ', KU=', I5, ', type ',
00916 $ I1, ', test(', I1, ')=', G12.5 )
00917 9996 FORMAT( 1X, A, '( ''', A1, ''',''', A1, ''',', I5, ',', I5, ',',
00918 $ I5, ',...), type ', I1, ', test(', I1, ')=', G12.5 )
00919 9995 FORMAT( 1X, A, '( ''', A1, ''',''', A1, ''',', I5, ',', I5, ',',
00920 $ I5, ',...), EQUED=''', A1, ''', type ', I1, ', test(', I1,
00921 $ ')=', G12.5 )
00922
00923 RETURN
00924
00925
00926
00927 END