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


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