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


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