00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
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
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 int derrab_(integer *nunit)
00039 {
00040
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
00047 integer s_wsle(cilist *), e_wsle(void);
00048 int s_copy(char *, char *, ftnlen, ftnlen);
00049 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00050
00051
00052 doublereal a[16] , b[4], c__[4];
00053 integer i__, j;
00054 doublereal r__[4], w[8], x[4], r1[4], r2[4], af[16] ;
00055 integer ip[4], info, iter;
00056 doublereal work[1];
00057 real swork[1];
00058 extern 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
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
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 infoc_1.nout = *nunit;
00107 io___1.ciunit = infoc_1.nout;
00108 s_wsle(&io___1);
00109 e_wsle();
00110
00111
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
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
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
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
00176
00177 }