cchkpt.c
Go to the documentation of this file.
00001 /* cchkpt.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__2 = 2;
00034 static integer c__0 = 0;
00035 static integer c_n1 = -1;
00036 static integer c__1 = 1;
00037 static real c_b48 = 1.f;
00038 static real c_b49 = 0.f;
00039 static integer c__7 = 7;
00040 
00041 /* Subroutine */ int cchkpt_(logical *dotype, integer *nn, integer *nval, 
00042         integer *nns, integer *nsval, real *thresh, logical *tsterr, complex *
00043         a, real *d__, complex *e, complex *b, complex *x, complex *xact, 
00044         complex *work, real *rwork, integer *nout)
00045 {
00046     /* Initialized data */
00047 
00048     static integer iseedy[4] = { 0,0,0,1 };
00049     static char uplos[1*2] = "U" "L";
00050 
00051     /* Format strings */
00052     static char fmt_9999[] = "(\002 N =\002,i5,\002, type \002,i2,\002, te"
00053             "st \002,i2,\002, ratio = \002,g12.5)";
00054     static char fmt_9998[] = "(\002 UPLO = '\002,a1,\002', N =\002,i5,\002, "
00055             "NRHS =\002,i3,\002, type \002,i2,\002, test \002,i2,\002, ratio "
00056             "= \002,g12.5)";
00057 
00058     /* System generated locals */
00059     integer i__1, i__2, i__3, i__4, i__5;
00060     real r__1, r__2;
00061 
00062     /* Builtin functions */
00063     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00064     double c_abs(complex *);
00065     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00066 
00067     /* Local variables */
00068     integer i__, j, k, n;
00069     complex z__[3];
00070     integer ia, in, kl, ku, ix, lda;
00071     real cond;
00072     integer mode;
00073     real dmax__;
00074     integer imat, info;
00075     char path[3], dist[1];
00076     integer irhs, nrhs;
00077     char uplo[1], type__[1];
00078     integer nrun;
00079     extern /* Subroutine */ int alahd_(integer *, char *), cget04_(
00080             integer *, integer *, complex *, integer *, complex *, integer *, 
00081             real *, real *);
00082     integer nfail, iseed[4];
00083     real rcond;
00084     extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *);
00085     integer nimat;
00086     extern doublereal sget06_(real *, real *);
00087     extern /* Subroutine */ int cptt01_(integer *, real *, complex *, real *, 
00088             complex *, complex *, real *);
00089     real anorm;
00090     extern /* Subroutine */ int ccopy_(integer *, complex *, integer *, 
00091             complex *, integer *), cptt02_(char *, integer *, integer *, real 
00092             *, complex *, complex *, integer *, complex *, integer *, real *), cptt05_(integer *, integer *, real *, complex *, complex 
00093             *, integer *, complex *, integer *, complex *, integer *, real *, 
00094             real *, real *);
00095     integer iuplo, izero, nerrs;
00096     extern /* Subroutine */ int scopy_(integer *, real *, integer *, real *, 
00097             integer *);
00098     logical zerot;
00099     extern /* Subroutine */ int clatb4_(char *, integer *, integer *, integer 
00100             *, char *, integer *, integer *, real *, integer *, real *, char *
00101 ), alaerh_(char *, char *, integer *, 
00102             integer *, char *, integer *, integer *, integer *, integer *, 
00103             integer *, integer *, integer *, integer *, integer *);
00104     real rcondc;
00105     extern doublereal clanht_(char *, integer *, real *, complex *);
00106     extern /* Subroutine */ int csscal_(integer *, real *, complex *, integer 
00107             *), clacpy_(char *, integer *, integer *, complex *, integer *, 
00108             complex *, integer *), claptm_(char *, integer *, integer 
00109             *, real *, real *, complex *, complex *, integer *, real *, 
00110             complex *, integer *);
00111     extern integer isamax_(integer *, real *, integer *);
00112     extern /* Subroutine */ int alasum_(char *, integer *, integer *, integer 
00113             *, integer *), clarnv_(integer *, integer *, integer *, 
00114             complex *), cerrgt_(char *, integer *), clatms_(integer *, 
00115              integer *, char *, integer *, char *, real *, integer *, real *, 
00116             real *, integer *, integer *, char *, complex *, integer *, 
00117             complex *, integer *);
00118     real ainvnm;
00119     extern /* Subroutine */ int cptcon_(integer *, real *, complex *, real *, 
00120             real *, real *, integer *);
00121     extern doublereal scasum_(integer *, complex *, integer *);
00122     extern /* Subroutine */ int cptrfs_(char *, integer *, integer *, real *, 
00123             complex *, real *, complex *, complex *, integer *, complex *, 
00124             integer *, real *, real *, complex *, real *, integer *), 
00125             cpttrf_(integer *, real *, complex *, integer *), slarnv_(integer 
00126             *, integer *, integer *, real *);
00127     real result[7];
00128     extern /* Subroutine */ int cpttrs_(char *, integer *, integer *, real *, 
00129             complex *, complex *, integer *, integer *);
00130 
00131     /* Fortran I/O blocks */
00132     static cilist io___30 = { 0, 0, 0, fmt_9999, 0 };
00133     static cilist io___38 = { 0, 0, 0, fmt_9998, 0 };
00134     static cilist io___40 = { 0, 0, 0, fmt_9999, 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 /*  CCHKPT tests CPTTRF, -TRS, -RFS, and -CON */
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 /*  NNS     (input) INTEGER */
00167 /*          The number of values of NRHS contained in the vector NSVAL. */
00168 
00169 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00170 /*          The values of the number of right hand sides NRHS. */
00171 
00172 /*  THRESH  (input) REAL */
00173 /*          The threshold value for the test ratios.  A result is */
00174 /*          included in the output file if RESULT >= THRESH.  To have */
00175 /*          every test ratio printed, use THRESH = 0. */
00176 
00177 /*  TSTERR  (input) LOGICAL */
00178 /*          Flag that indicates whether error exits are to be tested. */
00179 
00180 /*  A       (workspace) COMPLEX array, dimension (NMAX*2) */
00181 
00182 /*  D       (workspace) REAL array, dimension (NMAX*2) */
00183 
00184 /*  E       (workspace) COMPLEX array, dimension (NMAX*2) */
00185 
00186 /*  B       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00187 /*          where NSMAX is the largest entry in NSVAL. */
00188 
00189 /*  X       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00190 
00191 /*  XACT    (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00192 
00193 /*  WORK    (workspace) COMPLEX array, dimension */
00194 /*                      (NMAX*max(3,NSMAX)) */
00195 
00196 /*  RWORK   (workspace) REAL array, dimension */
00197 /*                      (max(NMAX,2*NSMAX)) */
00198 
00199 /*  NOUT    (input) INTEGER */
00200 /*          The unit number for output. */
00201 
00202 /*  ===================================================================== */
00203 
00204 /*     .. Parameters .. */
00205 /*     .. */
00206 /*     .. Local Scalars .. */
00207 /*     .. */
00208 /*     .. Local Arrays .. */
00209 /*     .. */
00210 /*     .. External Functions .. */
00211 /*     .. */
00212 /*     .. External Subroutines .. */
00213 /*     .. */
00214 /*     .. Intrinsic Functions .. */
00215 /*     .. */
00216 /*     .. Scalars in Common .. */
00217 /*     .. */
00218 /*     .. Common blocks .. */
00219 /*     .. */
00220 /*     .. Data statements .. */
00221     /* Parameter adjustments */
00222     --rwork;
00223     --work;
00224     --xact;
00225     --x;
00226     --b;
00227     --e;
00228     --d__;
00229     --a;
00230     --nsval;
00231     --nval;
00232     --dotype;
00233 
00234     /* Function Body */
00235 /*     .. */
00236 /*     .. Executable Statements .. */
00237 
00238     s_copy(path, "Complex precision", (ftnlen)1, (ftnlen)17);
00239     s_copy(path + 1, "PT", (ftnlen)2, (ftnlen)2);
00240     nrun = 0;
00241     nfail = 0;
00242     nerrs = 0;
00243     for (i__ = 1; i__ <= 4; ++i__) {
00244         iseed[i__ - 1] = iseedy[i__ - 1];
00245 /* L10: */
00246     }
00247 
00248 /*     Test the error exits */
00249 
00250     if (*tsterr) {
00251         cerrgt_(path, nout);
00252     }
00253     infoc_1.infot = 0;
00254 
00255     i__1 = *nn;
00256     for (in = 1; in <= i__1; ++in) {
00257 
00258 /*        Do for each value of N in NVAL. */
00259 
00260         n = nval[in];
00261         lda = max(1,n);
00262         nimat = 12;
00263         if (n <= 0) {
00264             nimat = 1;
00265         }
00266 
00267         i__2 = nimat;
00268         for (imat = 1; imat <= i__2; ++imat) {
00269 
00270 /*           Do the tests only if DOTYPE( IMAT ) is true. */
00271 
00272             if (n > 0 && ! dotype[imat]) {
00273                 goto L110;
00274             }
00275 
00276 /*           Set up parameters with CLATB4. */
00277 
00278             clatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, &mode, &
00279                     cond, dist);
00280 
00281             zerot = imat >= 8 && imat <= 10;
00282             if (imat <= 6) {
00283 
00284 /*              Type 1-6:  generate a Hermitian tridiagonal matrix of */
00285 /*              known condition number in lower triangular band storage. */
00286 
00287                 s_copy(srnamc_1.srnamt, "CLATMS", (ftnlen)32, (ftnlen)6);
00288                 clatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, &cond, 
00289                         &anorm, &kl, &ku, "B", &a[1], &c__2, &work[1], &info);
00290 
00291 /*              Check the error code from CLATMS. */
00292 
00293                 if (info != 0) {
00294                     alaerh_(path, "CLATMS", &info, &c__0, " ", &n, &n, &kl, &
00295                             ku, &c_n1, &imat, &nfail, &nerrs, nout);
00296                     goto L110;
00297                 }
00298                 izero = 0;
00299 
00300 /*              Copy the matrix to D and E. */
00301 
00302                 ia = 1;
00303                 i__3 = n - 1;
00304                 for (i__ = 1; i__ <= i__3; ++i__) {
00305                     i__4 = ia;
00306                     d__[i__] = a[i__4].r;
00307                     i__4 = i__;
00308                     i__5 = ia + 1;
00309                     e[i__4].r = a[i__5].r, e[i__4].i = a[i__5].i;
00310                     ia += 2;
00311 /* L20: */
00312                 }
00313                 if (n > 0) {
00314                     i__3 = ia;
00315                     d__[n] = a[i__3].r;
00316                 }
00317             } else {
00318 
00319 /*              Type 7-12:  generate a diagonally dominant matrix with */
00320 /*              unknown condition number in the vectors D and E. */
00321 
00322                 if (! zerot || ! dotype[7]) {
00323 
00324 /*                 Let E be complex, D real, with values from [-1,1]. */
00325 
00326                     slarnv_(&c__2, iseed, &n, &d__[1]);
00327                     i__3 = n - 1;
00328                     clarnv_(&c__2, iseed, &i__3, &e[1]);
00329 
00330 /*                 Make the tridiagonal matrix diagonally dominant. */
00331 
00332                     if (n == 1) {
00333                         d__[1] = dabs(d__[1]);
00334                     } else {
00335                         d__[1] = dabs(d__[1]) + c_abs(&e[1]);
00336                         d__[n] = (r__1 = d__[n], dabs(r__1)) + c_abs(&e[n - 1]
00337                                 );
00338                         i__3 = n - 1;
00339                         for (i__ = 2; i__ <= i__3; ++i__) {
00340                             d__[i__] = (r__1 = d__[i__], dabs(r__1)) + c_abs(&
00341                                     e[i__]) + c_abs(&e[i__ - 1]);
00342 /* L30: */
00343                         }
00344                     }
00345 
00346 /*                 Scale D and E so the maximum element is ANORM. */
00347 
00348                     ix = isamax_(&n, &d__[1], &c__1);
00349                     dmax__ = d__[ix];
00350                     r__1 = anorm / dmax__;
00351                     sscal_(&n, &r__1, &d__[1], &c__1);
00352                     i__3 = n - 1;
00353                     r__1 = anorm / dmax__;
00354                     csscal_(&i__3, &r__1, &e[1], &c__1);
00355 
00356                 } else if (izero > 0) {
00357 
00358 /*                 Reuse the last matrix by copying back the zeroed out */
00359 /*                 elements. */
00360 
00361                     if (izero == 1) {
00362                         d__[1] = z__[1].r;
00363                         if (n > 1) {
00364                             e[1].r = z__[2].r, e[1].i = z__[2].i;
00365                         }
00366                     } else if (izero == n) {
00367                         i__3 = n - 1;
00368                         e[i__3].r = z__[0].r, e[i__3].i = z__[0].i;
00369                         i__3 = n;
00370                         d__[i__3] = z__[1].r;
00371                     } else {
00372                         i__3 = izero - 1;
00373                         e[i__3].r = z__[0].r, e[i__3].i = z__[0].i;
00374                         i__3 = izero;
00375                         d__[i__3] = z__[1].r;
00376                         i__3 = izero;
00377                         e[i__3].r = z__[2].r, e[i__3].i = z__[2].i;
00378                     }
00379                 }
00380 
00381 /*              For types 8-10, set one row and column of the matrix to */
00382 /*              zero. */
00383 
00384                 izero = 0;
00385                 if (imat == 8) {
00386                     izero = 1;
00387                     z__[1].r = d__[1], z__[1].i = 0.f;
00388                     d__[1] = 0.f;
00389                     if (n > 1) {
00390                         z__[2].r = e[1].r, z__[2].i = e[1].i;
00391                         e[1].r = 0.f, e[1].i = 0.f;
00392                     }
00393                 } else if (imat == 9) {
00394                     izero = n;
00395                     if (n > 1) {
00396                         i__3 = n - 1;
00397                         z__[0].r = e[i__3].r, z__[0].i = e[i__3].i;
00398                         i__3 = n - 1;
00399                         e[i__3].r = 0.f, e[i__3].i = 0.f;
00400                     }
00401                     i__3 = n;
00402                     z__[1].r = d__[i__3], z__[1].i = 0.f;
00403                     d__[n] = 0.f;
00404                 } else if (imat == 10) {
00405                     izero = (n + 1) / 2;
00406                     if (izero > 1) {
00407                         i__3 = izero - 1;
00408                         z__[0].r = e[i__3].r, z__[0].i = e[i__3].i;
00409                         i__3 = izero;
00410                         z__[2].r = e[i__3].r, z__[2].i = e[i__3].i;
00411                         i__3 = izero - 1;
00412                         e[i__3].r = 0.f, e[i__3].i = 0.f;
00413                         i__3 = izero;
00414                         e[i__3].r = 0.f, e[i__3].i = 0.f;
00415                     }
00416                     i__3 = izero;
00417                     z__[1].r = d__[i__3], z__[1].i = 0.f;
00418                     d__[izero] = 0.f;
00419                 }
00420             }
00421 
00422             scopy_(&n, &d__[1], &c__1, &d__[n + 1], &c__1);
00423             if (n > 1) {
00424                 i__3 = n - 1;
00425                 ccopy_(&i__3, &e[1], &c__1, &e[n + 1], &c__1);
00426             }
00427 
00428 /* +    TEST 1 */
00429 /*           Factor A as L*D*L' and compute the ratio */
00430 /*              norm(L*D*L' - A) / (n * norm(A) * EPS ) */
00431 
00432             cpttrf_(&n, &d__[n + 1], &e[n + 1], &info);
00433 
00434 /*           Check error code from CPTTRF. */
00435 
00436             if (info != izero) {
00437                 alaerh_(path, "CPTTRF", &info, &izero, " ", &n, &n, &c_n1, &
00438                         c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00439                 goto L110;
00440             }
00441 
00442             if (info > 0) {
00443                 rcondc = 0.f;
00444                 goto L100;
00445             }
00446 
00447             cptt01_(&n, &d__[1], &e[1], &d__[n + 1], &e[n + 1], &work[1], 
00448                     result);
00449 
00450 /*           Print the test ratio if greater than or equal to THRESH. */
00451 
00452             if (result[0] >= *thresh) {
00453                 if (nfail == 0 && nerrs == 0) {
00454                     alahd_(nout, path);
00455                 }
00456                 io___30.ciunit = *nout;
00457                 s_wsfe(&io___30);
00458                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00459                 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00460                 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00461                 do_fio(&c__1, (char *)&result[0], (ftnlen)sizeof(real));
00462                 e_wsfe();
00463                 ++nfail;
00464             }
00465             ++nrun;
00466 
00467 /*           Compute RCONDC = 1 / (norm(A) * norm(inv(A)) */
00468 
00469 /*           Compute norm(A). */
00470 
00471             anorm = clanht_("1", &n, &d__[1], &e[1]);
00472 
00473 /*           Use CPTTRS to solve for one column at a time of inv(A), */
00474 /*           computing the maximum column sum as we go. */
00475 
00476             ainvnm = 0.f;
00477             i__3 = n;
00478             for (i__ = 1; i__ <= i__3; ++i__) {
00479                 i__4 = n;
00480                 for (j = 1; j <= i__4; ++j) {
00481                     i__5 = j;
00482                     x[i__5].r = 0.f, x[i__5].i = 0.f;
00483 /* L40: */
00484                 }
00485                 i__4 = i__;
00486                 x[i__4].r = 1.f, x[i__4].i = 0.f;
00487                 cpttrs_("Lower", &n, &c__1, &d__[n + 1], &e[n + 1], &x[1], &
00488                         lda, &info);
00489 /* Computing MAX */
00490                 r__1 = ainvnm, r__2 = scasum_(&n, &x[1], &c__1);
00491                 ainvnm = dmax(r__1,r__2);
00492 /* L50: */
00493             }
00494 /* Computing MAX */
00495             r__1 = 1.f, r__2 = anorm * ainvnm;
00496             rcondc = 1.f / dmax(r__1,r__2);
00497 
00498             i__3 = *nns;
00499             for (irhs = 1; irhs <= i__3; ++irhs) {
00500                 nrhs = nsval[irhs];
00501 
00502 /*           Generate NRHS random solution vectors. */
00503 
00504                 ix = 1;
00505                 i__4 = nrhs;
00506                 for (j = 1; j <= i__4; ++j) {
00507                     clarnv_(&c__2, iseed, &n, &xact[ix]);
00508                     ix += lda;
00509 /* L60: */
00510                 }
00511 
00512                 for (iuplo = 1; iuplo <= 2; ++iuplo) {
00513 
00514 /*              Do first for UPLO = 'U', then for UPLO = 'L'. */
00515 
00516                     *(unsigned char *)uplo = *(unsigned char *)&uplos[iuplo - 
00517                             1];
00518 
00519 /*              Set the right hand side. */
00520 
00521                     claptm_(uplo, &n, &nrhs, &c_b48, &d__[1], &e[1], &xact[1], 
00522                              &lda, &c_b49, &b[1], &lda);
00523 
00524 /* +    TEST 2 */
00525 /*              Solve A*x = b and compute the residual. */
00526 
00527                     clacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &lda);
00528                     cpttrs_(uplo, &n, &nrhs, &d__[n + 1], &e[n + 1], &x[1], &
00529                             lda, &info);
00530 
00531 /*              Check error code from CPTTRS. */
00532 
00533                     if (info != 0) {
00534                         alaerh_(path, "CPTTRS", &info, &c__0, uplo, &n, &n, &
00535                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00536                                 nout);
00537                     }
00538 
00539                     clacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], &lda);
00540                     cptt02_(uplo, &n, &nrhs, &d__[1], &e[1], &x[1], &lda, &
00541                             work[1], &lda, &result[1]);
00542 
00543 /* +    TEST 3 */
00544 /*              Check solution from generated exact solution. */
00545 
00546                     cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00547                             result[2]);
00548 
00549 /* +    TESTS 4, 5, and 6 */
00550 /*              Use iterative refinement to improve the solution. */
00551 
00552                     s_copy(srnamc_1.srnamt, "CPTRFS", (ftnlen)32, (ftnlen)6);
00553                     cptrfs_(uplo, &n, &nrhs, &d__[1], &e[1], &d__[n + 1], &e[
00554                             n + 1], &b[1], &lda, &x[1], &lda, &rwork[1], &
00555                             rwork[nrhs + 1], &work[1], &rwork[(nrhs << 1) + 1]
00556 , &info);
00557 
00558 /*              Check error code from CPTRFS. */
00559 
00560                     if (info != 0) {
00561                         alaerh_(path, "CPTRFS", &info, &c__0, uplo, &n, &n, &
00562                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00563                                 nout);
00564                     }
00565 
00566                     cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00567                             result[3]);
00568                     cptt05_(&n, &nrhs, &d__[1], &e[1], &b[1], &lda, &x[1], &
00569                             lda, &xact[1], &lda, &rwork[1], &rwork[nrhs + 1], 
00570                             &result[4]);
00571 
00572 /*              Print information about the tests that did not pass the */
00573 /*              threshold. */
00574 
00575                     for (k = 2; k <= 6; ++k) {
00576                         if (result[k - 1] >= *thresh) {
00577                             if (nfail == 0 && nerrs == 0) {
00578                                 alahd_(nout, path);
00579                             }
00580                             io___38.ciunit = *nout;
00581                             s_wsfe(&io___38);
00582                             do_fio(&c__1, uplo, (ftnlen)1);
00583                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00584                                     ;
00585                             do_fio(&c__1, (char *)&nrhs, (ftnlen)sizeof(
00586                                     integer));
00587                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00588                                     integer));
00589                             do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer))
00590                                     ;
00591                             do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00592                                     sizeof(real));
00593                             e_wsfe();
00594                             ++nfail;
00595                         }
00596 /* L70: */
00597                     }
00598                     nrun += 5;
00599 
00600 /* L80: */
00601                 }
00602 /* L90: */
00603             }
00604 
00605 /* +    TEST 7 */
00606 /*           Estimate the reciprocal of the condition number of the */
00607 /*           matrix. */
00608 
00609 L100:
00610             s_copy(srnamc_1.srnamt, "CPTCON", (ftnlen)32, (ftnlen)6);
00611             cptcon_(&n, &d__[n + 1], &e[n + 1], &anorm, &rcond, &rwork[1], &
00612                     info);
00613 
00614 /*           Check error code from CPTCON. */
00615 
00616             if (info != 0) {
00617                 alaerh_(path, "CPTCON", &info, &c__0, " ", &n, &n, &c_n1, &
00618                         c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00619             }
00620 
00621             result[6] = sget06_(&rcond, &rcondc);
00622 
00623 /*           Print the test ratio if greater than or equal to THRESH. */
00624 
00625             if (result[6] >= *thresh) {
00626                 if (nfail == 0 && nerrs == 0) {
00627                     alahd_(nout, path);
00628                 }
00629                 io___40.ciunit = *nout;
00630                 s_wsfe(&io___40);
00631                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00632                 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00633                 do_fio(&c__1, (char *)&c__7, (ftnlen)sizeof(integer));
00634                 do_fio(&c__1, (char *)&result[6], (ftnlen)sizeof(real));
00635                 e_wsfe();
00636                 ++nfail;
00637             }
00638             ++nrun;
00639 L110:
00640             ;
00641         }
00642 /* L120: */
00643     }
00644 
00645 /*     Print a summary of the results. */
00646 
00647     alasum_(path, nout, &nfail, &nrun, &nerrs);
00648 
00649     return 0;
00650 
00651 /*     End of CCHKPT */
00652 
00653 } /* cchkpt_ */


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