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


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