schkgt.c
Go to the documentation of this file.
00001 /* schkgt.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__3 = 3;
00034 static integer c__0 = 0;
00035 static integer c_n1 = -1;
00036 static integer c__1 = 1;
00037 static integer c__2 = 2;
00038 static integer c__7 = 7;
00039 static real c_b63 = 1.f;
00040 static real c_b64 = 0.f;
00041 
00042 /* Subroutine */ int schkgt_(logical *dotype, integer *nn, integer *nval, 
00043         integer *nns, integer *nsval, real *thresh, logical *tsterr, real *a, 
00044         real *af, real *b, real *x, real *xact, real *work, real *rwork, 
00045         integer *iwork, integer *nout)
00046 {
00047     /* Initialized data */
00048 
00049     static integer iseedy[4] = { 0,0,0,1 };
00050     static char transs[1*3] = "N" "T" "C";
00051 
00052     /* Format strings */
00053     static char fmt_9999[] = "(12x,\002N =\002,i5,\002,\002,10x,\002 type"
00054             " \002,i2,\002, test(\002,i2,\002) = \002,g12.5)";
00055     static char fmt_9997[] = "(\002 NORM ='\002,a1,\002', N =\002,i5,\002"
00056             ",\002,10x,\002 type \002,i2,\002, test(\002,i2,\002) = \002,g12."
00057             "5)";
00058     static char fmt_9998[] = "(\002 TRANS='\002,a1,\002', N =\002,i5,\002, N"
00059             "RHS=\002,i3,\002, type \002,i2,\002, test(\002,i2,\002) = \002,g"
00060             "12.5)";
00061 
00062     /* System generated locals */
00063     integer i__1, i__2, i__3, i__4;
00064     real r__1, r__2;
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__, j, k, m, n;
00072     real z__[3];
00073     integer in, kl, ku, ix, lda;
00074     real cond;
00075     integer mode, koff, imat, info;
00076     char path[3], dist[1];
00077     integer irhs, nrhs;
00078     char norm[1], type__[1];
00079     integer nrun;
00080     extern /* Subroutine */ int alahd_(integer *, char *);
00081     integer nfail, iseed[4];
00082     real rcond;
00083     extern /* Subroutine */ int sget04_(integer *, integer *, real *, integer 
00084             *, real *, integer *, real *, real *), sscal_(integer *, real *, 
00085             real *, integer *);
00086     integer nimat;
00087     extern doublereal sget06_(real *, real *);
00088     real anorm;
00089     integer itran;
00090     extern /* Subroutine */ int sgtt01_(integer *, real *, real *, real *, 
00091             real *, real *, real *, real *, integer *, real *, integer *, 
00092             real *, real *), sgtt02_(char *, integer *, integer *, real *, 
00093             real *, real *, real *, integer *, real *, integer *, real *, 
00094             real *), sgtt05_(char *, integer *, integer *, real *, 
00095             real *, real *, real *, integer *, real *, integer *, real *, 
00096             integer *, real *, real *, real *);
00097     char trans[1];
00098     integer izero, nerrs;
00099     extern doublereal sasum_(integer *, real *, integer *);
00100     extern /* Subroutine */ int scopy_(integer *, real *, integer *, real *, 
00101             integer *);
00102     logical zerot;
00103     extern /* Subroutine */ int slatb4_(char *, integer *, integer *, integer 
00104             *, char *, integer *, integer *, real *, integer *, real *, char *
00105 ), alaerh_(char *, char *, integer *, 
00106             integer *, char *, integer *, integer *, integer *, integer *, 
00107             integer *, integer *, integer *, integer *, integer *);
00108     real rcondc, rcondi, rcondo;
00109     extern /* Subroutine */ int alasum_(char *, integer *, integer *, integer 
00110             *, integer *), serrge_(char *, integer *);
00111     real ainvnm;
00112     extern doublereal slangt_(char *, integer *, real *, real *, real *);
00113     extern /* Subroutine */ int slagtm_(char *, integer *, integer *, real *, 
00114             real *, real *, real *, real *, integer *, real *, real *, 
00115             integer *);
00116     logical trfcon;
00117     extern /* Subroutine */ int slacpy_(char *, integer *, integer *, real *, 
00118             integer *, real *, integer *), sgtcon_(char *, integer *, 
00119             real *, real *, real *, real *, integer *, real *, real *, real *, 
00120              integer *, integer *), slatms_(integer *, integer *, 
00121             char *, integer *, char *, real *, integer *, real *, real *, 
00122             integer *, integer *, char *, real *, integer *, real *, integer *
00123 ), slarnv_(integer *, integer *, integer *
00124 , real *), sgtrfs_(char *, integer *, integer *, real *, real *, 
00125             real *, real *, real *, real *, real *, integer *, real *, 
00126             integer *, real *, integer *, real *, real *, real *, integer *, 
00127             integer *), sgttrf_(integer *, real *, real *, real *, 
00128             real *, integer *, integer *);
00129     real result[7];
00130     extern /* Subroutine */ int sgttrs_(char *, integer *, integer *, real *, 
00131             real *, real *, real *, integer *, real *, integer *, integer *);
00132 
00133     /* Fortran I/O blocks */
00134     static cilist io___29 = { 0, 0, 0, fmt_9999, 0 };
00135     static cilist io___39 = { 0, 0, 0, fmt_9997, 0 };
00136     static cilist io___44 = { 0, 0, 0, fmt_9998, 0 };
00137 
00138 
00139 
00140 /*  -- LAPACK test routine (version 3.1) -- */
00141 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00142 /*     November 2006 */
00143 
00144 /*     .. Scalar Arguments .. */
00145 /*     .. */
00146 /*     .. Array Arguments .. */
00147 /*     .. */
00148 
00149 /*  Purpose */
00150 /*  ======= */
00151 
00152 /*  SCHKGT tests SGTTRF, -TRS, -RFS, and -CON */
00153 
00154 /*  Arguments */
00155 /*  ========= */
00156 
00157 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00158 /*          The matrix types to be used for testing.  Matrices of type j */
00159 /*          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) = */
00160 /*          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used. */
00161 
00162 /*  NN      (input) INTEGER */
00163 /*          The number of values of N contained in the vector NVAL. */
00164 
00165 /*  NVAL    (input) INTEGER array, dimension (NN) */
00166 /*          The values of the matrix dimension N. */
00167 
00168 /*  NNS     (input) INTEGER */
00169 /*          The number of values of NRHS contained in the vector NSVAL. */
00170 
00171 /*  NSVAL   (input) INTEGER array, dimension (NNS) */
00172 /*          The values of the number of right hand sides NRHS. */
00173 
00174 /*  THRESH  (input) REAL */
00175 /*          The threshold value for the test ratios.  A result is */
00176 /*          included in the output file if RESULT >= THRESH.  To have */
00177 /*          every test ratio printed, use THRESH = 0. */
00178 
00179 /*  TSTERR  (input) LOGICAL */
00180 /*          Flag that indicates whether error exits are to be tested. */
00181 
00182 /*  A       (workspace) REAL array, dimension (NMAX*4) */
00183 
00184 /*  AF      (workspace) REAL array, dimension (NMAX*4) */
00185 
00186 /*  B       (workspace) REAL array, dimension (NMAX*NSMAX) */
00187 /*          where NSMAX is the largest entry in NSVAL. */
00188 
00189 /*  X       (workspace) REAL array, dimension (NMAX*NSMAX) */
00190 
00191 /*  XACT    (workspace) REAL array, dimension (NMAX*NSMAX) */
00192 
00193 /*  WORK    (workspace) REAL array, dimension */
00194 /*                      (NMAX*max(3,NSMAX)) */
00195 
00196 /*  RWORK   (workspace) REAL array, dimension */
00197 /*                      (max(NMAX,2*NSMAX)) */
00198 
00199 /*  IWORK   (workspace) INTEGER array, dimension (2*NMAX) */
00200 
00201 /*  NOUT    (input) INTEGER */
00202 /*          The unit number for output. */
00203 
00204 /*  ===================================================================== */
00205 
00206 /*     .. Parameters .. */
00207 /*     .. */
00208 /*     .. Local Scalars .. */
00209 /*     .. */
00210 /*     .. Local Arrays .. */
00211 /*     .. */
00212 /*     .. External Functions .. */
00213 /*     .. */
00214 /*     .. External Subroutines .. */
00215 /*     .. */
00216 /*     .. Intrinsic Functions .. */
00217 /*     .. */
00218 /*     .. Scalars in Common .. */
00219 /*     .. */
00220 /*     .. Common blocks .. */
00221 /*     .. */
00222 /*     .. Data statements .. */
00223     /* Parameter adjustments */
00224     --iwork;
00225     --rwork;
00226     --work;
00227     --xact;
00228     --x;
00229     --b;
00230     --af;
00231     --a;
00232     --nsval;
00233     --nval;
00234     --dotype;
00235 
00236     /* Function Body */
00237 /*     .. */
00238 /*     .. Executable Statements .. */
00239 
00240     s_copy(path, "Single precision", (ftnlen)1, (ftnlen)16);
00241     s_copy(path + 1, "GT", (ftnlen)2, (ftnlen)2);
00242     nrun = 0;
00243     nfail = 0;
00244     nerrs = 0;
00245     for (i__ = 1; i__ <= 4; ++i__) {
00246         iseed[i__ - 1] = iseedy[i__ - 1];
00247 /* L10: */
00248     }
00249 
00250 /*     Test the error exits */
00251 
00252     if (*tsterr) {
00253         serrge_(path, nout);
00254     }
00255     infoc_1.infot = 0;
00256 
00257     i__1 = *nn;
00258     for (in = 1; in <= i__1; ++in) {
00259 
00260 /*        Do for each value of N in NVAL. */
00261 
00262         n = nval[in];
00263 /* Computing MAX */
00264         i__2 = n - 1;
00265         m = max(i__2,0);
00266         lda = max(1,n);
00267         nimat = 12;
00268         if (n <= 0) {
00269             nimat = 1;
00270         }
00271 
00272         i__2 = nimat;
00273         for (imat = 1; imat <= i__2; ++imat) {
00274 
00275 /*           Do the tests only if DOTYPE( IMAT ) is true. */
00276 
00277             if (! dotype[imat]) {
00278                 goto L100;
00279             }
00280 
00281 /*           Set up parameters with SLATB4. */
00282 
00283             slatb4_(path, &imat, &n, &n, type__, &kl, &ku, &anorm, &mode, &
00284                     cond, dist);
00285 
00286             zerot = imat >= 8 && imat <= 10;
00287             if (imat <= 6) {
00288 
00289 /*              Types 1-6:  generate matrices of known condition number. */
00290 
00291 /* Computing MAX */
00292                 i__3 = 2 - ku, i__4 = 3 - max(1,n);
00293                 koff = max(i__3,i__4);
00294                 s_copy(srnamc_1.srnamt, "SLATMS", (ftnlen)32, (ftnlen)6);
00295                 slatms_(&n, &n, dist, iseed, type__, &rwork[1], &mode, &cond, 
00296                         &anorm, &kl, &ku, "Z", &af[koff], &c__3, &work[1], &
00297                         info);
00298 
00299 /*              Check the error code from SLATMS. */
00300 
00301                 if (info != 0) {
00302                     alaerh_(path, "SLATMS", &info, &c__0, " ", &n, &n, &kl, &
00303                             ku, &c_n1, &imat, &nfail, &nerrs, nout);
00304                     goto L100;
00305                 }
00306                 izero = 0;
00307 
00308                 if (n > 1) {
00309                     i__3 = n - 1;
00310                     scopy_(&i__3, &af[4], &c__3, &a[1], &c__1);
00311                     i__3 = n - 1;
00312                     scopy_(&i__3, &af[3], &c__3, &a[n + m + 1], &c__1);
00313                 }
00314                 scopy_(&n, &af[2], &c__3, &a[m + 1], &c__1);
00315             } else {
00316 
00317 /*              Types 7-12:  generate tridiagonal matrices with */
00318 /*              unknown condition numbers. */
00319 
00320                 if (! zerot || ! dotype[7]) {
00321 
00322 /*                 Generate a matrix with elements from [-1,1]. */
00323 
00324                     i__3 = n + (m << 1);
00325                     slarnv_(&c__2, iseed, &i__3, &a[1]);
00326                     if (anorm != 1.f) {
00327                         i__3 = n + (m << 1);
00328                         sscal_(&i__3, &anorm, &a[1], &c__1);
00329                     }
00330                 } else if (izero > 0) {
00331 
00332 /*                 Reuse the last matrix by copying back the zeroed out */
00333 /*                 elements. */
00334 
00335                     if (izero == 1) {
00336                         a[n] = z__[1];
00337                         if (n > 1) {
00338                             a[1] = z__[2];
00339                         }
00340                     } else if (izero == n) {
00341                         a[n * 3 - 2] = z__[0];
00342                         a[(n << 1) - 1] = z__[1];
00343                     } else {
00344                         a[(n << 1) - 2 + izero] = z__[0];
00345                         a[n - 1 + izero] = z__[1];
00346                         a[izero] = z__[2];
00347                     }
00348                 }
00349 
00350 /*              If IMAT > 7, set one column of the matrix to 0. */
00351 
00352                 if (! zerot) {
00353                     izero = 0;
00354                 } else if (imat == 8) {
00355                     izero = 1;
00356                     z__[1] = a[n];
00357                     a[n] = 0.f;
00358                     if (n > 1) {
00359                         z__[2] = a[1];
00360                         a[1] = 0.f;
00361                     }
00362                 } else if (imat == 9) {
00363                     izero = n;
00364                     z__[0] = a[n * 3 - 2];
00365                     z__[1] = a[(n << 1) - 1];
00366                     a[n * 3 - 2] = 0.f;
00367                     a[(n << 1) - 1] = 0.f;
00368                 } else {
00369                     izero = (n + 1) / 2;
00370                     i__3 = n - 1;
00371                     for (i__ = izero; i__ <= i__3; ++i__) {
00372                         a[(n << 1) - 2 + i__] = 0.f;
00373                         a[n - 1 + i__] = 0.f;
00374                         a[i__] = 0.f;
00375 /* L20: */
00376                     }
00377                     a[n * 3 - 2] = 0.f;
00378                     a[(n << 1) - 1] = 0.f;
00379                 }
00380             }
00381 
00382 /* +    TEST 1 */
00383 /*           Factor A as L*U and compute the ratio */
00384 /*              norm(L*U - A) / (n * norm(A) * EPS ) */
00385 
00386             i__3 = n + (m << 1);
00387             scopy_(&i__3, &a[1], &c__1, &af[1], &c__1);
00388             s_copy(srnamc_1.srnamt, "SGTTRF", (ftnlen)32, (ftnlen)6);
00389             sgttrf_(&n, &af[1], &af[m + 1], &af[n + m + 1], &af[n + (m << 1) 
00390                     + 1], &iwork[1], &info);
00391 
00392 /*           Check error code from SGTTRF. */
00393 
00394             if (info != izero) {
00395                 alaerh_(path, "SGTTRF", &info, &izero, " ", &n, &n, &c__1, &
00396                         c__1, &c_n1, &imat, &nfail, &nerrs, nout);
00397             }
00398             trfcon = info != 0;
00399 
00400             sgtt01_(&n, &a[1], &a[m + 1], &a[n + m + 1], &af[1], &af[m + 1], &
00401                     af[n + m + 1], &af[n + (m << 1) + 1], &iwork[1], &work[1], 
00402                      &lda, &rwork[1], result);
00403 
00404 /*           Print the test ratio if it is .GE. THRESH. */
00405 
00406             if (result[0] >= *thresh) {
00407                 if (nfail == 0 && nerrs == 0) {
00408                     alahd_(nout, path);
00409                 }
00410                 io___29.ciunit = *nout;
00411                 s_wsfe(&io___29);
00412                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00413                 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00414                 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00415                 do_fio(&c__1, (char *)&result[0], (ftnlen)sizeof(real));
00416                 e_wsfe();
00417                 ++nfail;
00418             }
00419             ++nrun;
00420 
00421             for (itran = 1; itran <= 2; ++itran) {
00422                 *(unsigned char *)trans = *(unsigned char *)&transs[itran - 1]
00423                         ;
00424                 if (itran == 1) {
00425                     *(unsigned char *)norm = 'O';
00426                 } else {
00427                     *(unsigned char *)norm = 'I';
00428                 }
00429                 anorm = slangt_(norm, &n, &a[1], &a[m + 1], &a[n + m + 1]);
00430 
00431                 if (! trfcon) {
00432 
00433 /*                 Use SGTTRS to solve for one column at a time of inv(A) */
00434 /*                 or inv(A^T), computing the maximum column sum as we */
00435 /*                 go. */
00436 
00437                     ainvnm = 0.f;
00438                     i__3 = n;
00439                     for (i__ = 1; i__ <= i__3; ++i__) {
00440                         i__4 = n;
00441                         for (j = 1; j <= i__4; ++j) {
00442                             x[j] = 0.f;
00443 /* L30: */
00444                         }
00445                         x[i__] = 1.f;
00446                         sgttrs_(trans, &n, &c__1, &af[1], &af[m + 1], &af[n + 
00447                                 m + 1], &af[n + (m << 1) + 1], &iwork[1], &x[
00448                                 1], &lda, &info);
00449 /* Computing MAX */
00450                         r__1 = ainvnm, r__2 = sasum_(&n, &x[1], &c__1);
00451                         ainvnm = dmax(r__1,r__2);
00452 /* L40: */
00453                     }
00454 
00455 /*                 Compute RCONDC = 1 / (norm(A) * norm(inv(A)) */
00456 
00457                     if (anorm <= 0.f || ainvnm <= 0.f) {
00458                         rcondc = 1.f;
00459                     } else {
00460                         rcondc = 1.f / anorm / ainvnm;
00461                     }
00462                     if (itran == 1) {
00463                         rcondo = rcondc;
00464                     } else {
00465                         rcondi = rcondc;
00466                     }
00467                 } else {
00468                     rcondc = 0.f;
00469                 }
00470 
00471 /* +    TEST 7 */
00472 /*              Estimate the reciprocal of the condition number of the */
00473 /*              matrix. */
00474 
00475                 s_copy(srnamc_1.srnamt, "SGTCON", (ftnlen)32, (ftnlen)6);
00476                 sgtcon_(norm, &n, &af[1], &af[m + 1], &af[n + m + 1], &af[n + 
00477                         (m << 1) + 1], &iwork[1], &anorm, &rcond, &work[1], &
00478                         iwork[n + 1], &info);
00479 
00480 /*              Check error code from SGTCON. */
00481 
00482                 if (info != 0) {
00483                     alaerh_(path, "SGTCON", &info, &c__0, norm, &n, &n, &c_n1, 
00484                              &c_n1, &c_n1, &imat, &nfail, &nerrs, nout);
00485                 }
00486 
00487                 result[6] = sget06_(&rcond, &rcondc);
00488 
00489 /*              Print the test ratio if it is .GE. THRESH. */
00490 
00491                 if (result[6] >= *thresh) {
00492                     if (nfail == 0 && nerrs == 0) {
00493                         alahd_(nout, path);
00494                     }
00495                     io___39.ciunit = *nout;
00496                     s_wsfe(&io___39);
00497                     do_fio(&c__1, norm, (ftnlen)1);
00498                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00499                     do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(integer));
00500                     do_fio(&c__1, (char *)&c__7, (ftnlen)sizeof(integer));
00501                     do_fio(&c__1, (char *)&result[6], (ftnlen)sizeof(real));
00502                     e_wsfe();
00503                     ++nfail;
00504                 }
00505                 ++nrun;
00506 /* L50: */
00507             }
00508 
00509 /*           Skip the remaining tests if the matrix is singular. */
00510 
00511             if (trfcon) {
00512                 goto L100;
00513             }
00514 
00515             i__3 = *nns;
00516             for (irhs = 1; irhs <= i__3; ++irhs) {
00517                 nrhs = nsval[irhs];
00518 
00519 /*              Generate NRHS random solution vectors. */
00520 
00521                 ix = 1;
00522                 i__4 = nrhs;
00523                 for (j = 1; j <= i__4; ++j) {
00524                     slarnv_(&c__2, iseed, &n, &xact[ix]);
00525                     ix += lda;
00526 /* L60: */
00527                 }
00528 
00529                 for (itran = 1; itran <= 3; ++itran) {
00530                     *(unsigned char *)trans = *(unsigned char *)&transs[itran 
00531                             - 1];
00532                     if (itran == 1) {
00533                         rcondc = rcondo;
00534                     } else {
00535                         rcondc = rcondi;
00536                     }
00537 
00538 /*                 Set the right hand side. */
00539 
00540                     slagtm_(trans, &n, &nrhs, &c_b63, &a[1], &a[m + 1], &a[n 
00541                             + m + 1], &xact[1], &lda, &c_b64, &b[1], &lda);
00542 
00543 /* +    TEST 2 */
00544 /*                 Solve op(A) * X = B and compute the residual. */
00545 
00546                     slacpy_("Full", &n, &nrhs, &b[1], &lda, &x[1], &lda);
00547                     s_copy(srnamc_1.srnamt, "SGTTRS", (ftnlen)32, (ftnlen)6);
00548                     sgttrs_(trans, &n, &nrhs, &af[1], &af[m + 1], &af[n + m + 
00549                             1], &af[n + (m << 1) + 1], &iwork[1], &x[1], &lda, 
00550                              &info);
00551 
00552 /*                 Check error code from SGTTRS. */
00553 
00554                     if (info != 0) {
00555                         alaerh_(path, "SGTTRS", &info, &c__0, trans, &n, &n, &
00556                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00557                                 nout);
00558                     }
00559 
00560                     slacpy_("Full", &n, &nrhs, &b[1], &lda, &work[1], &lda);
00561                     sgtt02_(trans, &n, &nrhs, &a[1], &a[m + 1], &a[n + m + 1], 
00562                              &x[1], &lda, &work[1], &lda, &rwork[1], &result[
00563                             1]);
00564 
00565 /* +    TEST 3 */
00566 /*                 Check solution from generated exact solution. */
00567 
00568                     sget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00569                             result[2]);
00570 
00571 /* +    TESTS 4, 5, and 6 */
00572 /*                 Use iterative refinement to improve the solution. */
00573 
00574                     s_copy(srnamc_1.srnamt, "SGTRFS", (ftnlen)32, (ftnlen)6);
00575                     sgtrfs_(trans, &n, &nrhs, &a[1], &a[m + 1], &a[n + m + 1], 
00576                              &af[1], &af[m + 1], &af[n + m + 1], &af[n + (m <<
00577                              1) + 1], &iwork[1], &b[1], &lda, &x[1], &lda, &
00578                             rwork[1], &rwork[nrhs + 1], &work[1], &iwork[n + 
00579                             1], &info);
00580 
00581 /*                 Check error code from SGTRFS. */
00582 
00583                     if (info != 0) {
00584                         alaerh_(path, "SGTRFS", &info, &c__0, trans, &n, &n, &
00585                                 c_n1, &c_n1, &nrhs, &imat, &nfail, &nerrs, 
00586                                 nout);
00587                     }
00588 
00589                     sget04_(&n, &nrhs, &x[1], &lda, &xact[1], &lda, &rcondc, &
00590                             result[3]);
00591                     sgtt05_(trans, &n, &nrhs, &a[1], &a[m + 1], &a[n + m + 1], 
00592                              &b[1], &lda, &x[1], &lda, &xact[1], &lda, &rwork[
00593                             1], &rwork[nrhs + 1], &result[4]);
00594 
00595 /*                 Print information about the tests that did not pass */
00596 /*                 the threshold. */
00597 
00598                     for (k = 2; k <= 6; ++k) {
00599                         if (result[k - 1] >= *thresh) {
00600                             if (nfail == 0 && nerrs == 0) {
00601                                 alahd_(nout, path);
00602                             }
00603                             io___44.ciunit = *nout;
00604                             s_wsfe(&io___44);
00605                             do_fio(&c__1, trans, (ftnlen)1);
00606                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00607                                     ;
00608                             do_fio(&c__1, (char *)&nrhs, (ftnlen)sizeof(
00609                                     integer));
00610                             do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00611                                     integer));
00612                             do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer))
00613                                     ;
00614                             do_fio(&c__1, (char *)&result[k - 1], (ftnlen)
00615                                     sizeof(real));
00616                             e_wsfe();
00617                             ++nfail;
00618                         }
00619 /* L70: */
00620                     }
00621                     nrun += 5;
00622 /* L80: */
00623                 }
00624 /* L90: */
00625             }
00626 
00627 L100:
00628             ;
00629         }
00630 /* L110: */
00631     }
00632 
00633 /*     Print a summary of the results. */
00634 
00635     alasum_(path, nout, &nfail, &nrun, &nerrs);
00636 
00637     return 0;
00638 
00639 /*     End of SCHKGT */
00640 
00641 } /* schkgt_ */


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