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


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