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


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