cchkhp.c
Go to the documentation of this file.
00001 /* cchkhp.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__0 = 0;
00034 static integer c_n1 = -1;
00035 static integer c__2 = 2;
00036 static integer c__1 = 1;
00037 static integer c__8 = 8;
00038 
00039 /* Subroutine */ int cchkhp_(logical *dotype, integer *nn, integer *nval, 
00040         integer *nns, integer *nsval, real *thresh, logical *tsterr, integer *
00041         nmax, complex *a, complex *afac, complex *ainv, complex *b, complex *
00042         x, complex *xact, complex *work, real *rwork, integer *iwork, integer 
00043         *nout)
00044 {
00045     /* Initialized data */
00046 
00047     static integer iseedy[4] = { 1988,1989,1990,1991 };
00048     static char uplos[1*2] = "U" "L";
00049 
00050     /* Format strings */
00051     static char fmt_9999[] = "(\002 UPLO = '\002,a1,\002', N =\002,i5,\002, "
00052             "type \002,i2,\002, test \002,i2,\002, ratio =\002,g12.5)";
00053     static char fmt_9998[] = "(\002 UPLO = '\002,a1,\002', N =\002,i5,\002, "
00054             "NRHS=\002,i3,\002, type \002,i2,\002, test(\002,i2,\002) =\002,g"
00055             "12.5)";
00056 
00057     /* System generated locals */
00058     integer i__1, i__2, i__3, i__4, i__5;
00059 
00060     /* Builtin functions */
00061     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00062     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00063 
00064     /* Local variables */
00065     integer i__, j, k, n, i1, i2, in, kl, ku, nt, lda, npp, ioff, mode, imat, 
00066             info;
00067     char path[3], dist[1];
00068     integer irhs, nrhs;
00069     char uplo[1], type__[1];
00070     integer nrun;
00071     extern /* Subroutine */ int alahd_(integer *, char *), cget04_(
00072             integer *, integer *, complex *, integer *, complex *, integer *, 
00073             real *, real *);
00074     integer nfail, iseed[4];
00075     extern /* Subroutine */ int chpt01_(char *, integer *, complex *, complex 
00076             *, integer *, complex *, integer *, real *, real *);
00077     extern logical lsame_(char *, char *);
00078     real rcond;
00079     integer nimat;
00080     extern doublereal sget06_(real *, real *);
00081     extern /* Subroutine */ int cppt02_(char *, integer *, integer *, complex 
00082             *, complex *, integer *, complex *, integer *, real *, real *), cppt03_(char *, integer *, complex *, complex *, complex 
00083             *, integer *, real *, real *, real *);
00084     real anorm;
00085     extern /* Subroutine */ int ccopy_(integer *, complex *, integer *, 
00086             complex *, integer *), cppt05_(char *, integer *, integer *, 
00087             complex *, complex *, integer *, complex *, integer *, complex *, 
00088             integer *, real *, real *, real *);
00089     integer iuplo, izero, nerrs;
00090     logical zerot;
00091     char xtype[1];
00092     extern /* Subroutine */ int clatb4_(char *, integer *, integer *, integer 
00093             *, char *, integer *, integer *, real *, integer *, real *, char *
00094 ), alaerh_(char *, char *, integer *, 
00095             integer *, char *, integer *, integer *, integer *, integer *, 
00096             integer *, integer *, integer *, integer *, integer *), claipd_(integer *, complex *, integer *, integer 
00097             *);
00098     extern doublereal clanhp_(char *, char *, integer *, complex *, real *);
00099     real rcondc;
00100     extern /* Subroutine */ int chpcon_(char *, integer *, complex *, integer 
00101             *, real *, real *, complex *, integer *);
00102     char packit[1];
00103     extern /* Subroutine */ int clacpy_(char *, integer *, integer *, complex 
00104             *, integer *, complex *, integer *), clarhs_(char *, char 
00105             *, char *, char *, integer *, integer *, integer *, integer *, 
00106             integer *, complex *, integer *, complex *, integer *, complex *, 
00107             integer *, integer *, integer *), 
00108             alasum_(char *, integer *, integer *, integer *, integer *);
00109     real cndnum;
00110     extern /* Subroutine */ int chprfs_(char *, integer *, integer *, complex 
00111             *, complex *, integer *, complex *, integer *, complex *, integer 
00112             *, real *, real *, complex *, real *, integer *), chptrf_(
00113             char *, integer *, complex *, integer *, integer *), 
00114             clatms_(integer *, integer *, char *, integer *, char *, real *, 
00115             integer *, real *, real *, integer *, integer *, char *, complex *
00116 , integer *, complex *, integer *), 
00117             chptri_(char *, integer *, complex *, integer *, complex *, 
00118             integer *);
00119     logical trfcon;
00120     extern /* Subroutine */ int chptrs_(char *, integer *, integer *, complex 
00121             *, integer *, complex *, integer *, integer *), cerrsy_(
00122             char *, integer *);
00123     real result[8];
00124 
00125     /* Fortran I/O blocks */
00126     static cilist io___38 = { 0, 0, 0, fmt_9999, 0 };
00127     static cilist io___41 = { 0, 0, 0, fmt_9998, 0 };
00128     static cilist io___43 = { 0, 0, 0, fmt_9999, 0 };
00129 
00130 
00131 
00132 /*  -- LAPACK test routine (version 3.1) -- */
00133 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00134 /*     November 2006 */
00135 
00136 /*     .. Scalar Arguments .. */
00137 /*     .. */
00138 /*     .. Array Arguments .. */
00139 /*     .. */
00140 
00141 /*  Purpose */
00142 /*  ======= */
00143 
00144 /*  CCHKHP tests CHPTRF, -TRI, -TRS, -RFS, and -CON */
00145 
00146 /*  Arguments */
00147 /*  ========= */
00148 
00149 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00150 /*          The matrix types to be used for testing.  Matrices of type j */
00151 /*          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) = */
00152 /*          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used. */
00153 
00154 /*  NN      (input) INTEGER */
00155 /*          The number of values of N contained in the vector NVAL. */
00156 
00157 /*  NVAL    (input) INTEGER array, dimension (NN) */
00158 /*          The values of the matrix dimension N. */
00159 
00160 /*  NNS     (input) INTEGER */
00161 /*          The number of values of NRHS contained in the vector NSVAL. */
00162 
00163 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00164 /*          The values of the number of right hand sides NRHS. */
00165 
00166 /*  THRESH  (input) REAL */
00167 /*          The threshold value for the test ratios.  A result is */
00168 /*          included in the output file if RESULT >= THRESH.  To have */
00169 /*          every test ratio printed, use THRESH = 0. */
00170 
00171 /*  TSTERR  (input) LOGICAL */
00172 /*          Flag that indicates whether error exits are to be tested. */
00173 
00174 /*  NMAX    (input) INTEGER */
00175 /*          The maximum value permitted for N, used in dimensioning the */
00176 /*          work arrays. */
00177 
00178 /*  A       (workspace) COMPLEX array, dimension */
00179 /*                      (NMAX*(NMAX+1)/2) */
00180 
00181 /*  AFAC    (workspace) COMPLEX array, dimension */
00182 /*                      (NMAX*(NMAX+1)/2) */
00183 
00184 /*  AINV    (workspace) COMPLEX array, dimension */
00185 /*                      (NMAX*(NMAX+1)/2) */
00186 
00187 /*  B       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00188 /*          where NSMAX is the largest entry in NSVAL. */
00189 
00190 /*  X       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00191 
00192 /*  XACT    (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00193 
00194 /*  WORK    (workspace) COMPLEX array, dimension */
00195 /*                      (NMAX*max(2,NSMAX)) */
00196 
00197 /*  RWORK   (workspace) REAL array, */
00198 /*                                 dimension (NMAX+2*NSMAX) */
00199 
00200 /*  IWORK   (workspace) INTEGER array, dimension (NMAX) */
00201 
00202 /*  NOUT    (input) INTEGER */
00203 /*          The unit number for output. */
00204 
00205 /*  ===================================================================== */
00206 
00207 /*     .. Parameters .. */
00208 /*     .. */
00209 /*     .. Local Scalars .. */
00210 /*     .. */
00211 /*     .. Local Arrays .. */
00212 /*     .. */
00213 /*     .. External Functions .. */
00214 /*     .. */
00215 /*     .. External Subroutines .. */
00216 /*     .. */
00217 /*     .. Intrinsic Functions .. */
00218 /*     .. */
00219 /*     .. Scalars in Common .. */
00220 /*     .. */
00221 /*     .. Common blocks .. */
00222 /*     .. */
00223 /*     .. Data statements .. */
00224     /* Parameter adjustments */
00225     --iwork;
00226     --rwork;
00227     --work;
00228     --xact;
00229     --x;
00230     --b;
00231     --ainv;
00232     --afac;
00233     --a;
00234     --nsval;
00235     --nval;
00236     --dotype;
00237 
00238     /* Function Body */
00239 /*     .. */
00240 /*     .. Executable Statements .. */
00241 
00242 /*     Initialize constants and the random number seed. */
00243 
00244     s_copy(path, "Complex precision", (ftnlen)1, (ftnlen)17);
00245     s_copy(path + 1, "HP", (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         cerrsy_(path, nout);
00258     }
00259     infoc_1.infot = 0;
00260 
00261 /*     Do for each value of N in NVAL */
00262 
00263     i__1 = *nn;
00264     for (in = 1; in <= i__1; ++in) {
00265         n = nval[in];
00266         lda = max(n,1);
00267         *(unsigned char *)xtype = 'N';
00268         nimat = 10;
00269         if (n <= 0) {
00270             nimat = 1;
00271         }
00272 
00273         izero = 0;
00274         i__2 = nimat;
00275         for (imat = 1; imat <= i__2; ++imat) {
00276 
00277 /*           Do the tests only if DOTYPE( IMAT ) is true. */
00278 
00279             if (! dotype[imat]) {
00280                 goto L160;
00281             }
00282 
00283 /*           Skip types 3, 4, 5, or 6 if the matrix size is too small. */
00284 
00285             zerot = imat >= 3 && imat <= 6;
00286             if (zerot && n < imat - 2) {
00287                 goto L160;
00288             }
00289 
00290 /*           Do first for UPLO = 'U', then for UPLO = 'L' */
00291 
00292             for (iuplo = 1; iuplo <= 2; ++iuplo) {
00293                 *(unsigned char *)uplo = *(unsigned char *)&uplos[iuplo - 1];
00294                 if (lsame_(uplo, "U")) {
00295                     *(unsigned char *)packit = 'C';
00296                 } else {
00297                     *(unsigned char *)packit = 'R';
00298                 }
00299 
00300 /*              Set up parameters with CLATB4 and generate a test matrix */
00301 /*              with CLATMS. */
00302 
00303                 clatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, &mode, 
00304                         &cndnum, dist);
00305 
00306                 s_copy(srnamc_1.srnamt, "CLATMS", (ftnlen)32, (ftnlen)6);
00307                 clatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, &
00308                         cndnum, &anorm, &kl, &ku, packit, &a[1], &lda, &work[
00309                         1], &info);
00310 
00311 /*              Check error code from CLATMS. */
00312 
00313                 if (info != 0) {
00314                     alaerh_(path, "CLATMS", &info, &c__0, uplo, &n, &n, &c_n1, 
00315                              &c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00316                     goto L150;
00317                 }
00318 
00319 /*              For types 3-6, zero one or more rows and columns of */
00320 /*              the matrix to test that INFO is returned correctly. */
00321 
00322                 if (zerot) {
00323                     if (imat == 3) {
00324                         izero = 1;
00325                     } else if (imat == 4) {
00326                         izero = n;
00327                     } else {
00328                         izero = n / 2 + 1;
00329                     }
00330 
00331                     if (imat < 6) {
00332 
00333 /*                    Set row and column IZERO to zero. */
00334 
00335                         if (iuplo == 1) {
00336                             ioff = (izero - 1) * izero / 2;
00337                             i__3 = izero - 1;
00338                             for (i__ = 1; i__ <= i__3; ++i__) {
00339                                 i__4 = ioff + i__;
00340                                 a[i__4].r = 0.f, a[i__4].i = 0.f;
00341 /* L20: */
00342                             }
00343                             ioff += izero;
00344                             i__3 = n;
00345                             for (i__ = izero; i__ <= i__3; ++i__) {
00346                                 i__4 = ioff;
00347                                 a[i__4].r = 0.f, a[i__4].i = 0.f;
00348                                 ioff += i__;
00349 /* L30: */
00350                             }
00351                         } else {
00352                             ioff = izero;
00353                             i__3 = izero - 1;
00354                             for (i__ = 1; i__ <= i__3; ++i__) {
00355                                 i__4 = ioff;
00356                                 a[i__4].r = 0.f, a[i__4].i = 0.f;
00357                                 ioff = ioff + n - i__;
00358 /* L40: */
00359                             }
00360                             ioff -= izero;
00361                             i__3 = n;
00362                             for (i__ = izero; i__ <= i__3; ++i__) {
00363                                 i__4 = ioff + i__;
00364                                 a[i__4].r = 0.f, a[i__4].i = 0.f;
00365 /* L50: */
00366                             }
00367                         }
00368                     } else {
00369                         ioff = 0;
00370                         if (iuplo == 1) {
00371 
00372 /*                       Set the first IZERO rows and columns to zero. */
00373 
00374                             i__3 = n;
00375                             for (j = 1; j <= i__3; ++j) {
00376                                 i2 = min(j,izero);
00377                                 i__4 = i2;
00378                                 for (i__ = 1; i__ <= i__4; ++i__) {
00379                                     i__5 = ioff + i__;
00380                                     a[i__5].r = 0.f, a[i__5].i = 0.f;
00381 /* L60: */
00382                                 }
00383                                 ioff += j;
00384 /* L70: */
00385                             }
00386                         } else {
00387 
00388 /*                       Set the last IZERO rows and columns to zero. */
00389 
00390                             i__3 = n;
00391                             for (j = 1; j <= i__3; ++j) {
00392                                 i1 = max(j,izero);
00393                                 i__4 = n;
00394                                 for (i__ = i1; i__ <= i__4; ++i__) {
00395                                     i__5 = ioff + i__;
00396                                     a[i__5].r = 0.f, a[i__5].i = 0.f;
00397 /* L80: */
00398                                 }
00399                                 ioff = ioff + n - j;
00400 /* L90: */
00401                             }
00402                         }
00403                     }
00404                 } else {
00405                     izero = 0;
00406                 }
00407 
00408 /*              Set the imaginary part of the diagonals. */
00409 
00410                 if (iuplo == 1) {
00411                     claipd_(&n, &a[1], &c__2, &c__1);
00412                 } else {
00413                     claipd_(&n, &a[1], &n, &c_n1);
00414                 }
00415 
00416 /*              Compute the L*D*L' or U*D*U' factorization of the matrix. */
00417 
00418                 npp = n * (n + 1) / 2;
00419                 ccopy_(&npp, &a[1], &c__1, &afac[1], &c__1);
00420                 s_copy(srnamc_1.srnamt, "CHPTRF", (ftnlen)32, (ftnlen)6);
00421                 chptrf_(uplo, &n, &afac[1], &iwork[1], &info);
00422 
00423 /*              Adjust the expected value of INFO to account for */
00424 /*              pivoting. */
00425 
00426                 k = izero;
00427                 if (k > 0) {
00428 L100:
00429                     if (iwork[k] < 0) {
00430                         if (iwork[k] != -k) {
00431                             k = -iwork[k];
00432                             goto L100;
00433                         }
00434                     } else if (iwork[k] != k) {
00435                         k = iwork[k];
00436                         goto L100;
00437                     }
00438                 }
00439 
00440 /*              Check error code from CHPTRF. */
00441 
00442                 if (info != k) {
00443                     alaerh_(path, "CHPTRF", &info, &k, uplo, &n, &n, &c_n1, &
00444                             c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00445                 }
00446                 if (info != 0) {
00447                     trfcon = TRUE_;
00448                 } else {
00449                     trfcon = FALSE_;
00450                 }
00451 
00452 /* +    TEST 1 */
00453 /*              Reconstruct matrix from factors and compute residual. */
00454 
00455                 chpt01_(uplo, &n, &a[1], &afac[1], &iwork[1], &ainv[1], &lda, 
00456                         &rwork[1], result);
00457                 nt = 1;
00458 
00459 /* +    TEST 2 */
00460 /*              Form the inverse and compute the residual. */
00461 
00462                 if (! trfcon) {
00463                     ccopy_(&npp, &afac[1], &c__1, &ainv[1], &c__1);
00464                     s_copy(srnamc_1.srnamt, "CHPTRI", (ftnlen)32, (ftnlen)6);
00465                     chptri_(uplo, &n, &ainv[1], &iwork[1], &work[1], &info);
00466 
00467 /*              Check error code from CHPTRI. */
00468 
00469                     if (info != 0) {
00470                         alaerh_(path, "CHPTRI", &info, &c__0, uplo, &n, &n, &
00471                                 c_n1, &c_n1, &c_n1, &imat, &nfail, &nerrs, 
00472                                 nout);
00473                     }
00474 
00475                     cppt03_(uplo, &n, &a[1], &ainv[1], &work[1], &lda, &rwork[
00476                             1], &rcondc, &result[1]);
00477                     nt = 2;
00478                 }
00479 
00480 /*              Print information about the tests that did not pass */
00481 /*              the threshold. */
00482 
00483                 i__3 = nt;
00484                 for (k = 1; k <= i__3; ++k) {
00485                     if (result[k - 1] >= *thresh) {
00486                         if (nfail == 0 && nerrs == 0) {
00487                             alahd_(nout, path);
00488                         }
00489                         io___38.ciunit = *nout;
00490                         s_wsfe(&io___38);
00491                         do_fio(&c__1, uplo, (ftnlen)1);
00492                         do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00493                         do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00494                         do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer));
00495                         do_fio(&c__1, (char *)&result[k - 1], (ftnlen)sizeof(
00496                                 real));
00497                         e_wsfe();
00498                         ++nfail;
00499                     }
00500 /* L110: */
00501                 }
00502                 nrun += nt;
00503 
00504 /*              Do only the condition estimate if INFO is not 0. */
00505 
00506                 if (trfcon) {
00507                     rcondc = 0.f;
00508                     goto L140;
00509                 }
00510 
00511                 i__3 = *nns;
00512                 for (irhs = 1; irhs <= i__3; ++irhs) {
00513                     nrhs = nsval[irhs];
00514 
00515 /* +    TEST 3 */
00516 /*              Solve and compute residual for  A * X = B. */
00517 
00518                     s_copy(srnamc_1.srnamt, "CLARHS", (ftnlen)32, (ftnlen)6);
00519                     clarhs_(path, xtype, uplo, " ", &n, &n, &kl, &ku, &nrhs, &
00520                             a[1], &lda, &xact[1], &lda, &b[1], &lda, iseed, &
00521                             info);
00522                     *(unsigned char *)xtype = 'C';
00523                     clacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &lda);
00524 
00525                     s_copy(srnamc_1.srnamt, "CHPTRS", (ftnlen)32, (ftnlen)6);
00526                     chptrs_(uplo, &n, &nrhs, &afac[1], &iwork[1], &x[1], &lda, 
00527                              &info);
00528 
00529 /*              Check error code from CHPTRS. */
00530 
00531                     if (info != 0) {
00532                         alaerh_(path, "CHPTRS", &info, &c__0, uplo, &n, &n, &
00533                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00534                                 nout);
00535                     }
00536 
00537                     clacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], &lda);
00538                     cppt02_(uplo, &n, &nrhs, &a[1], &x[1], &lda, &work[1], &
00539                             lda, &rwork[1], &result[2]);
00540 
00541 /* +    TEST 4 */
00542 /*              Check solution from generated exact solution. */
00543 
00544                     cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00545                             result[3]);
00546 
00547 /* +    TESTS 5, 6, and 7 */
00548 /*              Use iterative refinement to improve the solution. */
00549 
00550                     s_copy(srnamc_1.srnamt, "CHPRFS", (ftnlen)32, (ftnlen)6);
00551                     chprfs_(uplo, &n, &nrhs, &a[1], &afac[1], &iwork[1], &b[1]
00552 , &lda, &x[1], &lda, &rwork[1], &rwork[nrhs + 1], 
00553                             &work[1], &rwork[(nrhs << 1) + 1], &info);
00554 
00555 /*              Check error code from CHPRFS. */
00556 
00557                     if (info != 0) {
00558                         alaerh_(path, "CHPRFS", &info, &c__0, uplo, &n, &n, &
00559                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00560                                 nout);
00561                     }
00562 
00563                     cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00564                             result[4]);
00565                     cppt05_(uplo, &n, &nrhs, &a[1], &b[1], &lda, &x[1], &lda, 
00566                             &xact[1], &lda, &rwork[1], &rwork[nrhs + 1], &
00567                             result[5]);
00568 
00569 /*                 Print information about the tests that did not pass */
00570 /*                 the threshold. */
00571 
00572                     for (k = 3; k <= 7; ++k) {
00573                         if (result[k - 1] >= *thresh) {
00574                             if (nfail == 0 && nerrs == 0) {
00575                                 alahd_(nout, path);
00576                             }
00577                             io___41.ciunit = *nout;
00578                             s_wsfe(&io___41);
00579                             do_fio(&c__1, uplo, (ftnlen)1);
00580                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00581                                     ;
00582                             do_fio(&c__1, (char *)&nrhs, (ftnlen)sizeof(
00583                                     integer));
00584                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00585                                     integer));
00586                             do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer))
00587                                     ;
00588                             do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00589                                     sizeof(real));
00590                             e_wsfe();
00591                             ++nfail;
00592                         }
00593 /* L120: */
00594                     }
00595                     nrun += 5;
00596 /* L130: */
00597                 }
00598 
00599 /* +    TEST 8 */
00600 /*              Get an estimate of RCOND = 1/CNDNUM. */
00601 
00602 L140:
00603                 anorm = clanhp_("1", uplo, &n, &a[1], &rwork[1]);
00604                 s_copy(srnamc_1.srnamt, "CHPCON", (ftnlen)32, (ftnlen)6);
00605                 chpcon_(uplo, &n, &afac[1], &iwork[1], &anorm, &rcond, &work[
00606                         1], &info);
00607 
00608 /*              Check error code from CHPCON. */
00609 
00610                 if (info != 0) {
00611                     alaerh_(path, "CHPCON", &info, &c__0, uplo, &n, &n, &c_n1, 
00612                              &c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00613                 }
00614 
00615                 result[7] = sget06_(&rcond, &rcondc);
00616 
00617 /*              Print the test ratio if it is .GE. THRESH. */
00618 
00619                 if (result[7] >= *thresh) {
00620                     if (nfail == 0 && nerrs == 0) {
00621                         alahd_(nout, path);
00622                     }
00623                     io___43.ciunit = *nout;
00624                     s_wsfe(&io___43);
00625                     do_fio(&c__1, uplo, (ftnlen)1);
00626                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00627                     do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00628                     do_fio(&c__1, (char *)&c__8, (ftnlen)sizeof(integer));
00629                     do_fio(&c__1, (char *)&result[7], (ftnlen)sizeof(real));
00630                     e_wsfe();
00631                     ++nfail;
00632                 }
00633                 ++nrun;
00634 L150:
00635                 ;
00636             }
00637 L160:
00638             ;
00639         }
00640 /* L170: */
00641     }
00642 
00643 /*     Print a summary of the results. */
00644 
00645     alasum_(path, nout, &nfail, &nrun, &nerrs);
00646 
00647     return 0;
00648 
00649 /*     End of CCHKHP */
00650 
00651 } /* cchkhp_ */


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