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


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