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


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