derrab.c
Go to the documentation of this file.
00001 /* derrab.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, nout;
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_n1 = -1;
00034 static integer c__0 = 0;
00035 static integer c__1 = 1;
00036 static integer c__2 = 2;
00037 
00038 /* Subroutine */ int derrab_(integer *nunit)
00039 {
00040     /* Format strings */
00041     static char fmt_9999[] = "(1x,a6,\002 drivers passed the tests of the er"
00042             "ror exits\002)";
00043     static char fmt_9998[] = "(\002 *** \002,a6,\002 drivers failed the test"
00044             "s of the error \002,\002exits ***\002)";
00045 
00046     /* Builtin functions */
00047     integer s_wsle(cilist *), e_wsle(void);
00048     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00049     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00050 
00051     /* Local variables */
00052     doublereal a[16]    /* was [4][4] */, b[4], c__[4];
00053     integer i__, j;
00054     doublereal r__[4], w[8], x[4], r1[4], r2[4], af[16] /* was [4][4] */;
00055     integer ip[4], info, iter;
00056     doublereal work[1];
00057     real swork[1];
00058     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00059             *, logical *), dsgesv_(integer *, integer *, doublereal *, 
00060              integer *, integer *, doublereal *, integer *, doublereal *, 
00061             integer *, doublereal *, real *, integer *, integer *);
00062 
00063     /* Fortran I/O blocks */
00064     static cilist io___1 = { 0, 0, 0, 0, 0 };
00065     static cilist io___18 = { 0, 0, 0, fmt_9999, 0 };
00066     static cilist io___19 = { 0, 0, 0, fmt_9998, 0 };
00067 
00068 
00069 
00070 /*  -- LAPACK test routine (version 3.1.1) -- */
00071 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00072 /*     January 2007 */
00073 
00074 /*     .. Scalar Arguments .. */
00075 /*     .. */
00076 
00077 /*  Purpose */
00078 /*  ======= */
00079 
00080 /*  DERRAB tests the error exits for DSGESV. */
00081 
00082 /*  Arguments */
00083 /*  ========= */
00084 
00085 /*  NUNIT   (input) INTEGER */
00086 /*          The unit number for output. */
00087 
00088 /*  ===================================================================== */
00089 
00090 /*     .. Parameters .. */
00091 /*     .. */
00092 /*     .. Local Scalars .. */
00093 /*     .. */
00094 /*     .. Local Arrays .. */
00095 /*     .. */
00096 /*     .. External Subroutines .. */
00097 /*     .. */
00098 /*     .. Scalars in Common .. */
00099 /*     .. */
00100 /*     .. Common blocks .. */
00101 /*     .. */
00102 /*     .. Intrinsic Functions .. */
00103 /*     .. */
00104 /*     .. Executable Statements .. */
00105 
00106     infoc_1.nout = *nunit;
00107     io___1.ciunit = infoc_1.nout;
00108     s_wsle(&io___1);
00109     e_wsle();
00110 
00111 /*     Set the variables to innocuous values. */
00112 
00113     for (j = 1; j <= 4; ++j) {
00114         for (i__ = 1; i__ <= 4; ++i__) {
00115             a[i__ + (j << 2) - 5] = 1. / (doublereal) (i__ + j);
00116             af[i__ + (j << 2) - 5] = 1. / (doublereal) (i__ + j);
00117 /* L10: */
00118         }
00119         b[j - 1] = 0.;
00120         r1[j - 1] = 0.;
00121         r2[j - 1] = 0.;
00122         w[j - 1] = 0.;
00123         x[j - 1] = 0.;
00124         c__[j - 1] = 0.;
00125         r__[j - 1] = 0.;
00126         ip[j - 1] = j;
00127 /* L20: */
00128     }
00129     infoc_1.ok = TRUE_;
00130 
00131     s_copy(srnamc_1.srnamt, "DSGESV", (ftnlen)32, (ftnlen)6);
00132     infoc_1.infot = 1;
00133     dsgesv_(&c_n1, &c__0, a, &c__1, ip, b, &c__1, x, &c__1, work, swork, &
00134             iter, &info);
00135     chkxer_("DSGESV", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00136             infoc_1.ok);
00137     infoc_1.infot = 2;
00138     dsgesv_(&c__0, &c_n1, a, &c__1, ip, b, &c__1, x, &c__1, work, swork, &
00139             iter, &info);
00140     chkxer_("DSGESV", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00141             infoc_1.ok);
00142     infoc_1.infot = 4;
00143     dsgesv_(&c__2, &c__1, a, &c__1, ip, b, &c__2, x, &c__2, work, swork, &
00144             iter, &info);
00145     chkxer_("DSGESV", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00146             infoc_1.ok);
00147     infoc_1.infot = 7;
00148     dsgesv_(&c__2, &c__1, a, &c__2, ip, b, &c__1, x, &c__2, work, swork, &
00149             iter, &info);
00150     chkxer_("DSGESV", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00151             infoc_1.ok);
00152     infoc_1.infot = 9;
00153     dsgesv_(&c__2, &c__1, a, &c__2, ip, b, &c__2, x, &c__1, work, swork, &
00154             iter, &info);
00155     chkxer_("DSGESV", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00156             infoc_1.ok);
00157 
00158 /*     Print a summary line. */
00159 
00160     if (infoc_1.ok) {
00161         io___18.ciunit = infoc_1.nout;
00162         s_wsfe(&io___18);
00163         do_fio(&c__1, "DSGESV", (ftnlen)6);
00164         e_wsfe();
00165     } else {
00166         io___19.ciunit = infoc_1.nout;
00167         s_wsfe(&io___19);
00168         do_fio(&c__1, "DSGESV", (ftnlen)6);
00169         e_wsfe();
00170     }
00171 
00172 
00173     return 0;
00174 
00175 /*     End of DERRAB */
00176 
00177 } /* derrab_ */


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