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


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