dchkpb.c
Go to the documentation of this file.
00001 /* dchkpb.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Common Block Declarations */
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 /* Table of constant values */
00032 
00033 static integer c__2 = 2;
00034 static integer c__0 = 0;
00035 static integer c_n1 = -1;
00036 static integer c__1 = 1;
00037 static doublereal c_b50 = 0.;
00038 static doublereal c_b51 = 1.;
00039 static integer c__7 = 7;
00040 
00041 /* Subroutine */ int dchkpb_(logical *dotype, integer *nn, integer *nval, 
00042         integer *nnb, integer *nbval, integer *nns, integer *nsval, 
00043         doublereal *thresh, logical *tsterr, integer *nmax, doublereal *a, 
00044         doublereal *afac, doublereal *ainv, doublereal *b, doublereal *x, 
00045         doublereal *xact, doublereal *work, doublereal *rwork, integer *iwork, 
00046          integer *nout)
00047 {
00048     /* Initialized data */
00049 
00050     static integer iseedy[4] = { 1988,1989,1990,1991 };
00051 
00052     /* Format strings */
00053     static char fmt_9999[] = "(\002 UPLO='\002,a1,\002', N=\002,i5,\002, KD"
00054             "=\002,i5,\002, NB=\002,i4,\002, type \002,i2,\002, test \002,i2"
00055             ",\002, ratio= \002,g12.5)";
00056     static char fmt_9998[] = "(\002 UPLO='\002,a1,\002', N=\002,i5,\002, KD"
00057             "=\002,i5,\002, NRHS=\002,i3,\002, type \002,i2,\002, test(\002,i"
00058             "2,\002) = \002,g12.5)";
00059     static char fmt_9997[] = "(\002 UPLO='\002,a1,\002', N=\002,i5,\002, KD"
00060             "=\002,i5,\002,\002,10x,\002 type \002,i2,\002, test(\002,i2,\002"
00061             ") = \002,g12.5)";
00062 
00063     /* System generated locals */
00064     integer i__1, i__2, i__3, i__4, i__5, i__6;
00065 
00066     /* Builtin functions */
00067     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00068     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00069 
00070     /* Local variables */
00071     integer i__, k, n, i1, i2, kd, nb, in, kl, iw, ku, lda, ikd, inb, nkd, 
00072             ldab, ioff, mode, koff, imat, info;
00073     char path[3], dist[1];
00074     integer irhs, nrhs;
00075     char uplo[1], type__[1];
00076     integer nrun;
00077     extern /* Subroutine */ int alahd_(integer *, char *), dget04_(
00078             integer *, integer *, doublereal *, integer *, doublereal *, 
00079             integer *, doublereal *, doublereal *);
00080     integer nfail, iseed[4];
00081     extern doublereal dget06_(doublereal *, doublereal *);
00082     extern /* Subroutine */ int dpbt01_(char *, integer *, integer *, 
00083             doublereal *, integer *, doublereal *, integer *, doublereal *, 
00084             doublereal *), dpbt02_(char *, integer *, integer *, 
00085             integer *, doublereal *, integer *, doublereal *, integer *, 
00086             doublereal *, integer *, doublereal *, doublereal *), 
00087             dpbt05_(char *, integer *, integer *, integer *, doublereal *, 
00088             integer *, doublereal *, integer *, doublereal *, integer *, 
00089             doublereal *, integer *, doublereal *, doublereal *, doublereal *);
00090     integer kdval[4];
00091     doublereal rcond;
00092     integer nimat;
00093     doublereal anorm;
00094     extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *, 
00095             doublereal *, integer *), dswap_(integer *, doublereal *, integer 
00096             *, doublereal *, integer *);
00097     integer iuplo, izero, nerrs;
00098     logical zerot;
00099     char xtype[1];
00100     extern /* Subroutine */ int dlatb4_(char *, integer *, integer *, integer 
00101             *, char *, integer *, integer *, doublereal *, integer *, 
00102             doublereal *, char *);
00103     extern doublereal dlange_(char *, integer *, integer *, doublereal *, 
00104             integer *, doublereal *);
00105     extern /* Subroutine */ int alaerh_(char *, char *, integer *, integer *, 
00106             char *, integer *, integer *, integer *, integer *, integer *, 
00107             integer *, integer *, integer *, integer *);
00108     extern doublereal dlansb_(char *, char *, integer *, integer *, 
00109             doublereal *, integer *, doublereal *);
00110     extern /* Subroutine */ int dpbcon_(char *, integer *, integer *, 
00111             doublereal *, integer *, doublereal *, doublereal *, doublereal *, 
00112              integer *, integer *);
00113     doublereal rcondc;
00114     char packit[1];
00115     extern /* Subroutine */ int dlacpy_(char *, integer *, integer *, 
00116             doublereal *, integer *, doublereal *, integer *), 
00117             dlarhs_(char *, char *, char *, char *, integer *, integer *, 
00118             integer *, integer *, integer *, doublereal *, integer *, 
00119             doublereal *, integer *, doublereal *, integer *, integer *, 
00120             integer *), dlaset_(char *, 
00121             integer *, integer *, doublereal *, doublereal *, doublereal *, 
00122             integer *), dpbrfs_(char *, integer *, integer *, integer 
00123             *, doublereal *, integer *, doublereal *, integer *, doublereal *, 
00124              integer *, doublereal *, integer *, doublereal *, doublereal *, 
00125             doublereal *, integer *, integer *), dpbtrf_(char *, 
00126             integer *, integer *, doublereal *, integer *, integer *),
00127              alasum_(char *, integer *, integer *, integer *, integer *);
00128     doublereal cndnum;
00129     extern /* Subroutine */ int dlatms_(integer *, integer *, char *, integer 
00130             *, char *, doublereal *, integer *, doublereal *, doublereal *, 
00131             integer *, integer *, char *, doublereal *, integer *, doublereal 
00132             *, integer *);
00133     doublereal ainvnm;
00134     extern /* Subroutine */ int derrpo_(char *, integer *), dpbtrs_(
00135             char *, integer *, integer *, integer *, doublereal *, integer *, 
00136             doublereal *, integer *, integer *), xlaenv_(integer *, 
00137             integer *);
00138     doublereal result[7];
00139 
00140     /* Fortran I/O blocks */
00141     static cilist io___40 = { 0, 0, 0, fmt_9999, 0 };
00142     static cilist io___46 = { 0, 0, 0, fmt_9998, 0 };
00143     static cilist io___48 = { 0, 0, 0, fmt_9997, 0 };
00144 
00145 
00146 
00147 /*  -- LAPACK test routine (version 3.1) -- */
00148 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00149 /*     November 2006 */
00150 
00151 /*     .. Scalar Arguments .. */
00152 /*     .. */
00153 /*     .. Array Arguments .. */
00154 /*     .. */
00155 
00156 /*  Purpose */
00157 /*  ======= */
00158 
00159 /*  DCHKPB tests DPBTRF, -TRS, -RFS, and -CON. */
00160 
00161 /*  Arguments */
00162 /*  ========= */
00163 
00164 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00165 /*          The matrix types to be used for testing.  Matrices of type j */
00166 /*          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) = */
00167 /*          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used. */
00168 
00169 /*  NN      (input) INTEGER */
00170 /*          The number of values of N contained in the vector NVAL. */
00171 
00172 /*  NVAL    (input) INTEGER array, dimension (NN) */
00173 /*          The values of the matrix dimension N. */
00174 
00175 /*  NNB     (input) INTEGER */
00176 /*          The number of values of NB contained in the vector NBVAL. */
00177 
00178 /*  NBVAL   (input) INTEGER array, dimension (NBVAL) */
00179 /*          The values of the blocksize NB. */
00180 
00181 /*  NNS     (input) INTEGER */
00182 /*          The number of values of NRHS contained in the vector NSVAL. */
00183 
00184 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00185 /*          The values of the number of right hand sides NRHS. */
00186 
00187 /*  THRESH  (input) DOUBLE PRECISION */
00188 /*          The threshold value for the test ratios.  A result is */
00189 /*          included in the output file if RESULT >= THRESH.  To have */
00190 /*          every test ratio printed, use THRESH = 0. */
00191 
00192 /*  TSTERR  (input) LOGICAL */
00193 /*          Flag that indicates whether error exits are to be tested. */
00194 
00195 /*  NMAX    (input) INTEGER */
00196 /*          The maximum value permitted for N, used in dimensioning the */
00197 /*          work arrays. */
00198 
00199 /*  A       (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX) */
00200 
00201 /*  AFAC    (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX) */
00202 
00203 /*  AINV    (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX) */
00204 
00205 /*  B       (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX) */
00206 /*          where NSMAX is the largest entry in NSVAL. */
00207 
00208 /*  X       (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX) */
00209 
00210 /*  XACT    (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX) */
00211 
00212 /*  WORK    (workspace) DOUBLE PRECISION array, dimension */
00213 /*                      (NMAX*max(3,NSMAX)) */
00214 
00215 /*  RWORK   (workspace) DOUBLE PRECISION array, dimension */
00216 /*                      (max(NMAX,2*NSMAX)) */
00217 
00218 /*  IWORK   (workspace) INTEGER array, dimension (NMAX) */
00219 
00220 /*  NOUT    (input) INTEGER */
00221 /*          The unit number for output. */
00222 
00223 /*  ===================================================================== */
00224 
00225 /*     .. Parameters .. */
00226 /*     .. */
00227 /*     .. Local Scalars .. */
00228 /*     .. */
00229 /*     .. Local Arrays .. */
00230 /*     .. */
00231 /*     .. External Functions .. */
00232 /*     .. */
00233 /*     .. External Subroutines .. */
00234 /*     .. */
00235 /*     .. Intrinsic Functions .. */
00236 /*     .. */
00237 /*     .. Scalars in Common .. */
00238 /*     .. */
00239 /*     .. Common blocks .. */
00240 /*     .. */
00241 /*     .. Data statements .. */
00242     /* Parameter adjustments */
00243     --iwork;
00244     --rwork;
00245     --work;
00246     --xact;
00247     --x;
00248     --b;
00249     --ainv;
00250     --afac;
00251     --a;
00252     --nsval;
00253     --nbval;
00254     --nval;
00255     --dotype;
00256 
00257     /* Function Body */
00258 /*     .. */
00259 /*     .. Executable Statements .. */
00260 
00261 /*     Initialize constants and the random number seed. */
00262 
00263     s_copy(path, "Double precision", (ftnlen)1, (ftnlen)16);
00264     s_copy(path + 1, "PB", (ftnlen)2, (ftnlen)2);
00265     nrun = 0;
00266     nfail = 0;
00267     nerrs = 0;
00268     for (i__ = 1; i__ <= 4; ++i__) {
00269         iseed[i__ - 1] = iseedy[i__ - 1];
00270 /* L10: */
00271     }
00272 
00273 /*     Test the error exits */
00274 
00275     if (*tsterr) {
00276         derrpo_(path, nout);
00277     }
00278     infoc_1.infot = 0;
00279     xlaenv_(&c__2, &c__2);
00280     kdval[0] = 0;
00281 
00282 /*     Do for each value of N in NVAL */
00283 
00284     i__1 = *nn;
00285     for (in = 1; in <= i__1; ++in) {
00286         n = nval[in];
00287         lda = max(n,1);
00288         *(unsigned char *)xtype = 'N';
00289 
00290 /*        Set limits on the number of loop iterations. */
00291 
00292 /* Computing MAX */
00293         i__2 = 1, i__3 = min(n,4);
00294         nkd = max(i__2,i__3);
00295         nimat = 8;
00296         if (n == 0) {
00297             nimat = 1;
00298         }
00299 
00300         kdval[1] = n + (n + 1) / 4;
00301         kdval[2] = (n * 3 - 1) / 4;
00302         kdval[3] = (n + 1) / 4;
00303 
00304         i__2 = nkd;
00305         for (ikd = 1; ikd <= i__2; ++ikd) {
00306 
00307 /*           Do for KD = 0, (5*N+1)/4, (3N-1)/4, and (N+1)/4. This order */
00308 /*           makes it easier to skip redundant values for small values */
00309 /*           of N. */
00310 
00311             kd = kdval[ikd - 1];
00312             ldab = kd + 1;
00313 
00314 /*           Do first for UPLO = 'U', then for UPLO = 'L' */
00315 
00316             for (iuplo = 1; iuplo <= 2; ++iuplo) {
00317                 koff = 1;
00318                 if (iuplo == 1) {
00319                     *(unsigned char *)uplo = 'U';
00320 /* Computing MAX */
00321                     i__3 = 1, i__4 = kd + 2 - n;
00322                     koff = max(i__3,i__4);
00323                     *(unsigned char *)packit = 'Q';
00324                 } else {
00325                     *(unsigned char *)uplo = 'L';
00326                     *(unsigned char *)packit = 'B';
00327                 }
00328 
00329                 i__3 = nimat;
00330                 for (imat = 1; imat <= i__3; ++imat) {
00331 
00332 /*                 Do the tests only if DOTYPE( IMAT ) is true. */
00333 
00334                     if (! dotype[imat]) {
00335                         goto L60;
00336                     }
00337 
00338 /*                 Skip types 2, 3, or 4 if the matrix size is too small. */
00339 
00340                     zerot = imat >= 2 && imat <= 4;
00341                     if (zerot && n < imat - 1) {
00342                         goto L60;
00343                     }
00344 
00345                     if (! zerot || ! dotype[1]) {
00346 
00347 /*                    Set up parameters with DLATB4 and generate a test */
00348 /*                    matrix with DLATMS. */
00349 
00350                         dlatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, 
00351                                  &mode, &cndnum, dist);
00352 
00353                         s_copy(srnamc_1.srnamt, "DLATMS", (ftnlen)32, (ftnlen)
00354                                 6);
00355                         dlatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, 
00356                                  &cndnum, &anorm, &kd, &kd, packit, &a[koff], 
00357                                 &ldab, &work[1], &info);
00358 
00359 /*                    Check error code from DLATMS. */
00360 
00361                         if (info != 0) {
00362                             alaerh_(path, "DLATMS", &info, &c__0, uplo, &n, &
00363                                     n, &kd, &kd, &c_n1, &imat, &nfail, &nerrs, 
00364                                      nout);
00365                             goto L60;
00366                         }
00367                     } else if (izero > 0) {
00368 
00369 /*                    Use the same matrix for types 3 and 4 as for type */
00370 /*                    2 by copying back the zeroed out column, */
00371 
00372                         iw = (lda << 1) + 1;
00373                         if (iuplo == 1) {
00374                             ioff = (izero - 1) * ldab + kd + 1;
00375                             i__4 = izero - i1;
00376                             dcopy_(&i__4, &work[iw], &c__1, &a[ioff - izero + 
00377                                     i1], &c__1);
00378                             iw = iw + izero - i1;
00379                             i__4 = i2 - izero + 1;
00380 /* Computing MAX */
00381                             i__6 = ldab - 1;
00382                             i__5 = max(i__6,1);
00383                             dcopy_(&i__4, &work[iw], &c__1, &a[ioff], &i__5);
00384                         } else {
00385                             ioff = (i1 - 1) * ldab + 1;
00386                             i__4 = izero - i1;
00387 /* Computing MAX */
00388                             i__6 = ldab - 1;
00389                             i__5 = max(i__6,1);
00390                             dcopy_(&i__4, &work[iw], &c__1, &a[ioff + izero - 
00391                                     i1], &i__5);
00392                             ioff = (izero - 1) * ldab + 1;
00393                             iw = iw + izero - i1;
00394                             i__4 = i2 - izero + 1;
00395                             dcopy_(&i__4, &work[iw], &c__1, &a[ioff], &c__1);
00396                         }
00397                     }
00398 
00399 /*                 For types 2-4, zero one row and column of the matrix */
00400 /*                 to test that INFO is returned correctly. */
00401 
00402                     izero = 0;
00403                     if (zerot) {
00404                         if (imat == 2) {
00405                             izero = 1;
00406                         } else if (imat == 3) {
00407                             izero = n;
00408                         } else {
00409                             izero = n / 2 + 1;
00410                         }
00411 
00412 /*                    Save the zeroed out row and column in WORK(*,3) */
00413 
00414                         iw = lda << 1;
00415 /* Computing MIN */
00416                         i__5 = (kd << 1) + 1;
00417                         i__4 = min(i__5,n);
00418                         for (i__ = 1; i__ <= i__4; ++i__) {
00419                             work[iw + i__] = 0.;
00420 /* L20: */
00421                         }
00422                         ++iw;
00423 /* Computing MAX */
00424                         i__4 = izero - kd;
00425                         i1 = max(i__4,1);
00426 /* Computing MIN */
00427                         i__4 = izero + kd;
00428                         i2 = min(i__4,n);
00429 
00430                         if (iuplo == 1) {
00431                             ioff = (izero - 1) * ldab + kd + 1;
00432                             i__4 = izero - i1;
00433                             dswap_(&i__4, &a[ioff - izero + i1], &c__1, &work[
00434                                     iw], &c__1);
00435                             iw = iw + izero - i1;
00436                             i__4 = i2 - izero + 1;
00437 /* Computing MAX */
00438                             i__6 = ldab - 1;
00439                             i__5 = max(i__6,1);
00440                             dswap_(&i__4, &a[ioff], &i__5, &work[iw], &c__1);
00441                         } else {
00442                             ioff = (i1 - 1) * ldab + 1;
00443                             i__4 = izero - i1;
00444 /* Computing MAX */
00445                             i__6 = ldab - 1;
00446                             i__5 = max(i__6,1);
00447                             dswap_(&i__4, &a[ioff + izero - i1], &i__5, &work[
00448                                     iw], &c__1);
00449                             ioff = (izero - 1) * ldab + 1;
00450                             iw = iw + izero - i1;
00451                             i__4 = i2 - izero + 1;
00452                             dswap_(&i__4, &a[ioff], &c__1, &work[iw], &c__1);
00453                         }
00454                     }
00455 
00456 /*                 Do for each value of NB in NBVAL */
00457 
00458                     i__4 = *nnb;
00459                     for (inb = 1; inb <= i__4; ++inb) {
00460                         nb = nbval[inb];
00461                         xlaenv_(&c__1, &nb);
00462 
00463 /*                    Compute the L*L' or U'*U factorization of the band */
00464 /*                    matrix. */
00465 
00466                         i__5 = kd + 1;
00467                         dlacpy_("Full", &i__5, &n, &a[1], &ldab, &afac[1], &
00468                                 ldab);
00469                         s_copy(srnamc_1.srnamt, "DPBTRF", (ftnlen)32, (ftnlen)
00470                                 6);
00471                         dpbtrf_(uplo, &n, &kd, &afac[1], &ldab, &info);
00472 
00473 /*                    Check error code from DPBTRF. */
00474 
00475                         if (info != izero) {
00476                             alaerh_(path, "DPBTRF", &info, &izero, uplo, &n, &
00477                                     n, &kd, &kd, &nb, &imat, &nfail, &nerrs, 
00478                                     nout);
00479                             goto L50;
00480                         }
00481 
00482 /*                    Skip the tests if INFO is not 0. */
00483 
00484                         if (info != 0) {
00485                             goto L50;
00486                         }
00487 
00488 /* +    TEST 1 */
00489 /*                    Reconstruct matrix from factors and compute */
00490 /*                    residual. */
00491 
00492                         i__5 = kd + 1;
00493                         dlacpy_("Full", &i__5, &n, &afac[1], &ldab, &ainv[1], 
00494                                 &ldab);
00495                         dpbt01_(uplo, &n, &kd, &a[1], &ldab, &ainv[1], &ldab, 
00496                                 &rwork[1], result);
00497 
00498 /*                    Print the test ratio if it is .GE. THRESH. */
00499 
00500                         if (result[0] >= *thresh) {
00501                             if (nfail == 0 && nerrs == 0) {
00502                                 alahd_(nout, path);
00503                             }
00504                             io___40.ciunit = *nout;
00505                             s_wsfe(&io___40);
00506                             do_fio(&c__1, uplo, (ftnlen)1);
00507                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00508                                     ;
00509                             do_fio(&c__1, (char *)&kd, (ftnlen)sizeof(integer)
00510                                     );
00511                             do_fio(&c__1, (char *)&nb, (ftnlen)sizeof(integer)
00512                                     );
00513                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00514                                     integer));
00515                             do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(
00516                                     integer));
00517                             do_fio(&c__1, (char *)&result[0], (ftnlen)sizeof(
00518                                     doublereal));
00519                             e_wsfe();
00520                             ++nfail;
00521                         }
00522                         ++nrun;
00523 
00524 /*                    Only do other tests if this is the first blocksize. */
00525 
00526                         if (inb > 1) {
00527                             goto L50;
00528                         }
00529 
00530 /*                    Form the inverse of A so we can get a good estimate */
00531 /*                    of RCONDC = 1/(norm(A) * norm(inv(A))). */
00532 
00533                         dlaset_("Full", &n, &n, &c_b50, &c_b51, &ainv[1], &
00534                                 lda);
00535                         s_copy(srnamc_1.srnamt, "DPBTRS", (ftnlen)32, (ftnlen)
00536                                 6);
00537                         dpbtrs_(uplo, &n, &kd, &n, &afac[1], &ldab, &ainv[1], 
00538                                 &lda, &info);
00539 
00540 /*                    Compute RCONDC = 1/(norm(A) * norm(inv(A))). */
00541 
00542                         anorm = dlansb_("1", uplo, &n, &kd, &a[1], &ldab, &
00543                                 rwork[1]);
00544                         ainvnm = dlange_("1", &n, &n, &ainv[1], &lda, &rwork[
00545                                 1]);
00546                         if (anorm <= 0. || ainvnm <= 0.) {
00547                             rcondc = 1.;
00548                         } else {
00549                             rcondc = 1. / anorm / ainvnm;
00550                         }
00551 
00552                         i__5 = *nns;
00553                         for (irhs = 1; irhs <= i__5; ++irhs) {
00554                             nrhs = nsval[irhs];
00555 
00556 /* +    TEST 2 */
00557 /*                    Solve and compute residual for A * X = B. */
00558 
00559                             s_copy(srnamc_1.srnamt, "DLARHS", (ftnlen)32, (
00560                                     ftnlen)6);
00561                             dlarhs_(path, xtype, uplo, " ", &n, &n, &kd, &kd, 
00562                                     &nrhs, &a[1], &ldab, &xact[1], &lda, &b[1]
00563 , &lda, iseed, &info);
00564                             dlacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &
00565                                     lda);
00566 
00567                             s_copy(srnamc_1.srnamt, "DPBTRS", (ftnlen)32, (
00568                                     ftnlen)6);
00569                             dpbtrs_(uplo, &n, &kd, &nrhs, &afac[1], &ldab, &x[
00570                                     1], &lda, &info);
00571 
00572 /*                    Check error code from DPBTRS. */
00573 
00574                             if (info != 0) {
00575                                 alaerh_(path, "DPBTRS", &info, &c__0, uplo, &
00576                                         n, &n, &kd, &kd, &nrhs, &imat, &nfail, 
00577                                          &nerrs, nout);
00578                             }
00579 
00580                             dlacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], 
00581                                     &lda);
00582                             dpbt02_(uplo, &n, &kd, &nrhs, &a[1], &ldab, &x[1], 
00583                                      &lda, &work[1], &lda, &rwork[1], &result[
00584                                     1]);
00585 
00586 /* +    TEST 3 */
00587 /*                    Check solution from generated exact solution. */
00588 
00589                             dget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &
00590                                     rcondc, &result[2]);
00591 
00592 /* +    TESTS 4, 5, and 6 */
00593 /*                    Use iterative refinement to improve the solution. */
00594 
00595                             s_copy(srnamc_1.srnamt, "DPBRFS", (ftnlen)32, (
00596                                     ftnlen)6);
00597                             dpbrfs_(uplo, &n, &kd, &nrhs, &a[1], &ldab, &afac[
00598                                     1], &ldab, &b[1], &lda, &x[1], &lda, &
00599                                     rwork[1], &rwork[nrhs + 1], &work[1], &
00600                                     iwork[1], &info);
00601 
00602 /*                    Check error code from DPBRFS. */
00603 
00604                             if (info != 0) {
00605                                 alaerh_(path, "DPBRFS", &info, &c__0, uplo, &
00606                                         n, &n, &kd, &kd, &nrhs, &imat, &nfail, 
00607                                          &nerrs, nout);
00608                             }
00609 
00610                             dget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &
00611                                     rcondc, &result[3]);
00612                             dpbt05_(uplo, &n, &kd, &nrhs, &a[1], &ldab, &b[1], 
00613                                      &lda, &x[1], &lda, &xact[1], &lda, &
00614                                     rwork[1], &rwork[nrhs + 1], &result[4]);
00615 
00616 /*                       Print information about the tests that did not */
00617 /*                       pass the threshold. */
00618 
00619                             for (k = 2; k <= 6; ++k) {
00620                                 if (result[k - 1] >= *thresh) {
00621                                     if (nfail == 0 && nerrs == 0) {
00622                                         alahd_(nout, path);
00623                                     }
00624                                     io___46.ciunit = *nout;
00625                                     s_wsfe(&io___46);
00626                                     do_fio(&c__1, uplo, (ftnlen)1);
00627                                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(
00628                                             integer));
00629                                     do_fio(&c__1, (char *)&kd, (ftnlen)sizeof(
00630                                             integer));
00631                                     do_fio(&c__1, (char *)&nrhs, (ftnlen)
00632                                             sizeof(integer));
00633                                     do_fio(&c__1, (char *)&imat, (ftnlen)
00634                                             sizeof(integer));
00635                                     do_fio(&c__1, (char *)&k, (ftnlen)sizeof(
00636                                             integer));
00637                                     do_fio(&c__1, (char *)&result[k - 1], (
00638                                             ftnlen)sizeof(doublereal));
00639                                     e_wsfe();
00640                                     ++nfail;
00641                                 }
00642 /* L30: */
00643                             }
00644                             nrun += 5;
00645 /* L40: */
00646                         }
00647 
00648 /* +    TEST 7 */
00649 /*                    Get an estimate of RCOND = 1/CNDNUM. */
00650 
00651                         s_copy(srnamc_1.srnamt, "DPBCON", (ftnlen)32, (ftnlen)
00652                                 6);
00653                         dpbcon_(uplo, &n, &kd, &afac[1], &ldab, &anorm, &
00654                                 rcond, &work[1], &iwork[1], &info);
00655 
00656 /*                    Check error code from DPBCON. */
00657 
00658                         if (info != 0) {
00659                             alaerh_(path, "DPBCON", &info, &c__0, uplo, &n, &
00660                                     n, &kd, &kd, &c_n1, &imat, &nfail, &nerrs, 
00661                                      nout);
00662                         }
00663 
00664                         result[6] = dget06_(&rcond, &rcondc);
00665 
00666 /*                    Print the test ratio if it is .GE. THRESH. */
00667 
00668                         if (result[6] >= *thresh) {
00669                             if (nfail == 0 && nerrs == 0) {
00670                                 alahd_(nout, path);
00671                             }
00672                             io___48.ciunit = *nout;
00673                             s_wsfe(&io___48);
00674                             do_fio(&c__1, uplo, (ftnlen)1);
00675                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00676                                     ;
00677                             do_fio(&c__1, (char *)&kd, (ftnlen)sizeof(integer)
00678                                     );
00679                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00680                                     integer));
00681                             do_fio(&c__1, (char *)&c__7, (ftnlen)sizeof(
00682                                     integer));
00683                             do_fio(&c__1, (char *)&result[6], (ftnlen)sizeof(
00684                                     doublereal));
00685                             e_wsfe();
00686                             ++nfail;
00687                         }
00688                         ++nrun;
00689 L50:
00690                         ;
00691                     }
00692 L60:
00693                     ;
00694                 }
00695 /* L70: */
00696             }
00697 /* L80: */
00698         }
00699 /* L90: */
00700     }
00701 
00702 /*     Print a summary of the results. */
00703 
00704     alasum_(path, nout, &nfail, &nrun, &nerrs);
00705 
00706     return 0;
00707 
00708 /*     End of DCHKPB */
00709 
00710 } /* dchkpb_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:38