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


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