00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 struct {
00019 integer infot, nunit;
00020 logical ok, lerr;
00021 } infoc_;
00022
00023 #define infoc_1 infoc_
00024
00025 struct {
00026 char srnamt[32];
00027 } srnamc_;
00028
00029 #define srnamc_1 srnamc_
00030
00031
00032
00033 static integer c__1 = 1;
00034 static integer c__2 = 2;
00035 static integer c__0 = 0;
00036 static integer c_n1 = -1;
00037 static doublereal c_b48 = 0.;
00038 static doublereal c_b49 = 1.;
00039 static integer c__6 = 6;
00040 static integer c__7 = 7;
00041
00042 int ddrvgb_(logical *dotype, integer *nn, integer *nval,
00043 integer *nrhs, doublereal *thresh, logical *tsterr, doublereal *a,
00044 integer *la, doublereal *afb, integer *lafb, doublereal *asav,
00045 doublereal *b, doublereal *bsav, doublereal *x, doublereal *xact,
00046 doublereal *s, doublereal *work, doublereal *rwork, integer *iwork,
00047 integer *nout)
00048 {
00049
00050
00051 static integer iseedy[4] = { 1988,1989,1990,1991 };
00052 static char transs[1*3] = "N" "T" "C";
00053 static char facts[1*3] = "F" "N" "E";
00054 static char equeds[1*4] = "N" "R" "C" "B";
00055
00056
00057 static char fmt_9999[] = "(\002 *** In DDRVGB, LA=\002,i5,\002 is too sm"
00058 "all for N=\002,i5,\002, KU=\002,i5,\002, KL=\002,i5,/\002 ==> In"
00059 "crease LA to at least \002,i5)";
00060 static char fmt_9998[] = "(\002 *** In DDRVGB, LAFB=\002,i5,\002 is too "
00061 "small for N=\002,i5,\002, KU=\002,i5,\002, KL=\002,i5,/\002 ==> "
00062 "Increase LAFB to at least \002,i5)";
00063 static char fmt_9997[] = "(1x,a,\002, N=\002,i5,\002, KL=\002,i5,\002, K"
00064 "U=\002,i5,\002, type \002,i1,\002, test(\002,i1,\002)=\002,g12.5)"
00065 ;
00066 static char fmt_9995[] = "(1x,a,\002( '\002,a1,\002','\002,a1,\002',\002"
00067 ",i5,\002,\002,i5,\002,\002,i5,\002,...), EQUED='\002,a1,\002', t"
00068 "ype \002,i1,\002, test(\002,i1,\002)=\002,g12.5)";
00069 static char fmt_9996[] = "(1x,a,\002( '\002,a1,\002','\002,a1,\002',\002"
00070 ",i5,\002,\002,i5,\002,\002,i5,\002,...), type \002,i1,\002, test("
00071 "\002,i1,\002)=\002,g12.5)";
00072
00073
00074 address a__1[2];
00075 integer i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8, i__9, i__10,
00076 i__11[2];
00077 doublereal d__1, d__2, d__3;
00078 char ch__1[2];
00079
00080
00081 int s_copy(char *, char *, ftnlen, ftnlen);
00082 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00083 int s_cat(char *, char **, integer *, integer *, ftnlen);
00084
00085
00086 integer i__, j, k, n, i1, i2, k1, nb, in, kl, ku, nt, lda, ldb, ikl, nkl,
00087 iku, nku;
00088 char fact[1];
00089 integer ioff, mode;
00090 doublereal amax;
00091 char path[3];
00092 integer imat, info;
00093 char dist[1], type__[1];
00094 integer nrun, ldafb;
00095 extern int dgbt01_(integer *, integer *, integer *,
00096 integer *, doublereal *, integer *, doublereal *, integer *,
00097 integer *, doublereal *, doublereal *), dgbt02_(char *, integer *,
00098 integer *, integer *, integer *, integer *, doublereal *,
00099 integer *, doublereal *, integer *, doublereal *, integer *,
00100 doublereal *), dgbt05_(char *, integer *, integer *,
00101 integer *, integer *, doublereal *, integer *, doublereal *,
00102 integer *, doublereal *, integer *, doublereal *, integer *,
00103 doublereal *, doublereal *, doublereal *);
00104 integer ifact;
00105 extern int dget04_(integer *, integer *, doublereal *,
00106 integer *, doublereal *, integer *, doublereal *, doublereal *);
00107 integer nfail, iseed[4], nfact;
00108 extern doublereal dget06_(doublereal *, doublereal *);
00109 extern logical lsame_(char *, char *);
00110 char equed[1];
00111 integer nbmin;
00112 doublereal rcond, roldc;
00113 extern int dgbsv_(integer *, integer *, integer *,
00114 integer *, doublereal *, integer *, integer *, doublereal *,
00115 integer *, integer *);
00116 integer nimat;
00117 doublereal roldi, anorm;
00118 integer itran;
00119 logical equil;
00120 doublereal roldo;
00121 char trans[1];
00122 integer izero, nerrs;
00123 logical zerot;
00124 char xtype[1];
00125 extern int dlatb4_(char *, integer *, integer *, integer
00126 *, char *, integer *, integer *, doublereal *, integer *,
00127 doublereal *, char *), aladhd_(integer *,
00128 char *);
00129 extern doublereal dlangb_(char *, integer *, integer *, integer *,
00130 doublereal *, integer *, doublereal *), dlamch_(char *), dlange_(char *, integer *, integer *, doublereal *,
00131 integer *, doublereal *);
00132 extern int dlaqgb_(integer *, integer *, integer *,
00133 integer *, doublereal *, integer *, doublereal *, doublereal *,
00134 doublereal *, doublereal *, doublereal *, char *),
00135 alaerh_(char *, char *, integer *, integer *, char *, integer *,
00136 integer *, integer *, integer *, integer *, integer *, integer *,
00137 integer *, integer *);
00138 logical prefac;
00139 doublereal colcnd;
00140 extern doublereal dlantb_(char *, char *, char *, integer *, integer *,
00141 doublereal *, integer *, doublereal *);
00142 extern int dgbequ_(integer *, integer *, integer *,
00143 integer *, doublereal *, integer *, doublereal *, doublereal *,
00144 doublereal *, doublereal *, doublereal *, integer *);
00145 doublereal rcondc;
00146 logical nofact;
00147 extern int dgbtrf_(integer *, integer *, integer *,
00148 integer *, doublereal *, integer *, integer *, integer *);
00149 integer iequed;
00150 extern int dlacpy_(char *, integer *, integer *,
00151 doublereal *, integer *, doublereal *, integer *);
00152 doublereal rcondi;
00153 extern int dlarhs_(char *, char *, char *, char *,
00154 integer *, integer *, integer *, integer *, integer *, doublereal
00155 *, integer *, doublereal *, integer *, doublereal *, integer *,
00156 integer *, integer *), dlaset_(
00157 char *, integer *, integer *, doublereal *, doublereal *,
00158 doublereal *, integer *), alasvm_(char *, integer *,
00159 integer *, integer *, integer *);
00160 doublereal cndnum, anormi, rcondo, ainvnm;
00161 extern int dgbtrs_(char *, integer *, integer *, integer
00162 *, integer *, doublereal *, integer *, integer *, doublereal *,
00163 integer *, integer *), dlatms_(integer *, integer *, char
00164 *, integer *, char *, doublereal *, integer *, doublereal *,
00165 doublereal *, integer *, integer *, char *, doublereal *, integer
00166 *, doublereal *, integer *);
00167 logical trfcon;
00168 doublereal anormo, rowcnd;
00169 extern int dgbsvx_(char *, char *, integer *, integer *,
00170 integer *, integer *, doublereal *, integer *, doublereal *,
00171 integer *, integer *, char *, doublereal *, doublereal *,
00172 doublereal *, integer *, doublereal *, integer *, doublereal *,
00173 doublereal *, doublereal *, doublereal *, integer *, integer *), xlaenv_(integer *, integer *);
00174 doublereal anrmpv;
00175 extern int derrvx_(char *, integer *);
00176 doublereal result[7], rpvgrw;
00177
00178
00179 static cilist io___26 = { 0, 0, 0, fmt_9999, 0 };
00180 static cilist io___27 = { 0, 0, 0, fmt_9998, 0 };
00181 static cilist io___65 = { 0, 0, 0, fmt_9997, 0 };
00182 static cilist io___72 = { 0, 0, 0, fmt_9995, 0 };
00183 static cilist io___73 = { 0, 0, 0, fmt_9996, 0 };
00184 static cilist io___74 = { 0, 0, 0, fmt_9995, 0 };
00185 static cilist io___75 = { 0, 0, 0, fmt_9996, 0 };
00186 static cilist io___76 = { 0, 0, 0, fmt_9995, 0 };
00187 static cilist io___77 = { 0, 0, 0, fmt_9996, 0 };
00188 static cilist io___78 = { 0, 0, 0, fmt_9995, 0 };
00189 static cilist io___79 = { 0, 0, 0, fmt_9996, 0 };
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288 --iwork;
00289 --rwork;
00290 --work;
00291 --s;
00292 --xact;
00293 --x;
00294 --bsav;
00295 --b;
00296 --asav;
00297 --afb;
00298 --a;
00299 --nval;
00300 --dotype;
00301
00302
00303
00304
00305
00306
00307
00308 s_copy(path, "Double precision", (ftnlen)1, (ftnlen)16);
00309 s_copy(path + 1, "GB", (ftnlen)2, (ftnlen)2);
00310 nrun = 0;
00311 nfail = 0;
00312 nerrs = 0;
00313 for (i__ = 1; i__ <= 4; ++i__) {
00314 iseed[i__ - 1] = iseedy[i__ - 1];
00315
00316 }
00317
00318
00319
00320 if (*tsterr) {
00321 derrvx_(path, nout);
00322 }
00323 infoc_1.infot = 0;
00324
00325
00326
00327 nb = 1;
00328 nbmin = 2;
00329 xlaenv_(&c__1, &nb);
00330 xlaenv_(&c__2, &nbmin);
00331
00332
00333
00334 i__1 = *nn;
00335 for (in = 1; in <= i__1; ++in) {
00336 n = nval[in];
00337 ldb = max(n,1);
00338 *(unsigned char *)xtype = 'N';
00339
00340
00341
00342
00343 i__2 = 1, i__3 = min(n,4);
00344 nkl = max(i__2,i__3);
00345 if (n == 0) {
00346 nkl = 1;
00347 }
00348 nku = nkl;
00349 nimat = 8;
00350 if (n <= 0) {
00351 nimat = 1;
00352 }
00353
00354 i__2 = nkl;
00355 for (ikl = 1; ikl <= i__2; ++ikl) {
00356
00357
00358
00359
00360 if (ikl == 1) {
00361 kl = 0;
00362 } else if (ikl == 2) {
00363
00364 i__3 = n - 1;
00365 kl = max(i__3,0);
00366 } else if (ikl == 3) {
00367 kl = (n * 3 - 1) / 4;
00368 } else if (ikl == 4) {
00369 kl = (n + 1) / 4;
00370 }
00371 i__3 = nku;
00372 for (iku = 1; iku <= i__3; ++iku) {
00373
00374
00375
00376
00377
00378 if (iku == 1) {
00379 ku = 0;
00380 } else if (iku == 2) {
00381
00382 i__4 = n - 1;
00383 ku = max(i__4,0);
00384 } else if (iku == 3) {
00385 ku = (n * 3 - 1) / 4;
00386 } else if (iku == 4) {
00387 ku = (n + 1) / 4;
00388 }
00389
00390
00391
00392
00393 lda = kl + ku + 1;
00394 ldafb = (kl << 1) + ku + 1;
00395 if (lda * n > *la || ldafb * n > *lafb) {
00396 if (nfail == 0 && nerrs == 0) {
00397 aladhd_(nout, path);
00398 }
00399 if (lda * n > *la) {
00400 io___26.ciunit = *nout;
00401 s_wsfe(&io___26);
00402 do_fio(&c__1, (char *)&(*la), (ftnlen)sizeof(integer))
00403 ;
00404 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00405 do_fio(&c__1, (char *)&kl, (ftnlen)sizeof(integer));
00406 do_fio(&c__1, (char *)&ku, (ftnlen)sizeof(integer));
00407 i__4 = n * (kl + ku + 1);
00408 do_fio(&c__1, (char *)&i__4, (ftnlen)sizeof(integer));
00409 e_wsfe();
00410 ++nerrs;
00411 }
00412 if (ldafb * n > *lafb) {
00413 io___27.ciunit = *nout;
00414 s_wsfe(&io___27);
00415 do_fio(&c__1, (char *)&(*lafb), (ftnlen)sizeof(
00416 integer));
00417 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00418 do_fio(&c__1, (char *)&kl, (ftnlen)sizeof(integer));
00419 do_fio(&c__1, (char *)&ku, (ftnlen)sizeof(integer));
00420 i__4 = n * ((kl << 1) + ku + 1);
00421 do_fio(&c__1, (char *)&i__4, (ftnlen)sizeof(integer));
00422 e_wsfe();
00423 ++nerrs;
00424 }
00425 goto L130;
00426 }
00427
00428 i__4 = nimat;
00429 for (imat = 1; imat <= i__4; ++imat) {
00430
00431
00432
00433 if (! dotype[imat]) {
00434 goto L120;
00435 }
00436
00437
00438
00439 zerot = imat >= 2 && imat <= 4;
00440 if (zerot && n < imat - 1) {
00441 goto L120;
00442 }
00443
00444
00445
00446
00447 dlatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, &
00448 mode, &cndnum, dist);
00449 rcondc = 1. / cndnum;
00450
00451 s_copy(srnamc_1.srnamt, "DLATMS", (ftnlen)32, (ftnlen)6);
00452 dlatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, &
00453 cndnum, &anorm, &kl, &ku, "Z", &a[1], &lda, &work[
00454 1], &info);
00455
00456
00457
00458 if (info != 0) {
00459 alaerh_(path, "DLATMS", &info, &c__0, " ", &n, &n, &
00460 kl, &ku, &c_n1, &imat, &nfail, &nerrs, nout);
00461 goto L120;
00462 }
00463
00464
00465
00466
00467 izero = 0;
00468 if (zerot) {
00469 if (imat == 2) {
00470 izero = 1;
00471 } else if (imat == 3) {
00472 izero = n;
00473 } else {
00474 izero = n / 2 + 1;
00475 }
00476 ioff = (izero - 1) * lda;
00477 if (imat < 4) {
00478
00479 i__5 = 1, i__6 = ku + 2 - izero;
00480 i1 = max(i__5,i__6);
00481
00482 i__5 = kl + ku + 1, i__6 = ku + 1 + (n - izero);
00483 i2 = min(i__5,i__6);
00484 i__5 = i2;
00485 for (i__ = i1; i__ <= i__5; ++i__) {
00486 a[ioff + i__] = 0.;
00487
00488 }
00489 } else {
00490 i__5 = n;
00491 for (j = izero; j <= i__5; ++j) {
00492
00493 i__6 = 1, i__7 = ku + 2 - j;
00494
00495 i__9 = kl + ku + 1, i__10 = ku + 1 + (n - j);
00496 i__8 = min(i__9,i__10);
00497 for (i__ = max(i__6,i__7); i__ <= i__8; ++i__)
00498 {
00499 a[ioff + i__] = 0.;
00500
00501 }
00502 ioff += lda;
00503
00504 }
00505 }
00506 }
00507
00508
00509
00510 i__5 = kl + ku + 1;
00511 dlacpy_("Full", &i__5, &n, &a[1], &lda, &asav[1], &lda);
00512
00513 for (iequed = 1; iequed <= 4; ++iequed) {
00514 *(unsigned char *)equed = *(unsigned char *)&equeds[
00515 iequed - 1];
00516 if (iequed == 1) {
00517 nfact = 3;
00518 } else {
00519 nfact = 1;
00520 }
00521
00522 i__5 = nfact;
00523 for (ifact = 1; ifact <= i__5; ++ifact) {
00524 *(unsigned char *)fact = *(unsigned char *)&facts[
00525 ifact - 1];
00526 prefac = lsame_(fact, "F");
00527 nofact = lsame_(fact, "N");
00528 equil = lsame_(fact, "E");
00529
00530 if (zerot) {
00531 if (prefac) {
00532 goto L100;
00533 }
00534 rcondo = 0.;
00535 rcondi = 0.;
00536
00537 } else if (! nofact) {
00538
00539
00540
00541
00542
00543
00544 i__8 = kl + ku + 1;
00545 dlacpy_("Full", &i__8, &n, &asav[1], &lda, &
00546 afb[kl + 1], &ldafb);
00547 if (equil || iequed > 1) {
00548
00549
00550
00551
00552 dgbequ_(&n, &n, &kl, &ku, &afb[kl + 1], &
00553 ldafb, &s[1], &s[n + 1], &rowcnd,
00554 &colcnd, &amax, &info);
00555 if (info == 0 && n > 0) {
00556 if (lsame_(equed, "R")) {
00557 rowcnd = 0.;
00558 colcnd = 1.;
00559 } else if (lsame_(equed, "C")) {
00560 rowcnd = 1.;
00561 colcnd = 0.;
00562 } else if (lsame_(equed, "B")) {
00563 rowcnd = 0.;
00564 colcnd = 0.;
00565 }
00566
00567
00568
00569 dlaqgb_(&n, &n, &kl, &ku, &afb[kl + 1]
00570 , &ldafb, &s[1], &s[n + 1], &
00571 rowcnd, &colcnd, &amax, equed);
00572 }
00573 }
00574
00575
00576
00577
00578 if (equil) {
00579 roldo = rcondo;
00580 roldi = rcondi;
00581 }
00582
00583
00584
00585 anormo = dlangb_("1", &n, &kl, &ku, &afb[kl +
00586 1], &ldafb, &rwork[1]);
00587 anormi = dlangb_("I", &n, &kl, &ku, &afb[kl +
00588 1], &ldafb, &rwork[1]);
00589
00590
00591
00592 dgbtrf_(&n, &n, &kl, &ku, &afb[1], &ldafb, &
00593 iwork[1], &info);
00594
00595
00596
00597 dlaset_("Full", &n, &n, &c_b48, &c_b49, &work[
00598 1], &ldb);
00599 s_copy(srnamc_1.srnamt, "DGBTRS", (ftnlen)32,
00600 (ftnlen)6);
00601 dgbtrs_("No transpose", &n, &kl, &ku, &n, &
00602 afb[1], &ldafb, &iwork[1], &work[1], &
00603 ldb, &info);
00604
00605
00606
00607 ainvnm = dlange_("1", &n, &n, &work[1], &ldb,
00608 &rwork[1]);
00609 if (anormo <= 0. || ainvnm <= 0.) {
00610 rcondo = 1.;
00611 } else {
00612 rcondo = 1. / anormo / ainvnm;
00613 }
00614
00615
00616
00617
00618 ainvnm = dlange_("I", &n, &n, &work[1], &ldb,
00619 &rwork[1]);
00620 if (anormi <= 0. || ainvnm <= 0.) {
00621 rcondi = 1.;
00622 } else {
00623 rcondi = 1. / anormi / ainvnm;
00624 }
00625 }
00626
00627 for (itran = 1; itran <= 3; ++itran) {
00628
00629
00630
00631 *(unsigned char *)trans = *(unsigned char *)&
00632 transs[itran - 1];
00633 if (itran == 1) {
00634 rcondc = rcondo;
00635 } else {
00636 rcondc = rcondi;
00637 }
00638
00639
00640
00641 i__8 = kl + ku + 1;
00642 dlacpy_("Full", &i__8, &n, &asav[1], &lda, &a[
00643 1], &lda);
00644
00645
00646
00647
00648 s_copy(srnamc_1.srnamt, "DLARHS", (ftnlen)32,
00649 (ftnlen)6);
00650 dlarhs_(path, xtype, "Full", trans, &n, &n, &
00651 kl, &ku, nrhs, &a[1], &lda, &xact[1],
00652 &ldb, &b[1], &ldb, iseed, &info);
00653 *(unsigned char *)xtype = 'C';
00654 dlacpy_("Full", &n, nrhs, &b[1], &ldb, &bsav[
00655 1], &ldb);
00656
00657 if (nofact && itran == 1) {
00658
00659
00660
00661
00662
00663
00664 i__8 = kl + ku + 1;
00665 dlacpy_("Full", &i__8, &n, &a[1], &lda, &
00666 afb[kl + 1], &ldafb);
00667 dlacpy_("Full", &n, nrhs, &b[1], &ldb, &x[
00668 1], &ldb);
00669
00670 s_copy(srnamc_1.srnamt, "DGBSV ", (ftnlen)
00671 32, (ftnlen)6);
00672 dgbsv_(&n, &kl, &ku, nrhs, &afb[1], &
00673 ldafb, &iwork[1], &x[1], &ldb, &
00674 info);
00675
00676
00677
00678 if (info != izero) {
00679 alaerh_(path, "DGBSV ", &info, &izero,
00680 " ", &n, &n, &kl, &ku, nrhs,
00681 &imat, &nfail, &nerrs, nout);
00682 }
00683
00684
00685
00686
00687 dgbt01_(&n, &n, &kl, &ku, &a[1], &lda, &
00688 afb[1], &ldafb, &iwork[1], &work[
00689 1], result);
00690 nt = 1;
00691 if (izero == 0) {
00692
00693
00694
00695
00696 dlacpy_("Full", &n, nrhs, &b[1], &ldb,
00697 &work[1], &ldb);
00698 dgbt02_("No transpose", &n, &n, &kl, &
00699 ku, nrhs, &a[1], &lda, &x[1],
00700 &ldb, &work[1], &ldb, &result[
00701 1]);
00702
00703
00704
00705
00706 dget04_(&n, nrhs, &x[1], &ldb, &xact[
00707 1], &ldb, &rcondc, &result[2])
00708 ;
00709 nt = 3;
00710 }
00711
00712
00713
00714
00715 i__8 = nt;
00716 for (k = 1; k <= i__8; ++k) {
00717 if (result[k - 1] >= *thresh) {
00718 if (nfail == 0 && nerrs == 0) {
00719 aladhd_(nout, path);
00720 }
00721 io___65.ciunit = *nout;
00722 s_wsfe(&io___65);
00723 do_fio(&c__1, "DGBSV ", (ftnlen)6)
00724 ;
00725 do_fio(&c__1, (char *)&n, (ftnlen)
00726 sizeof(integer));
00727 do_fio(&c__1, (char *)&kl, (
00728 ftnlen)sizeof(integer));
00729 do_fio(&c__1, (char *)&ku, (
00730 ftnlen)sizeof(integer));
00731 do_fio(&c__1, (char *)&imat, (
00732 ftnlen)sizeof(integer));
00733 do_fio(&c__1, (char *)&k, (ftnlen)
00734 sizeof(integer));
00735 do_fio(&c__1, (char *)&result[k -
00736 1], (ftnlen)sizeof(
00737 doublereal));
00738 e_wsfe();
00739 ++nfail;
00740 }
00741
00742 }
00743 nrun += nt;
00744 }
00745
00746
00747
00748 if (! prefac) {
00749 i__8 = (kl << 1) + ku + 1;
00750 dlaset_("Full", &i__8, &n, &c_b48, &c_b48,
00751 &afb[1], &ldafb);
00752 }
00753 dlaset_("Full", &n, nrhs, &c_b48, &c_b48, &x[
00754 1], &ldb);
00755 if (iequed > 1 && n > 0) {
00756
00757
00758
00759
00760 dlaqgb_(&n, &n, &kl, &ku, &a[1], &lda, &s[
00761 1], &s[n + 1], &rowcnd, &colcnd, &
00762 amax, equed);
00763 }
00764
00765
00766
00767
00768 s_copy(srnamc_1.srnamt, "DGBSVX", (ftnlen)32,
00769 (ftnlen)6);
00770 dgbsvx_(fact, trans, &n, &kl, &ku, nrhs, &a[1]
00771 , &lda, &afb[1], &ldafb, &iwork[1],
00772 equed, &s[1], &s[n + 1], &b[1], &ldb,
00773 &x[1], &ldb, &rcond, &rwork[1], &
00774 rwork[*nrhs + 1], &work[1], &iwork[n
00775 + 1], &info);
00776
00777
00778
00779 if (info != izero) {
00780
00781 i__11[0] = 1, a__1[0] = fact;
00782 i__11[1] = 1, a__1[1] = trans;
00783 s_cat(ch__1, a__1, i__11, &c__2, (ftnlen)
00784 2);
00785 alaerh_(path, "DGBSVX", &info, &izero,
00786 ch__1, &n, &n, &kl, &ku, nrhs, &
00787 imat, &nfail, &nerrs, nout);
00788 }
00789
00790
00791
00792
00793 if (info != 0) {
00794 anrmpv = 0.;
00795 i__8 = info;
00796 for (j = 1; j <= i__8; ++j) {
00797
00798 i__6 = ku + 2 - j;
00799
00800 i__9 = n + ku + 1 - j, i__10 = kl +
00801 ku + 1;
00802 i__7 = min(i__9,i__10);
00803 for (i__ = max(i__6,1); i__ <= i__7;
00804 ++i__) {
00805
00806 d__2 = anrmpv, d__3 = (d__1 = a[
00807 i__ + (j - 1) * lda], abs(
00808 d__1));
00809 anrmpv = max(d__2,d__3);
00810
00811 }
00812
00813 }
00814
00815 i__7 = info - 1, i__6 = kl + ku;
00816 i__8 = min(i__7,i__6);
00817
00818 i__9 = 1, i__10 = kl + ku + 2 - info;
00819 rpvgrw = dlantb_("M", "U", "N", &info, &
00820 i__8, &afb[max(i__9, i__10)], &
00821 ldafb, &work[1]);
00822 if (rpvgrw == 0.) {
00823 rpvgrw = 1.;
00824 } else {
00825 rpvgrw = anrmpv / rpvgrw;
00826 }
00827 } else {
00828 i__8 = kl + ku;
00829 rpvgrw = dlantb_("M", "U", "N", &n, &i__8,
00830 &afb[1], &ldafb, &work[1]);
00831 if (rpvgrw == 0.) {
00832 rpvgrw = 1.;
00833 } else {
00834 rpvgrw = dlangb_("M", &n, &kl, &ku, &
00835 a[1], &lda, &work[1]) / rpvgrw;
00836 }
00837 }
00838 result[6] = (d__1 = rpvgrw - work[1], abs(
00839 d__1)) / max(work[1],rpvgrw) /
00840 dlamch_("E");
00841
00842 if (! prefac) {
00843
00844
00845
00846
00847 dgbt01_(&n, &n, &kl, &ku, &a[1], &lda, &
00848 afb[1], &ldafb, &iwork[1], &work[
00849 1], result);
00850 k1 = 1;
00851 } else {
00852 k1 = 2;
00853 }
00854
00855 if (info == 0) {
00856 trfcon = FALSE_;
00857
00858
00859
00860 dlacpy_("Full", &n, nrhs, &bsav[1], &ldb,
00861 &work[1], &ldb);
00862 dgbt02_(trans, &n, &n, &kl, &ku, nrhs, &
00863 asav[1], &lda, &x[1], &ldb, &work[
00864 1], &ldb, &result[1]);
00865
00866
00867
00868
00869 if (nofact || prefac && lsame_(equed,
00870 "N")) {
00871 dget04_(&n, nrhs, &x[1], &ldb, &xact[
00872 1], &ldb, &rcondc, &result[2])
00873 ;
00874 } else {
00875 if (itran == 1) {
00876 roldc = roldo;
00877 } else {
00878 roldc = roldi;
00879 }
00880 dget04_(&n, nrhs, &x[1], &ldb, &xact[
00881 1], &ldb, &roldc, &result[2]);
00882 }
00883
00884
00885
00886
00887 dgbt05_(trans, &n, &kl, &ku, nrhs, &asav[
00888 1], &lda, &b[1], &ldb, &x[1], &
00889 ldb, &xact[1], &ldb, &rwork[1], &
00890 rwork[*nrhs + 1], &result[3]);
00891 } else {
00892 trfcon = TRUE_;
00893 }
00894
00895
00896
00897
00898 result[5] = dget06_(&rcond, &rcondc);
00899
00900
00901
00902
00903 if (! trfcon) {
00904 for (k = k1; k <= 7; ++k) {
00905 if (result[k - 1] >= *thresh) {
00906 if (nfail == 0 && nerrs == 0) {
00907 aladhd_(nout, path);
00908 }
00909 if (prefac) {
00910 io___72.ciunit = *nout;
00911 s_wsfe(&io___72);
00912 do_fio(&c__1, "DGBSVX", (ftnlen)6);
00913 do_fio(&c__1, fact, (ftnlen)1);
00914 do_fio(&c__1, trans, (ftnlen)1);
00915 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00916 do_fio(&c__1, (char *)&kl, (ftnlen)sizeof(integer));
00917 do_fio(&c__1, (char *)&ku, (ftnlen)sizeof(integer));
00918 do_fio(&c__1, equed, (ftnlen)1);
00919 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer)
00920 );
00921 do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer));
00922 do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00923 sizeof(doublereal));
00924 e_wsfe();
00925 } else {
00926 io___73.ciunit = *nout;
00927 s_wsfe(&io___73);
00928 do_fio(&c__1, "DGBSVX", (ftnlen)6);
00929 do_fio(&c__1, fact, (ftnlen)1);
00930 do_fio(&c__1, trans, (ftnlen)1);
00931 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00932 do_fio(&c__1, (char *)&kl, (ftnlen)sizeof(integer));
00933 do_fio(&c__1, (char *)&ku, (ftnlen)sizeof(integer));
00934 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer)
00935 );
00936 do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer));
00937 do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00938 sizeof(doublereal));
00939 e_wsfe();
00940 }
00941 ++nfail;
00942 }
00943
00944 }
00945 nrun = nrun + 7 - k1;
00946 } else {
00947 if (result[0] >= *thresh && ! prefac) {
00948 if (nfail == 0 && nerrs == 0) {
00949 aladhd_(nout, path);
00950 }
00951 if (prefac) {
00952 io___74.ciunit = *nout;
00953 s_wsfe(&io___74);
00954 do_fio(&c__1, "DGBSVX", (ftnlen)6)
00955 ;
00956 do_fio(&c__1, fact, (ftnlen)1);
00957 do_fio(&c__1, trans, (ftnlen)1);
00958 do_fio(&c__1, (char *)&n, (ftnlen)
00959 sizeof(integer));
00960 do_fio(&c__1, (char *)&kl, (
00961 ftnlen)sizeof(integer));
00962 do_fio(&c__1, (char *)&ku, (
00963 ftnlen)sizeof(integer));
00964 do_fio(&c__1, equed, (ftnlen)1);
00965 do_fio(&c__1, (char *)&imat, (
00966 ftnlen)sizeof(integer));
00967 do_fio(&c__1, (char *)&c__1, (
00968 ftnlen)sizeof(integer));
00969 do_fio(&c__1, (char *)&result[0],
00970 (ftnlen)sizeof(doublereal)
00971 );
00972 e_wsfe();
00973 } else {
00974 io___75.ciunit = *nout;
00975 s_wsfe(&io___75);
00976 do_fio(&c__1, "DGBSVX", (ftnlen)6)
00977 ;
00978 do_fio(&c__1, fact, (ftnlen)1);
00979 do_fio(&c__1, trans, (ftnlen)1);
00980 do_fio(&c__1, (char *)&n, (ftnlen)
00981 sizeof(integer));
00982 do_fio(&c__1, (char *)&kl, (
00983 ftnlen)sizeof(integer));
00984 do_fio(&c__1, (char *)&ku, (
00985 ftnlen)sizeof(integer));
00986 do_fio(&c__1, (char *)&imat, (
00987 ftnlen)sizeof(integer));
00988 do_fio(&c__1, (char *)&c__1, (
00989 ftnlen)sizeof(integer));
00990 do_fio(&c__1, (char *)&result[0],
00991 (ftnlen)sizeof(doublereal)
00992 );
00993 e_wsfe();
00994 }
00995 ++nfail;
00996 ++nrun;
00997 }
00998 if (result[5] >= *thresh) {
00999 if (nfail == 0 && nerrs == 0) {
01000 aladhd_(nout, path);
01001 }
01002 if (prefac) {
01003 io___76.ciunit = *nout;
01004 s_wsfe(&io___76);
01005 do_fio(&c__1, "DGBSVX", (ftnlen)6)
01006 ;
01007 do_fio(&c__1, fact, (ftnlen)1);
01008 do_fio(&c__1, trans, (ftnlen)1);
01009 do_fio(&c__1, (char *)&n, (ftnlen)
01010 sizeof(integer));
01011 do_fio(&c__1, (char *)&kl, (
01012 ftnlen)sizeof(integer));
01013 do_fio(&c__1, (char *)&ku, (
01014 ftnlen)sizeof(integer));
01015 do_fio(&c__1, equed, (ftnlen)1);
01016 do_fio(&c__1, (char *)&imat, (
01017 ftnlen)sizeof(integer));
01018 do_fio(&c__1, (char *)&c__6, (
01019 ftnlen)sizeof(integer));
01020 do_fio(&c__1, (char *)&result[5],
01021 (ftnlen)sizeof(doublereal)
01022 );
01023 e_wsfe();
01024 } else {
01025 io___77.ciunit = *nout;
01026 s_wsfe(&io___77);
01027 do_fio(&c__1, "DGBSVX", (ftnlen)6)
01028 ;
01029 do_fio(&c__1, fact, (ftnlen)1);
01030 do_fio(&c__1, trans, (ftnlen)1);
01031 do_fio(&c__1, (char *)&n, (ftnlen)
01032 sizeof(integer));
01033 do_fio(&c__1, (char *)&kl, (
01034 ftnlen)sizeof(integer));
01035 do_fio(&c__1, (char *)&ku, (
01036 ftnlen)sizeof(integer));
01037 do_fio(&c__1, (char *)&imat, (
01038 ftnlen)sizeof(integer));
01039 do_fio(&c__1, (char *)&c__6, (
01040 ftnlen)sizeof(integer));
01041 do_fio(&c__1, (char *)&result[5],
01042 (ftnlen)sizeof(doublereal)
01043 );
01044 e_wsfe();
01045 }
01046 ++nfail;
01047 ++nrun;
01048 }
01049 if (result[6] >= *thresh) {
01050 if (nfail == 0 && nerrs == 0) {
01051 aladhd_(nout, path);
01052 }
01053 if (prefac) {
01054 io___78.ciunit = *nout;
01055 s_wsfe(&io___78);
01056 do_fio(&c__1, "DGBSVX", (ftnlen)6)
01057 ;
01058 do_fio(&c__1, fact, (ftnlen)1);
01059 do_fio(&c__1, trans, (ftnlen)1);
01060 do_fio(&c__1, (char *)&n, (ftnlen)
01061 sizeof(integer));
01062 do_fio(&c__1, (char *)&kl, (
01063 ftnlen)sizeof(integer));
01064 do_fio(&c__1, (char *)&ku, (
01065 ftnlen)sizeof(integer));
01066 do_fio(&c__1, equed, (ftnlen)1);
01067 do_fio(&c__1, (char *)&imat, (
01068 ftnlen)sizeof(integer));
01069 do_fio(&c__1, (char *)&c__7, (
01070 ftnlen)sizeof(integer));
01071 do_fio(&c__1, (char *)&result[6],
01072 (ftnlen)sizeof(doublereal)
01073 );
01074 e_wsfe();
01075 } else {
01076 io___79.ciunit = *nout;
01077 s_wsfe(&io___79);
01078 do_fio(&c__1, "DGBSVX", (ftnlen)6)
01079 ;
01080 do_fio(&c__1, fact, (ftnlen)1);
01081 do_fio(&c__1, trans, (ftnlen)1);
01082 do_fio(&c__1, (char *)&n, (ftnlen)
01083 sizeof(integer));
01084 do_fio(&c__1, (char *)&kl, (
01085 ftnlen)sizeof(integer));
01086 do_fio(&c__1, (char *)&ku, (
01087 ftnlen)sizeof(integer));
01088 do_fio(&c__1, (char *)&imat, (
01089 ftnlen)sizeof(integer));
01090 do_fio(&c__1, (char *)&c__7, (
01091 ftnlen)sizeof(integer));
01092 do_fio(&c__1, (char *)&result[6],
01093 (ftnlen)sizeof(doublereal)
01094 );
01095 e_wsfe();
01096 }
01097 ++nfail;
01098 ++nrun;
01099 }
01100
01101 }
01102
01103 }
01104 L100:
01105 ;
01106 }
01107
01108 }
01109 L120:
01110 ;
01111 }
01112 L130:
01113 ;
01114 }
01115
01116 }
01117
01118 }
01119
01120
01121
01122 alasvm_(path, nout, &nfail, &nrun, &nerrs);
01123
01124
01125 return 0;
01126
01127
01128
01129 }