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


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