zchkpt.c
Go to the documentation of this file.
00001 /* zchkpt.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_b48 = 1.;
00038 static doublereal c_b49 = 0.;
00039 static integer c__7 = 7;
00040 
00041 /* Subroutine */ int zchkpt_(logical *dotype, integer *nn, integer *nval, 
00042         integer *nns, integer *nsval, doublereal *thresh, logical *tsterr, 
00043         doublecomplex *a, doublereal *d__, doublecomplex *e, doublecomplex *b, 
00044          doublecomplex *x, doublecomplex *xact, doublecomplex *work, 
00045         doublereal *rwork, integer *nout)
00046 {
00047     /* Initialized data */
00048 
00049     static integer iseedy[4] = { 0,0,0,1 };
00050     static char uplos[1*2] = "U" "L";
00051 
00052     /* Format strings */
00053     static char fmt_9999[] = "(\002 N =\002,i5,\002, type \002,i2,\002, te"
00054             "st \002,i2,\002, ratio = \002,g12.5)";
00055     static char fmt_9998[] = "(\002 UPLO = '\002,a1,\002', N =\002,i5,\002, "
00056             "NRHS =\002,i3,\002, type \002,i2,\002, test \002,i2,\002, ratio "
00057             "= \002,g12.5)";
00058 
00059     /* System generated locals */
00060     integer i__1, i__2, i__3, i__4, i__5;
00061     doublereal d__1, d__2;
00062 
00063     /* Builtin functions */
00064     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00065     double z_abs(doublecomplex *);
00066     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00067 
00068     /* Local variables */
00069     integer i__, j, k, n;
00070     doublecomplex z__[3];
00071     integer ia, in, kl, ku, ix, lda;
00072     doublereal cond;
00073     integer mode;
00074     doublereal dmax__;
00075     integer imat, info;
00076     char path[3], dist[1];
00077     integer irhs, nrhs;
00078     char uplo[1], type__[1];
00079     integer nrun;
00080     extern /* Subroutine */ int alahd_(integer *, char *), dscal_(
00081             integer *, doublereal *, doublereal *, integer *);
00082     integer nfail, iseed[4];
00083     extern doublereal dget06_(doublereal *, doublereal *);
00084     doublereal rcond;
00085     integer nimat;
00086     doublereal anorm;
00087     extern /* Subroutine */ int zget04_(integer *, integer *, doublecomplex *, 
00088              integer *, doublecomplex *, integer *, doublereal *, doublereal *
00089 ), dcopy_(integer *, doublereal *, integer *, doublereal *, 
00090             integer *);
00091     integer iuplo, izero, nerrs;
00092     logical zerot;
00093     extern /* Subroutine */ int zcopy_(integer *, doublecomplex *, integer *, 
00094             doublecomplex *, integer *), zptt01_(integer *, doublereal *, 
00095             doublecomplex *, doublereal *, doublecomplex *, doublecomplex *, 
00096             doublereal *), zptt02_(char *, integer *, integer *, doublereal *, 
00097              doublecomplex *, doublecomplex *, integer *, doublecomplex *, 
00098             integer *, doublereal *), zptt05_(integer *, integer *, 
00099             doublereal *, doublecomplex *, doublecomplex *, integer *, 
00100             doublecomplex *, integer *, doublecomplex *, integer *, 
00101             doublereal *, doublereal *, doublereal *), zlatb4_(char *, 
00102             integer *, integer *, integer *, char *, integer *, integer *, 
00103             doublereal *, integer *, doublereal *, char *), alaerh_(char *, char *, integer *, integer *, char *, 
00104             integer *, integer *, integer *, integer *, integer *, integer *, 
00105             integer *, integer *, integer *);
00106     extern integer idamax_(integer *, doublereal *, integer *);
00107     doublereal rcondc;
00108     extern /* Subroutine */ int zdscal_(integer *, doublereal *, 
00109             doublecomplex *, integer *), alasum_(char *, integer *, integer *, 
00110              integer *, integer *), dlarnv_(integer *, integer *, 
00111             integer *, doublereal *);
00112     doublereal ainvnm;
00113     extern doublereal zlanht_(char *, integer *, doublereal *, doublecomplex *
00114 );
00115     extern /* Subroutine */ int zlacpy_(char *, integer *, integer *, 
00116             doublecomplex *, integer *, doublecomplex *, integer *);
00117     extern doublereal dzasum_(integer *, doublecomplex *, integer *);
00118     extern /* Subroutine */ int zlaptm_(char *, integer *, integer *, 
00119             doublereal *, doublereal *, doublecomplex *, doublecomplex *, 
00120             integer *, doublereal *, doublecomplex *, integer *), 
00121             zlatms_(integer *, integer *, char *, integer *, char *, 
00122             doublereal *, integer *, doublereal *, doublereal *, integer *, 
00123             integer *, char *, doublecomplex *, integer *, doublecomplex *, 
00124             integer *), zlarnv_(integer *, integer *, 
00125             integer *, doublecomplex *), zerrgt_(char *, integer *);
00126     doublereal result[7];
00127     extern /* Subroutine */ int zptcon_(integer *, doublereal *, 
00128             doublecomplex *, doublereal *, doublereal *, doublereal *, 
00129             integer *), zptrfs_(char *, integer *, integer *, doublereal *, 
00130             doublecomplex *, doublereal *, doublecomplex *, doublecomplex *, 
00131             integer *, doublecomplex *, integer *, doublereal *, doublereal *, 
00132              doublecomplex *, doublereal *, integer *), zpttrf_(
00133             integer *, doublereal *, doublecomplex *, integer *), zpttrs_(
00134             char *, integer *, integer *, doublereal *, doublecomplex *, 
00135             doublecomplex *, integer *, integer *);
00136 
00137     /* Fortran I/O blocks */
00138     static cilist io___30 = { 0, 0, 0, fmt_9999, 0 };
00139     static cilist io___38 = { 0, 0, 0, fmt_9998, 0 };
00140     static cilist io___40 = { 0, 0, 0, fmt_9999, 0 };
00141 
00142 
00143 
00144 /*  -- LAPACK test routine (version 3.1) -- */
00145 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00146 /*     November 2006 */
00147 
00148 /*     .. Scalar Arguments .. */
00149 /*     .. */
00150 /*     .. Array Arguments .. */
00151 /*     .. */
00152 
00153 /*  Purpose */
00154 /*  ======= */
00155 
00156 /*  ZCHKPT tests ZPTTRF, -TRS, -RFS, and -CON */
00157 
00158 /*  Arguments */
00159 /*  ========= */
00160 
00161 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00162 /*          The matrix types to be used for testing.  Matrices of type j */
00163 /*          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) = */
00164 /*          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used. */
00165 
00166 /*  NN      (input) INTEGER */
00167 /*          The number of values of N contained in the vector NVAL. */
00168 
00169 /*  NVAL    (input) INTEGER array, dimension (NN) */
00170 /*          The values of the matrix dimension N. */
00171 
00172 /*  NNS     (input) INTEGER */
00173 /*          The number of values of NRHS contained in the vector NSVAL. */
00174 
00175 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00176 /*          The values of the number of right hand sides NRHS. */
00177 
00178 /*  THRESH  (input) DOUBLE PRECISION */
00179 /*          The threshold value for the test ratios.  A result is */
00180 /*          included in the output file if RESULT >= THRESH.  To have */
00181 /*          every test ratio printed, use THRESH = 0. */
00182 
00183 /*  TSTERR  (input) LOGICAL */
00184 /*          Flag that indicates whether error exits are to be tested. */
00185 
00186 /*  A       (workspace) COMPLEX*16 array, dimension (NMAX*2) */
00187 
00188 /*  D       (workspace) DOUBLE PRECISION array, dimension (NMAX*2) */
00189 
00190 /*  E       (workspace) COMPLEX*16 array, dimension (NMAX*2) */
00191 
00192 /*  B       (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX) */
00193 /*          where NSMAX is the largest entry in NSVAL. */
00194 
00195 /*  X       (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX) */
00196 
00197 /*  XACT    (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX) */
00198 
00199 /*  WORK    (workspace) COMPLEX*16 array, dimension */
00200 /*                      (NMAX*max(3,NSMAX)) */
00201 
00202 /*  RWORK   (workspace) DOUBLE PRECISION array, dimension */
00203 /*                      (max(NMAX,2*NSMAX)) */
00204 
00205 /*  NOUT    (input) INTEGER */
00206 /*          The unit number for output. */
00207 
00208 /*  ===================================================================== */
00209 
00210 /*     .. Parameters .. */
00211 /*     .. */
00212 /*     .. Local Scalars .. */
00213 /*     .. */
00214 /*     .. Local Arrays .. */
00215 /*     .. */
00216 /*     .. External Functions .. */
00217 /*     .. */
00218 /*     .. External Subroutines .. */
00219 /*     .. */
00220 /*     .. Intrinsic Functions .. */
00221 /*     .. */
00222 /*     .. Scalars in Common .. */
00223 /*     .. */
00224 /*     .. Common blocks .. */
00225 /*     .. */
00226 /*     .. Data statements .. */
00227     /* Parameter adjustments */
00228     --rwork;
00229     --work;
00230     --xact;
00231     --x;
00232     --b;
00233     --e;
00234     --d__;
00235     --a;
00236     --nsval;
00237     --nval;
00238     --dotype;
00239 
00240     /* Function Body */
00241 /*     .. */
00242 /*     .. Executable Statements .. */
00243 
00244     s_copy(path, "Zomplex precision", (ftnlen)1, (ftnlen)17);
00245     s_copy(path + 1, "PT", (ftnlen)2, (ftnlen)2);
00246     nrun = 0;
00247     nfail = 0;
00248     nerrs = 0;
00249     for (i__ = 1; i__ <= 4; ++i__) {
00250         iseed[i__ - 1] = iseedy[i__ - 1];
00251 /* L10: */
00252     }
00253 
00254 /*     Test the error exits */
00255 
00256     if (*tsterr) {
00257         zerrgt_(path, nout);
00258     }
00259     infoc_1.infot = 0;
00260 
00261     i__1 = *nn;
00262     for (in = 1; in <= i__1; ++in) {
00263 
00264 /*        Do for each value of N in NVAL. */
00265 
00266         n = nval[in];
00267         lda = max(1,n);
00268         nimat = 12;
00269         if (n <= 0) {
00270             nimat = 1;
00271         }
00272 
00273         i__2 = nimat;
00274         for (imat = 1; imat <= i__2; ++imat) {
00275 
00276 /*           Do the tests only if DOTYPE( IMAT ) is true. */
00277 
00278             if (n > 0 && ! dotype[imat]) {
00279                 goto L110;
00280             }
00281 
00282 /*           Set up parameters with ZLATB4. */
00283 
00284             zlatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, &mode, &
00285                     cond, dist);
00286 
00287             zerot = imat >= 8 && imat <= 10;
00288             if (imat <= 6) {
00289 
00290 /*              Type 1-6:  generate a Hermitian tridiagonal matrix of */
00291 /*              known condition number in lower triangular band storage. */
00292 
00293                 s_copy(srnamc_1.srnamt, "ZLATMS", (ftnlen)32, (ftnlen)6);
00294                 zlatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, &cond, 
00295                         &anorm, &kl, &ku, "B", &a[1], &c__2, &work[1], &info);
00296 
00297 /*              Check the error code from ZLATMS. */
00298 
00299                 if (info != 0) {
00300                     alaerh_(path, "ZLATMS", &info, &c__0, " ", &n, &n, &kl, &
00301                             ku, &c_n1, &imat, &nfail, &nerrs, nout);
00302                     goto L110;
00303                 }
00304                 izero = 0;
00305 
00306 /*              Copy the matrix to D and E. */
00307 
00308                 ia = 1;
00309                 i__3 = n - 1;
00310                 for (i__ = 1; i__ <= i__3; ++i__) {
00311                     i__4 = ia;
00312                     d__[i__] = a[i__4].r;
00313                     i__4 = i__;
00314                     i__5 = ia + 1;
00315                     e[i__4].r = a[i__5].r, e[i__4].i = a[i__5].i;
00316                     ia += 2;
00317 /* L20: */
00318                 }
00319                 if (n > 0) {
00320                     i__3 = ia;
00321                     d__[n] = a[i__3].r;
00322                 }
00323             } else {
00324 
00325 /*              Type 7-12:  generate a diagonally dominant matrix with */
00326 /*              unknown condition number in the vectors D and E. */
00327 
00328                 if (! zerot || ! dotype[7]) {
00329 
00330 /*                 Let E be complex, D real, with values from [-1,1]. */
00331 
00332                     dlarnv_(&c__2, iseed, &n, &d__[1]);
00333                     i__3 = n - 1;
00334                     zlarnv_(&c__2, iseed, &i__3, &e[1]);
00335 
00336 /*                 Make the tridiagonal matrix diagonally dominant. */
00337 
00338                     if (n == 1) {
00339                         d__[1] = abs(d__[1]);
00340                     } else {
00341                         d__[1] = abs(d__[1]) + z_abs(&e[1]);
00342                         d__[n] = (d__1 = d__[n], abs(d__1)) + z_abs(&e[n - 1])
00343                                 ;
00344                         i__3 = n - 1;
00345                         for (i__ = 2; i__ <= i__3; ++i__) {
00346                             d__[i__] = (d__1 = d__[i__], abs(d__1)) + z_abs(&
00347                                     e[i__]) + z_abs(&e[i__ - 1]);
00348 /* L30: */
00349                         }
00350                     }
00351 
00352 /*                 Scale D and E so the maximum element is ANORM. */
00353 
00354                     ix = idamax_(&n, &d__[1], &c__1);
00355                     dmax__ = d__[ix];
00356                     d__1 = anorm / dmax__;
00357                     dscal_(&n, &d__1, &d__[1], &c__1);
00358                     i__3 = n - 1;
00359                     d__1 = anorm / dmax__;
00360                     zdscal_(&i__3, &d__1, &e[1], &c__1);
00361 
00362                 } else if (izero > 0) {
00363 
00364 /*                 Reuse the last matrix by copying back the zeroed out */
00365 /*                 elements. */
00366 
00367                     if (izero == 1) {
00368                         d__[1] = z__[1].r;
00369                         if (n > 1) {
00370                             e[1].r = z__[2].r, e[1].i = z__[2].i;
00371                         }
00372                     } else if (izero == n) {
00373                         i__3 = n - 1;
00374                         e[i__3].r = z__[0].r, e[i__3].i = z__[0].i;
00375                         i__3 = n;
00376                         d__[i__3] = z__[1].r;
00377                     } else {
00378                         i__3 = izero - 1;
00379                         e[i__3].r = z__[0].r, e[i__3].i = z__[0].i;
00380                         i__3 = izero;
00381                         d__[i__3] = z__[1].r;
00382                         i__3 = izero;
00383                         e[i__3].r = z__[2].r, e[i__3].i = z__[2].i;
00384                     }
00385                 }
00386 
00387 /*              For types 8-10, set one row and column of the matrix to */
00388 /*              zero. */
00389 
00390                 izero = 0;
00391                 if (imat == 8) {
00392                     izero = 1;
00393                     z__[1].r = d__[1], z__[1].i = 0.;
00394                     d__[1] = 0.;
00395                     if (n > 1) {
00396                         z__[2].r = e[1].r, z__[2].i = e[1].i;
00397                         e[1].r = 0., e[1].i = 0.;
00398                     }
00399                 } else if (imat == 9) {
00400                     izero = n;
00401                     if (n > 1) {
00402                         i__3 = n - 1;
00403                         z__[0].r = e[i__3].r, z__[0].i = e[i__3].i;
00404                         i__3 = n - 1;
00405                         e[i__3].r = 0., e[i__3].i = 0.;
00406                     }
00407                     i__3 = n;
00408                     z__[1].r = d__[i__3], z__[1].i = 0.;
00409                     d__[n] = 0.;
00410                 } else if (imat == 10) {
00411                     izero = (n + 1) / 2;
00412                     if (izero > 1) {
00413                         i__3 = izero - 1;
00414                         z__[0].r = e[i__3].r, z__[0].i = e[i__3].i;
00415                         i__3 = izero;
00416                         z__[2].r = e[i__3].r, z__[2].i = e[i__3].i;
00417                         i__3 = izero - 1;
00418                         e[i__3].r = 0., e[i__3].i = 0.;
00419                         i__3 = izero;
00420                         e[i__3].r = 0., e[i__3].i = 0.;
00421                     }
00422                     i__3 = izero;
00423                     z__[1].r = d__[i__3], z__[1].i = 0.;
00424                     d__[izero] = 0.;
00425                 }
00426             }
00427 
00428             dcopy_(&n, &d__[1], &c__1, &d__[n + 1], &c__1);
00429             if (n > 1) {
00430                 i__3 = n - 1;
00431                 zcopy_(&i__3, &e[1], &c__1, &e[n + 1], &c__1);
00432             }
00433 
00434 /* +    TEST 1 */
00435 /*           Factor A as L*D*L' and compute the ratio */
00436 /*              norm(L*D*L' - A) / (n * norm(A) * EPS ) */
00437 
00438             zpttrf_(&n, &d__[n + 1], &e[n + 1], &info);
00439 
00440 /*           Check error code from ZPTTRF. */
00441 
00442             if (info != izero) {
00443                 alaerh_(path, "ZPTTRF", &info, &izero, " ", &n, &n, &c_n1, &
00444                         c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00445                 goto L110;
00446             }
00447 
00448             if (info > 0) {
00449                 rcondc = 0.;
00450                 goto L100;
00451             }
00452 
00453             zptt01_(&n, &d__[1], &e[1], &d__[n + 1], &e[n + 1], &work[1], 
00454                     result);
00455 
00456 /*           Print the test ratio if greater than or equal to THRESH. */
00457 
00458             if (result[0] >= *thresh) {
00459                 if (nfail == 0 && nerrs == 0) {
00460                     alahd_(nout, path);
00461                 }
00462                 io___30.ciunit = *nout;
00463                 s_wsfe(&io___30);
00464                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00465                 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00466                 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00467                 do_fio(&c__1, (char *)&result[0], (ftnlen)sizeof(doublereal));
00468                 e_wsfe();
00469                 ++nfail;
00470             }
00471             ++nrun;
00472 
00473 /*           Compute RCONDC = 1 / (norm(A) * norm(inv(A)) */
00474 
00475 /*           Compute norm(A). */
00476 
00477             anorm = zlanht_("1", &n, &d__[1], &e[1]);
00478 
00479 /*           Use ZPTTRS to solve for one column at a time of inv(A), */
00480 /*           computing the maximum column sum as we go. */
00481 
00482             ainvnm = 0.;
00483             i__3 = n;
00484             for (i__ = 1; i__ <= i__3; ++i__) {
00485                 i__4 = n;
00486                 for (j = 1; j <= i__4; ++j) {
00487                     i__5 = j;
00488                     x[i__5].r = 0., x[i__5].i = 0.;
00489 /* L40: */
00490                 }
00491                 i__4 = i__;
00492                 x[i__4].r = 1., x[i__4].i = 0.;
00493                 zpttrs_("Lower", &n, &c__1, &d__[n + 1], &e[n + 1], &x[1], &
00494                         lda, &info);
00495 /* Computing MAX */
00496                 d__1 = ainvnm, d__2 = dzasum_(&n, &x[1], &c__1);
00497                 ainvnm = max(d__1,d__2);
00498 /* L50: */
00499             }
00500 /* Computing MAX */
00501             d__1 = 1., d__2 = anorm * ainvnm;
00502             rcondc = 1. / max(d__1,d__2);
00503 
00504             i__3 = *nns;
00505             for (irhs = 1; irhs <= i__3; ++irhs) {
00506                 nrhs = nsval[irhs];
00507 
00508 /*           Generate NRHS random solution vectors. */
00509 
00510                 ix = 1;
00511                 i__4 = nrhs;
00512                 for (j = 1; j <= i__4; ++j) {
00513                     zlarnv_(&c__2, iseed, &n, &xact[ix]);
00514                     ix += lda;
00515 /* L60: */
00516                 }
00517 
00518                 for (iuplo = 1; iuplo <= 2; ++iuplo) {
00519 
00520 /*              Do first for UPLO = 'U', then for UPLO = 'L'. */
00521 
00522                     *(unsigned char *)uplo = *(unsigned char *)&uplos[iuplo - 
00523                             1];
00524 
00525 /*              Set the right hand side. */
00526 
00527                     zlaptm_(uplo, &n, &nrhs, &c_b48, &d__[1], &e[1], &xact[1], 
00528                              &lda, &c_b49, &b[1], &lda);
00529 
00530 /* +    TEST 2 */
00531 /*              Solve A*x = b and compute the residual. */
00532 
00533                     zlacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &lda);
00534                     zpttrs_(uplo, &n, &nrhs, &d__[n + 1], &e[n + 1], &x[1], &
00535                             lda, &info);
00536 
00537 /*              Check error code from ZPTTRS. */
00538 
00539                     if (info != 0) {
00540                         alaerh_(path, "ZPTTRS", &info, &c__0, uplo, &n, &n, &
00541                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00542                                 nout);
00543                     }
00544 
00545                     zlacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], &lda);
00546                     zptt02_(uplo, &n, &nrhs, &d__[1], &e[1], &x[1], &lda, &
00547                             work[1], &lda, &result[1]);
00548 
00549 /* +    TEST 3 */
00550 /*              Check solution from generated exact solution. */
00551 
00552                     zget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00553                             result[2]);
00554 
00555 /* +    TESTS 4, 5, and 6 */
00556 /*              Use iterative refinement to improve the solution. */
00557 
00558                     s_copy(srnamc_1.srnamt, "ZPTRFS", (ftnlen)32, (ftnlen)6);
00559                     zptrfs_(uplo, &n, &nrhs, &d__[1], &e[1], &d__[n + 1], &e[
00560                             n + 1], &b[1], &lda, &x[1], &lda, &rwork[1], &
00561                             rwork[nrhs + 1], &work[1], &rwork[(nrhs << 1) + 1]
00562 , &info);
00563 
00564 /*              Check error code from ZPTRFS. */
00565 
00566                     if (info != 0) {
00567                         alaerh_(path, "ZPTRFS", &info, &c__0, uplo, &n, &n, &
00568                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00569                                 nout);
00570                     }
00571 
00572                     zget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00573                             result[3]);
00574                     zptt05_(&n, &nrhs, &d__[1], &e[1], &b[1], &lda, &x[1], &
00575                             lda, &xact[1], &lda, &rwork[1], &rwork[nrhs + 1], 
00576                             &result[4]);
00577 
00578 /*              Print information about the tests that did not pass the */
00579 /*              threshold. */
00580 
00581                     for (k = 2; k <= 6; ++k) {
00582                         if (result[k - 1] >= *thresh) {
00583                             if (nfail == 0 && nerrs == 0) {
00584                                 alahd_(nout, path);
00585                             }
00586                             io___38.ciunit = *nout;
00587                             s_wsfe(&io___38);
00588                             do_fio(&c__1, uplo, (ftnlen)1);
00589                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00590                                     ;
00591                             do_fio(&c__1, (char *)&nrhs, (ftnlen)sizeof(
00592                                     integer));
00593                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00594                                     integer));
00595                             do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer))
00596                                     ;
00597                             do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00598                                     sizeof(doublereal));
00599                             e_wsfe();
00600                             ++nfail;
00601                         }
00602 /* L70: */
00603                     }
00604                     nrun += 5;
00605 
00606 /* L80: */
00607                 }
00608 /* L90: */
00609             }
00610 
00611 /* +    TEST 7 */
00612 /*           Estimate the reciprocal of the condition number of the */
00613 /*           matrix. */
00614 
00615 L100:
00616             s_copy(srnamc_1.srnamt, "ZPTCON", (ftnlen)32, (ftnlen)6);
00617             zptcon_(&n, &d__[n + 1], &e[n + 1], &anorm, &rcond, &rwork[1], &
00618                     info);
00619 
00620 /*           Check error code from ZPTCON. */
00621 
00622             if (info != 0) {
00623                 alaerh_(path, "ZPTCON", &info, &c__0, " ", &n, &n, &c_n1, &
00624                         c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00625             }
00626 
00627             result[6] = dget06_(&rcond, &rcondc);
00628 
00629 /*           Print the test ratio if greater than or equal to THRESH. */
00630 
00631             if (result[6] >= *thresh) {
00632                 if (nfail == 0 && nerrs == 0) {
00633                     alahd_(nout, path);
00634                 }
00635                 io___40.ciunit = *nout;
00636                 s_wsfe(&io___40);
00637                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00638                 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00639                 do_fio(&c__1, (char *)&c__7, (ftnlen)sizeof(integer));
00640                 do_fio(&c__1, (char *)&result[6], (ftnlen)sizeof(doublereal));
00641                 e_wsfe();
00642                 ++nfail;
00643             }
00644             ++nrun;
00645 L110:
00646             ;
00647         }
00648 /* L120: */
00649     }
00650 
00651 /*     Print a summary of the results. */
00652 
00653     alasum_(path, nout, &nfail, &nrun, &nerrs);
00654 
00655     return 0;
00656 
00657 /*     End of ZCHKPT */
00658 
00659 } /* zchkpt_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:19