cchkge.c
Go to the documentation of this file.
00001 /* cchkge.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 complex c_b23 = {0.f,0.f};
00038 static logical c_true = TRUE_;
00039 static integer c__8 = 8;
00040 
00041 /* Subroutine */ int cchkge_(logical *dotype, integer *nm, integer *mval, 
00042         integer *nn, integer *nval, integer *nnb, integer *nbval, integer *
00043         nns, integer *nsval, real *thresh, logical *tsterr, integer *nmax, 
00044         complex *a, complex *afac, complex *ainv, complex *b, complex *x, 
00045         complex *xact, complex *work, real *rwork, integer *iwork, integer *
00046         nout)
00047 {
00048     /* Initialized data */
00049 
00050     static integer iseedy[4] = { 1988,1989,1990,1991 };
00051     static char transs[1*3] = "N" "T" "C";
00052 
00053     /* Format strings */
00054     static char fmt_9999[] = "(\002 M = \002,i5,\002, N =\002,i5,\002, NB "
00055             "=\002,i4,\002, type \002,i2,\002, test(\002,i2,\002) =\002,g12.5)"
00056             ;
00057     static char fmt_9998[] = "(\002 TRANS='\002,a1,\002', N =\002,i5,\002, N"
00058             "RHS=\002,i3,\002, type \002,i2,\002, test(\002,i2,\002) =\002,g1"
00059             "2.5)";
00060     static char fmt_9997[] = "(\002 NORM ='\002,a1,\002', N =\002,i5,\002"
00061             ",\002,10x,\002 type \002,i2,\002, test(\002,i2,\002) =\002,g12.5)"
00062             ;
00063 
00064     /* System generated locals */
00065     integer i__1, i__2, i__3, i__4, i__5;
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 
00071     /* Local variables */
00072     integer i__, k, m, n, nb, im, in, kl, ku, nt, lda, inb, ioff, mode, imat, 
00073             info;
00074     char path[3], dist[1];
00075     integer irhs, nrhs;
00076     char norm[1], type__[1];
00077     integer nrun;
00078     extern /* Subroutine */ int alahd_(integer *, char *), cget01_(
00079             integer *, integer *, complex *, integer *, complex *, integer *, 
00080             integer *, real *, real *), cget02_(char *, integer *, integer *, 
00081             integer *, complex *, integer *, complex *, integer *, complex *, 
00082             integer *, real *, real *), cget03_(integer *, complex *, 
00083             integer *, complex *, integer *, complex *, integer *, real *, 
00084             real *, real *), cget04_(integer *, integer *, complex *, integer 
00085             *, complex *, integer *, real *, real *);
00086     integer nfail, iseed[4];
00087     extern /* Subroutine */ int cget07_(char *, integer *, integer *, complex 
00088             *, integer *, complex *, integer *, complex *, integer *, complex 
00089             *, integer *, real *, logical *, real *, real *);
00090     real rcond;
00091     integer nimat;
00092     extern doublereal sget06_(real *, real *);
00093     real anorm;
00094     integer itran;
00095     char trans[1];
00096     integer izero, nerrs;
00097     real dummy;
00098     integer lwork;
00099     logical zerot;
00100     char xtype[1];
00101     extern /* Subroutine */ int clatb4_(char *, integer *, integer *, integer 
00102             *, char *, integer *, integer *, real *, integer *, real *, char *
00103 );
00104     extern doublereal clange_(char *, integer *, integer *, complex *, 
00105             integer *, real *);
00106     extern /* Subroutine */ int alaerh_(char *, char *, integer *, integer *, 
00107             char *, integer *, integer *, integer *, integer *, integer *, 
00108             integer *, integer *, integer *, integer *), cgecon_(char *, integer *, complex *, integer *, real *, 
00109             real *, complex *, real *, integer *), cerrge_(char *, 
00110             integer *);
00111     real rcondc;
00112     extern /* Subroutine */ int cgerfs_(char *, integer *, integer *, complex 
00113             *, integer *, complex *, integer *, integer *, complex *, integer 
00114             *, complex *, integer *, real *, real *, complex *, real *, 
00115             integer *), cgetrf_(integer *, integer *, complex *, 
00116             integer *, integer *, integer *), clacpy_(char *, integer *, 
00117             integer *, complex *, integer *, complex *, integer *), 
00118             clarhs_(char *, char *, char *, char *, integer *, integer *, 
00119             integer *, integer *, integer *, complex *, integer *, complex *, 
00120             integer *, complex *, integer *, integer *, integer *), cgetri_(integer *, complex *, integer *, 
00121             integer *, complex *, integer *, integer *);
00122     real rcondi;
00123     extern /* Subroutine */ int claset_(char *, integer *, integer *, complex 
00124             *, complex *, complex *, integer *), alasum_(char *, 
00125             integer *, integer *, integer *, integer *);
00126     real cndnum, anormi, rcondo;
00127     extern /* Subroutine */ int cgetrs_(char *, integer *, integer *, complex 
00128             *, integer *, integer *, complex *, integer *, integer *);
00129     real ainvnm;
00130     extern /* Subroutine */ int clatms_(integer *, integer *, char *, integer 
00131             *, char *, real *, integer *, real *, real *, integer *, integer *
00132 , char *, complex *, integer *, complex *, integer *);
00133     logical trfcon;
00134     real anormo;
00135     extern /* Subroutine */ int xlaenv_(integer *, integer *);
00136     real result[8];
00137 
00138     /* Fortran I/O blocks */
00139     static cilist io___41 = { 0, 0, 0, fmt_9999, 0 };
00140     static cilist io___46 = { 0, 0, 0, fmt_9998, 0 };
00141     static cilist io___50 = { 0, 0, 0, fmt_9997, 0 };
00142 
00143 
00144 
00145 /*  -- LAPACK test routine (version 3.1.1) -- */
00146 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00147 /*     January 2007 */
00148 
00149 /*     .. Scalar Arguments .. */
00150 /*     .. */
00151 /*     .. Array Arguments .. */
00152 /*     .. */
00153 
00154 /*  Purpose */
00155 /*  ======= */
00156 
00157 /*  CCHKGE tests CGETRF, -TRI, -TRS, -RFS, and -CON. */
00158 
00159 /*  Arguments */
00160 /*  ========= */
00161 
00162 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00163 /*          The matrix types to be used for testing.  Matrices of type j */
00164 /*          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) = */
00165 /*          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used. */
00166 
00167 /*  NM      (input) INTEGER */
00168 /*          The number of values of M contained in the vector MVAL. */
00169 
00170 /*  MVAL    (input) INTEGER array, dimension (NM) */
00171 /*          The values of the matrix row dimension M. */
00172 
00173 /*  NN      (input) INTEGER */
00174 /*          The number of values of N contained in the vector NVAL. */
00175 
00176 /*  NVAL    (input) INTEGER array, dimension (NN) */
00177 /*          The values of the matrix column dimension N. */
00178 
00179 /*  NNB     (input) INTEGER */
00180 /*          The number of values of NB contained in the vector NBVAL. */
00181 
00182 /*  NBVAL   (input) INTEGER array, dimension (NBVAL) */
00183 /*          The values of the blocksize NB. */
00184 
00185 /*  NNS     (input) INTEGER */
00186 /*          The number of values of NRHS contained in the vector NSVAL. */
00187 
00188 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00189 /*          The values of the number of right hand sides NRHS. */
00190 
00191 /*  NRHS    (input) INTEGER */
00192 /*          The number of right hand side vectors to be generated for */
00193 /*          each linear system. */
00194 
00195 /*  THRESH  (input) REAL */
00196 /*          The threshold value for the test ratios.  A result is */
00197 /*          included in the output file if RESULT >= THRESH.  To have */
00198 /*          every test ratio printed, use THRESH = 0. */
00199 
00200 /*  TSTERR  (input) LOGICAL */
00201 /*          Flag that indicates whether error exits are to be tested. */
00202 
00203 /*  NMAX    (input) INTEGER */
00204 /*          The maximum value permitted for M or N, used in dimensioning */
00205 /*          the work arrays. */
00206 
00207 /*  A       (workspace) COMPLEX array, dimension (NMAX*NMAX) */
00208 
00209 /*  AFAC    (workspace) COMPLEX array, dimension (NMAX*NMAX) */
00210 
00211 /*  AINV    (workspace) COMPLEX array, dimension (NMAX*NMAX) */
00212 
00213 /*  B       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00214 /*          where NSMAX is the largest entry in NSVAL. */
00215 
00216 /*  X       (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00217 
00218 /*  XACT    (workspace) COMPLEX array, dimension (NMAX*NSMAX) */
00219 
00220 /*  WORK    (workspace) COMPLEX array, dimension */
00221 /*                      (NMAX*max(3,NSMAX)) */
00222 
00223 /*  RWORK   (workspace) REAL array, dimension */
00224 /*                      (max(2*NMAX,2*NSMAX+NWORK)) */
00225 
00226 /*  IWORK   (workspace) INTEGER array, dimension (NMAX) */
00227 
00228 /*  NOUT    (input) INTEGER */
00229 /*          The unit number for output. */
00230 
00231 /*  ===================================================================== */
00232 
00233 /*     .. Parameters .. */
00234 /*     .. */
00235 /*     .. Local Scalars .. */
00236 /*     .. */
00237 /*     .. Local Arrays .. */
00238 /*     .. */
00239 /*     .. External Functions .. */
00240 /*     .. */
00241 /*     .. External Subroutines .. */
00242 /*     .. */
00243 /*     .. Intrinsic Functions .. */
00244 /*     .. */
00245 /*     .. Scalars in Common .. */
00246 /*     .. */
00247 /*     .. Common blocks .. */
00248 /*     .. */
00249 /*     .. Data statements .. */
00250     /* Parameter adjustments */
00251     --iwork;
00252     --rwork;
00253     --work;
00254     --xact;
00255     --x;
00256     --b;
00257     --ainv;
00258     --afac;
00259     --a;
00260     --nsval;
00261     --nbval;
00262     --nval;
00263     --mval;
00264     --dotype;
00265 
00266     /* Function Body */
00267 /*     .. */
00268 /*     .. Executable Statements .. */
00269 
00270 /*     Initialize constants and the random number seed. */
00271 
00272     s_copy(path, "Complex precision", (ftnlen)1, (ftnlen)17);
00273     s_copy(path + 1, "GE", (ftnlen)2, (ftnlen)2);
00274     nrun = 0;
00275     nfail = 0;
00276     nerrs = 0;
00277     for (i__ = 1; i__ <= 4; ++i__) {
00278         iseed[i__ - 1] = iseedy[i__ - 1];
00279 /* L10: */
00280     }
00281 
00282 /*     Test the error exits */
00283 
00284     xlaenv_(&c__1, &c__1);
00285     if (*tsterr) {
00286         cerrge_(path, nout);
00287     }
00288     infoc_1.infot = 0;
00289     xlaenv_(&c__2, &c__2);
00290 
00291 /*     Do for each value of M in MVAL */
00292 
00293     i__1 = *nm;
00294     for (im = 1; im <= i__1; ++im) {
00295         m = mval[im];
00296         lda = max(1,m);
00297 
00298 /*        Do for each value of N in NVAL */
00299 
00300         i__2 = *nn;
00301         for (in = 1; in <= i__2; ++in) {
00302             n = nval[in];
00303             *(unsigned char *)xtype = 'N';
00304             nimat = 11;
00305             if (m <= 0 || n <= 0) {
00306                 nimat = 1;
00307             }
00308 
00309             i__3 = nimat;
00310             for (imat = 1; imat <= i__3; ++imat) {
00311 
00312 /*              Do the tests only if DOTYPE( IMAT ) is true. */
00313 
00314                 if (! dotype[imat]) {
00315                     goto L100;
00316                 }
00317 
00318 /*              Skip types 5, 6, or 7 if the matrix size is too small. */
00319 
00320                 zerot = imat >= 5 && imat <= 7;
00321                 if (zerot && n < imat - 4) {
00322                     goto L100;
00323                 }
00324 
00325 /*              Set up parameters with CLATB4 and generate a test matrix */
00326 /*              with CLATMS. */
00327 
00328                 clatb4_(path, &imat, &m, &n, type__, &kl, &ku, &anorm, &mode, 
00329                         &cndnum, dist);
00330 
00331                 s_copy(srnamc_1.srnamt, "CLATMS", (ftnlen)32, (ftnlen)6);
00332                 clatms_(&m, &n, dist, iseed, type__, &rwork[1], &mode, &
00333                         cndnum, &anorm, &kl, &ku, "No packing", &a[1], &lda, &
00334                         work[1], &info);
00335 
00336 /*              Check error code from CLATMS. */
00337 
00338                 if (info != 0) {
00339                     alaerh_(path, "CLATMS", &info, &c__0, " ", &m, &n, &c_n1, 
00340                             &c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00341                     goto L100;
00342                 }
00343 
00344 /*              For types 5-7, zero one or more columns of the matrix to */
00345 /*              test that INFO is returned correctly. */
00346 
00347                 if (zerot) {
00348                     if (imat == 5) {
00349                         izero = 1;
00350                     } else if (imat == 6) {
00351                         izero = min(m,n);
00352                     } else {
00353                         izero = min(m,n) / 2 + 1;
00354                     }
00355                     ioff = (izero - 1) * lda;
00356                     if (imat < 7) {
00357                         i__4 = m;
00358                         for (i__ = 1; i__ <= i__4; ++i__) {
00359                             i__5 = ioff + i__;
00360                             a[i__5].r = 0.f, a[i__5].i = 0.f;
00361 /* L20: */
00362                         }
00363                     } else {
00364                         i__4 = n - izero + 1;
00365                         claset_("Full", &m, &i__4, &c_b23, &c_b23, &a[ioff + 
00366                                 1], &lda);
00367                     }
00368                 } else {
00369                     izero = 0;
00370                 }
00371 
00372 /*              These lines, if used in place of the calls in the DO 60 */
00373 /*              loop, cause the code to bomb on a Sun SPARCstation. */
00374 
00375 /*               ANORMO = CLANGE( 'O', M, N, A, LDA, RWORK ) */
00376 /*               ANORMI = CLANGE( 'I', M, N, A, LDA, RWORK ) */
00377 
00378 /*              Do for each blocksize in NBVAL */
00379 
00380                 i__4 = *nnb;
00381                 for (inb = 1; inb <= i__4; ++inb) {
00382                     nb = nbval[inb];
00383                     xlaenv_(&c__1, &nb);
00384 
00385 /*                 Compute the LU factorization of the matrix. */
00386 
00387                     clacpy_("Full", &m, &n, &a[1], &lda, &afac[1], &lda);
00388                     s_copy(srnamc_1.srnamt, "CGETRF", (ftnlen)32, (ftnlen)6);
00389                     cgetrf_(&m, &n, &afac[1], &lda, &iwork[1], &info);
00390 
00391 /*                 Check error code from CGETRF. */
00392 
00393                     if (info != izero) {
00394                         alaerh_(path, "CGETRF", &info, &izero, " ", &m, &n, &
00395                                 c_n1, &c_n1, &nb, &imat, &nfail, &nerrs, nout);
00396                     }
00397                     trfcon = FALSE_;
00398 
00399 /* +    TEST 1 */
00400 /*                 Reconstruct matrix from factors and compute residual. */
00401 
00402                     clacpy_("Full", &m, &n, &afac[1], &lda, &ainv[1], &lda);
00403                     cget01_(&m, &n, &a[1], &lda, &ainv[1], &lda, &iwork[1], &
00404                             rwork[1], result);
00405                     nt = 1;
00406 
00407 /* +    TEST 2 */
00408 /*                 Form the inverse if the factorization was successful */
00409 /*                 and compute the residual. */
00410 
00411                     if (m == n && info == 0) {
00412                         clacpy_("Full", &n, &n, &afac[1], &lda, &ainv[1], &
00413                                 lda);
00414                         s_copy(srnamc_1.srnamt, "CGETRI", (ftnlen)32, (ftnlen)
00415                                 6);
00416                         nrhs = nsval[1];
00417                         lwork = *nmax * max(3,nrhs);
00418                         cgetri_(&n, &ainv[1], &lda, &iwork[1], &work[1], &
00419                                 lwork, &info);
00420 
00421 /*                    Check error code from CGETRI. */
00422 
00423                         if (info != 0) {
00424                             alaerh_(path, "CGETRI", &info, &c__0, " ", &n, &n, 
00425                                      &c_n1, &c_n1, &nb, &imat, &nfail, &nerrs, 
00426                                      nout);
00427                         }
00428 
00429 /*                    Compute the residual for the matrix times its */
00430 /*                    inverse.  Also compute the 1-norm condition number */
00431 /*                    of A. */
00432 
00433                         cget03_(&n, &a[1], &lda, &ainv[1], &lda, &work[1], &
00434                                 lda, &rwork[1], &rcondo, &result[1]);
00435                         anormo = clange_("O", &m, &n, &a[1], &lda, &rwork[1]);
00436 
00437 /*                    Compute the infinity-norm condition number of A. */
00438 
00439                         anormi = clange_("I", &m, &n, &a[1], &lda, &rwork[1]);
00440                         ainvnm = clange_("I", &n, &n, &ainv[1], &lda, &rwork[
00441                                 1]);
00442                         if (anormi <= 0.f || ainvnm <= 0.f) {
00443                             rcondi = 1.f;
00444                         } else {
00445                             rcondi = 1.f / anormi / ainvnm;
00446                         }
00447                         nt = 2;
00448                     } else {
00449 
00450 /*                    Do only the condition estimate if INFO > 0. */
00451 
00452                         trfcon = TRUE_;
00453                         anormo = clange_("O", &m, &n, &a[1], &lda, &rwork[1]);
00454                         anormi = clange_("I", &m, &n, &a[1], &lda, &rwork[1]);
00455                         rcondo = 0.f;
00456                         rcondi = 0.f;
00457                     }
00458 
00459 /*                 Print information about the tests so far that did not */
00460 /*                 pass the threshold. */
00461 
00462                     i__5 = nt;
00463                     for (k = 1; k <= i__5; ++k) {
00464                         if (result[k - 1] >= *thresh) {
00465                             if (nfail == 0 && nerrs == 0) {
00466                                 alahd_(nout, path);
00467                             }
00468                             io___41.ciunit = *nout;
00469                             s_wsfe(&io___41);
00470                             do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer))
00471                                     ;
00472                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00473                                     ;
00474                             do_fio(&c__1, (char *)&nb, (ftnlen)sizeof(integer)
00475                                     );
00476                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00477                                     integer));
00478                             do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer))
00479                                     ;
00480                             do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00481                                     sizeof(real));
00482                             e_wsfe();
00483                             ++nfail;
00484                         }
00485 /* L30: */
00486                     }
00487                     nrun += nt;
00488 
00489 /*                 Skip the remaining tests if this is not the first */
00490 /*                 block size or if M .ne. N.  Skip the solve tests if */
00491 /*                 the matrix is singular. */
00492 
00493                     if (inb > 1 || m != n) {
00494                         goto L90;
00495                     }
00496                     if (trfcon) {
00497                         goto L70;
00498                     }
00499 
00500                     i__5 = *nns;
00501                     for (irhs = 1; irhs <= i__5; ++irhs) {
00502                         nrhs = nsval[irhs];
00503                         *(unsigned char *)xtype = 'N';
00504 
00505                         for (itran = 1; itran <= 3; ++itran) {
00506                             *(unsigned char *)trans = *(unsigned char *)&
00507                                     transs[itran - 1];
00508                             if (itran == 1) {
00509                                 rcondc = rcondo;
00510                             } else {
00511                                 rcondc = rcondi;
00512                             }
00513 
00514 /* +    TEST 3 */
00515 /*                       Solve and compute residual for A * X = B. */
00516 
00517                             s_copy(srnamc_1.srnamt, "CLARHS", (ftnlen)32, (
00518                                     ftnlen)6);
00519                             clarhs_(path, xtype, " ", trans, &n, &n, &kl, &ku, 
00520                                      &nrhs, &a[1], &lda, &xact[1], &lda, &b[1]
00521 , &lda, iseed, &info);
00522                             *(unsigned char *)xtype = 'C';
00523 
00524                             clacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &
00525                                     lda);
00526                             s_copy(srnamc_1.srnamt, "CGETRS", (ftnlen)32, (
00527                                     ftnlen)6);
00528                             cgetrs_(trans, &n, &nrhs, &afac[1], &lda, &iwork[
00529                                     1], &x[1], &lda, &info);
00530 
00531 /*                       Check error code from CGETRS. */
00532 
00533                             if (info != 0) {
00534                                 alaerh_(path, "CGETRS", &info, &c__0, trans, &
00535                                         n, &n, &c_n1, &c_n1, &nrhs, &imat, &
00536                                         nfail, &nerrs, nout);
00537                             }
00538 
00539                             clacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], 
00540                                     &lda);
00541                             cget02_(trans, &n, &n, &nrhs, &a[1], &lda, &x[1], 
00542                                     &lda, &work[1], &lda, &rwork[1], &result[
00543                                     2]);
00544 
00545 /* +    TEST 4 */
00546 /*                       Check solution from generated exact solution. */
00547 
00548                             cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &
00549                                     rcondc, &result[3]);
00550 
00551 /* +    TESTS 5, 6, and 7 */
00552 /*                       Use iterative refinement to improve the */
00553 /*                       solution. */
00554 
00555                             s_copy(srnamc_1.srnamt, "CGERFS", (ftnlen)32, (
00556                                     ftnlen)6);
00557                             cgerfs_(trans, &n, &nrhs, &a[1], &lda, &afac[1], &
00558                                     lda, &iwork[1], &b[1], &lda, &x[1], &lda, 
00559                                     &rwork[1], &rwork[nrhs + 1], &work[1], &
00560                                     rwork[(nrhs << 1) + 1], &info);
00561 
00562 /*                       Check error code from CGERFS. */
00563 
00564                             if (info != 0) {
00565                                 alaerh_(path, "CGERFS", &info, &c__0, trans, &
00566                                         n, &n, &c_n1, &c_n1, &nrhs, &imat, &
00567                                         nfail, &nerrs, nout);
00568                             }
00569 
00570                             cget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &
00571                                     rcondc, &result[4]);
00572                             cget07_(trans, &n, &nrhs, &a[1], &lda, &b[1], &
00573                                     lda, &x[1], &lda, &xact[1], &lda, &rwork[
00574                                     1], &c_true, &rwork[nrhs + 1], &result[5]);
00575 
00576 /*                       Print information about the tests that did not */
00577 /*                       pass the threshold. */
00578 
00579                             for (k = 3; k <= 7; ++k) {
00580                                 if (result[k - 1] >= *thresh) {
00581                                     if (nfail == 0 && nerrs == 0) {
00582                                         alahd_(nout, path);
00583                                     }
00584                                     io___46.ciunit = *nout;
00585                                     s_wsfe(&io___46);
00586                                     do_fio(&c__1, trans, (ftnlen)1);
00587                                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(
00588                                             integer));
00589                                     do_fio(&c__1, (char *)&nrhs, (ftnlen)
00590                                             sizeof(integer));
00591                                     do_fio(&c__1, (char *)&imat, (ftnlen)
00592                                             sizeof(integer));
00593                                     do_fio(&c__1, (char *)&k, (ftnlen)sizeof(
00594                                             integer));
00595                                     do_fio(&c__1, (char *)&result[k - 1], (
00596                                             ftnlen)sizeof(real));
00597                                     e_wsfe();
00598                                     ++nfail;
00599                                 }
00600 /* L40: */
00601                             }
00602                             nrun += 5;
00603 /* L50: */
00604                         }
00605 /* L60: */
00606                     }
00607 
00608 /* +    TEST 8 */
00609 /*                    Get an estimate of RCOND = 1/CNDNUM. */
00610 
00611 L70:
00612                     for (itran = 1; itran <= 2; ++itran) {
00613                         if (itran == 1) {
00614                             anorm = anormo;
00615                             rcondc = rcondo;
00616                             *(unsigned char *)norm = 'O';
00617                         } else {
00618                             anorm = anormi;
00619                             rcondc = rcondi;
00620                             *(unsigned char *)norm = 'I';
00621                         }
00622                         s_copy(srnamc_1.srnamt, "CGECON", (ftnlen)32, (ftnlen)
00623                                 6);
00624                         cgecon_(norm, &n, &afac[1], &lda, &anorm, &rcond, &
00625                                 work[1], &rwork[1], &info);
00626 
00627 /*                       Check error code from CGECON. */
00628 
00629                         if (info != 0) {
00630                             alaerh_(path, "CGECON", &info, &c__0, norm, &n, &
00631                                     n, &c_n1, &c_n1, &c_n1, &imat, &nfail, &
00632                                     nerrs, nout);
00633                         }
00634 
00635 /*                       This line is needed on a Sun SPARCstation. */
00636 
00637                         dummy = rcond;
00638 
00639                         result[7] = sget06_(&rcond, &rcondc);
00640 
00641 /*                    Print information about the tests that did not pass */
00642 /*                    the threshold. */
00643 
00644                         if (result[7] >= *thresh) {
00645                             if (nfail == 0 && nerrs == 0) {
00646                                 alahd_(nout, path);
00647                             }
00648                             io___50.ciunit = *nout;
00649                             s_wsfe(&io___50);
00650                             do_fio(&c__1, norm, (ftnlen)1);
00651                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00652                                     ;
00653                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00654                                     integer));
00655                             do_fio(&c__1, (char *)&c__8, (ftnlen)sizeof(
00656                                     integer));
00657                             do_fio(&c__1, (char *)&result[7], (ftnlen)sizeof(
00658                                     real));
00659                             e_wsfe();
00660                             ++nfail;
00661                         }
00662                         ++nrun;
00663 /* L80: */
00664                     }
00665 L90:
00666                     ;
00667                 }
00668 L100:
00669                 ;
00670             }
00671 
00672 /* L110: */
00673         }
00674 /* L120: */
00675     }
00676 
00677 /*     Print a summary of the results. */
00678 
00679     alasum_(path, nout, &nfail, &nrun, &nerrs);
00680 
00681     return 0;
00682 
00683 /*     End of CCHKGE */
00684 
00685 } /* cchkge_ */


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