zerrsy.c
Go to the documentation of this file.
00001 /* zerrsy.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__2 = 2;
00034 static integer c__0 = 0;
00035 static integer c__1 = 1;
00036 static integer c_n1 = -1;
00037 static integer c__4 = 4;
00038 
00039 /* Subroutine */ int zerrsy_(char *path, integer *nunit)
00040 {
00041     /* System generated locals */
00042     integer i__1;
00043     doublereal d__1, d__2;
00044     doublecomplex z__1;
00045 
00046     /* Builtin functions */
00047     integer s_wsle(cilist *), e_wsle(void);
00048     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00049 
00050     /* Local variables */
00051     doublecomplex a[16] /* was [4][4] */, b[4];
00052     integer i__, j;
00053     doublereal r__[4];
00054     doublecomplex w[8], x[4];
00055     char c2[2];
00056     doublereal r1[4], r2[4];
00057     doublecomplex af[16]        /* was [4][4] */;
00058     integer ip[4], info;
00059     doublereal anrm, rcond;
00060     extern /* Subroutine */ int zsytf2_(char *, integer *, doublecomplex *, 
00061             integer *, integer *, integer *), alaesm_(char *, logical 
00062             *, integer *);
00063     extern logical lsamen_(integer *, char *, char *);
00064     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00065             *, logical *), zspcon_(char *, integer *, doublecomplex *, 
00066              integer *, doublereal *, doublereal *, doublecomplex *, integer *
00067 ), zsycon_(char *, integer *, doublecomplex *, integer *, 
00068             integer *, doublereal *, doublereal *, doublecomplex *, integer *), zsprfs_(char *, integer *, integer *, doublecomplex *, 
00069             doublecomplex *, integer *, doublecomplex *, integer *, 
00070             doublecomplex *, integer *, doublereal *, doublereal *, 
00071             doublecomplex *, doublereal *, integer *), zsptrf_(char *, 
00072              integer *, doublecomplex *, integer *, integer *), 
00073             zsptri_(char *, integer *, doublecomplex *, integer *, 
00074             doublecomplex *, integer *), zsyrfs_(char *, integer *, 
00075             integer *, doublecomplex *, integer *, doublecomplex *, integer *, 
00076              integer *, doublecomplex *, integer *, doublecomplex *, integer *
00077 , doublereal *, doublereal *, doublecomplex *, doublereal *, 
00078             integer *), zsytrf_(char *, integer *, doublecomplex *, 
00079             integer *, integer *, doublecomplex *, integer *, integer *), zsytri_(char *, integer *, doublecomplex *, integer *, 
00080             integer *, doublecomplex *, integer *), zsptrs_(char *, 
00081             integer *, integer *, doublecomplex *, integer *, doublecomplex *, 
00082              integer *, integer *), zsytrs_(char *, integer *, 
00083             integer *, doublecomplex *, integer *, integer *, doublecomplex *, 
00084              integer *, integer *);
00085 
00086     /* Fortran I/O blocks */
00087     static cilist io___1 = { 0, 0, 0, 0, 0 };
00088 
00089 
00090 
00091 /*  -- LAPACK test routine (version 3.1) -- */
00092 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00093 /*     November 2006 */
00094 
00095 /*     .. Scalar Arguments .. */
00096 /*     .. */
00097 
00098 /*  Purpose */
00099 /*  ======= */
00100 
00101 /*  ZERRSY tests the error exits for the COMPLEX*16 routines */
00102 /*  for symmetric indefinite matrices. */
00103 
00104 /*  Arguments */
00105 /*  ========= */
00106 
00107 /*  PATH    (input) CHARACTER*3 */
00108 /*          The LAPACK path name for the routines to be tested. */
00109 
00110 /*  NUNIT   (input) INTEGER */
00111 /*          The unit number for output. */
00112 
00113 /*  ===================================================================== */
00114 
00115 /*     .. Parameters .. */
00116 /*     .. */
00117 /*     .. Local Scalars .. */
00118 /*     .. */
00119 /*     .. Local Arrays .. */
00120 /*     .. */
00121 /*     .. External Functions .. */
00122 /*     .. */
00123 /*     .. External Subroutines .. */
00124 /*     .. */
00125 /*     .. Scalars in Common .. */
00126 /*     .. */
00127 /*     .. Common blocks .. */
00128 /*     .. */
00129 /*     .. Intrinsic Functions .. */
00130 /*     .. */
00131 /*     .. Executable Statements .. */
00132 
00133     infoc_1.nout = *nunit;
00134     io___1.ciunit = infoc_1.nout;
00135     s_wsle(&io___1);
00136     e_wsle();
00137     s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00138 
00139 /*     Set the variables to innocuous values. */
00140 
00141     for (j = 1; j <= 4; ++j) {
00142         for (i__ = 1; i__ <= 4; ++i__) {
00143             i__1 = i__ + (j << 2) - 5;
00144             d__1 = 1. / (doublereal) (i__ + j);
00145             d__2 = -1. / (doublereal) (i__ + j);
00146             z__1.r = d__1, z__1.i = d__2;
00147             a[i__1].r = z__1.r, a[i__1].i = z__1.i;
00148             i__1 = i__ + (j << 2) - 5;
00149             d__1 = 1. / (doublereal) (i__ + j);
00150             d__2 = -1. / (doublereal) (i__ + j);
00151             z__1.r = d__1, z__1.i = d__2;
00152             af[i__1].r = z__1.r, af[i__1].i = z__1.i;
00153 /* L10: */
00154         }
00155         i__1 = j - 1;
00156         b[i__1].r = 0., b[i__1].i = 0.;
00157         r1[j - 1] = 0.;
00158         r2[j - 1] = 0.;
00159         i__1 = j - 1;
00160         w[i__1].r = 0., w[i__1].i = 0.;
00161         i__1 = j - 1;
00162         x[i__1].r = 0., x[i__1].i = 0.;
00163         ip[j - 1] = j;
00164 /* L20: */
00165     }
00166     anrm = 1.;
00167     infoc_1.ok = TRUE_;
00168 
00169 /*     Test error exits of the routines that use the diagonal pivoting */
00170 /*     factorization of a symmetric indefinite matrix. */
00171 
00172     if (lsamen_(&c__2, c2, "SY")) {
00173 
00174 /*        ZSYTRF */
00175 
00176         s_copy(srnamc_1.srnamt, "ZSYTRF", (ftnlen)32, (ftnlen)6);
00177         infoc_1.infot = 1;
00178         zsytrf_("/", &c__0, a, &c__1, ip, w, &c__1, &info);
00179         chkxer_("ZSYTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00180                 infoc_1.ok);
00181         infoc_1.infot = 2;
00182         zsytrf_("U", &c_n1, a, &c__1, ip, w, &c__1, &info);
00183         chkxer_("ZSYTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00184                 infoc_1.ok);
00185         infoc_1.infot = 4;
00186         zsytrf_("U", &c__2, a, &c__1, ip, w, &c__4, &info);
00187         chkxer_("ZSYTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00188                 infoc_1.ok);
00189 
00190 /*        ZSYTF2 */
00191 
00192         s_copy(srnamc_1.srnamt, "ZSYTF2", (ftnlen)32, (ftnlen)6);
00193         infoc_1.infot = 1;
00194         zsytf2_("/", &c__0, a, &c__1, ip, &info);
00195         chkxer_("ZSYTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00196                 infoc_1.ok);
00197         infoc_1.infot = 2;
00198         zsytf2_("U", &c_n1, a, &c__1, ip, &info);
00199         chkxer_("ZSYTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00200                 infoc_1.ok);
00201         infoc_1.infot = 4;
00202         zsytf2_("U", &c__2, a, &c__1, ip, &info);
00203         chkxer_("ZSYTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00204                 infoc_1.ok);
00205 
00206 /*        ZSYTRI */
00207 
00208         s_copy(srnamc_1.srnamt, "ZSYTRI", (ftnlen)32, (ftnlen)6);
00209         infoc_1.infot = 1;
00210         zsytri_("/", &c__0, a, &c__1, ip, w, &info);
00211         chkxer_("ZSYTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00212                 infoc_1.ok);
00213         infoc_1.infot = 2;
00214         zsytri_("U", &c_n1, a, &c__1, ip, w, &info);
00215         chkxer_("ZSYTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00216                 infoc_1.ok);
00217         infoc_1.infot = 4;
00218         zsytri_("U", &c__2, a, &c__1, ip, w, &info);
00219         chkxer_("ZSYTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00220                 infoc_1.ok);
00221 
00222 /*        ZSYTRS */
00223 
00224         s_copy(srnamc_1.srnamt, "ZSYTRS", (ftnlen)32, (ftnlen)6);
00225         infoc_1.infot = 1;
00226         zsytrs_("/", &c__0, &c__0, a, &c__1, ip, b, &c__1, &info);
00227         chkxer_("ZSYTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00228                 infoc_1.ok);
00229         infoc_1.infot = 2;
00230         zsytrs_("U", &c_n1, &c__0, a, &c__1, ip, b, &c__1, &info);
00231         chkxer_("ZSYTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00232                 infoc_1.ok);
00233         infoc_1.infot = 3;
00234         zsytrs_("U", &c__0, &c_n1, a, &c__1, ip, b, &c__1, &info);
00235         chkxer_("ZSYTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00236                 infoc_1.ok);
00237         infoc_1.infot = 5;
00238         zsytrs_("U", &c__2, &c__1, a, &c__1, ip, b, &c__2, &info);
00239         chkxer_("ZSYTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00240                 infoc_1.ok);
00241         infoc_1.infot = 8;
00242         zsytrs_("U", &c__2, &c__1, a, &c__2, ip, b, &c__1, &info);
00243         chkxer_("ZSYTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00244                 infoc_1.ok);
00245 
00246 /*        ZSYRFS */
00247 
00248         s_copy(srnamc_1.srnamt, "ZSYRFS", (ftnlen)32, (ftnlen)6);
00249         infoc_1.infot = 1;
00250         zsyrfs_("/", &c__0, &c__0, a, &c__1, af, &c__1, ip, b, &c__1, x, &
00251                 c__1, r1, r2, w, r__, &info);
00252         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00253                 infoc_1.ok);
00254         infoc_1.infot = 2;
00255         zsyrfs_("U", &c_n1, &c__0, a, &c__1, af, &c__1, ip, b, &c__1, x, &
00256                 c__1, r1, r2, w, r__, &info);
00257         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00258                 infoc_1.ok);
00259         infoc_1.infot = 3;
00260         zsyrfs_("U", &c__0, &c_n1, a, &c__1, af, &c__1, ip, b, &c__1, x, &
00261                 c__1, r1, r2, w, r__, &info);
00262         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00263                 infoc_1.ok);
00264         infoc_1.infot = 5;
00265         zsyrfs_("U", &c__2, &c__1, a, &c__1, af, &c__2, ip, b, &c__2, x, &
00266                 c__2, r1, r2, w, r__, &info);
00267         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00268                 infoc_1.ok);
00269         infoc_1.infot = 7;
00270         zsyrfs_("U", &c__2, &c__1, a, &c__2, af, &c__1, ip, b, &c__2, x, &
00271                 c__2, r1, r2, w, r__, &info);
00272         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00273                 infoc_1.ok);
00274         infoc_1.infot = 10;
00275         zsyrfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, ip, b, &c__1, x, &
00276                 c__2, r1, r2, w, r__, &info);
00277         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00278                 infoc_1.ok);
00279         infoc_1.infot = 12;
00280         zsyrfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, ip, b, &c__2, x, &
00281                 c__1, r1, r2, w, r__, &info);
00282         chkxer_("ZSYRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00283                 infoc_1.ok);
00284 
00285 /*        ZSYCON */
00286 
00287         s_copy(srnamc_1.srnamt, "ZSYCON", (ftnlen)32, (ftnlen)6);
00288         infoc_1.infot = 1;
00289         zsycon_("/", &c__0, a, &c__1, ip, &anrm, &rcond, w, &info);
00290         chkxer_("ZSYCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00291                 infoc_1.ok);
00292         infoc_1.infot = 2;
00293         zsycon_("U", &c_n1, a, &c__1, ip, &anrm, &rcond, w, &info);
00294         chkxer_("ZSYCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00295                 infoc_1.ok);
00296         infoc_1.infot = 4;
00297         zsycon_("U", &c__2, a, &c__1, ip, &anrm, &rcond, w, &info);
00298         chkxer_("ZSYCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00299                 infoc_1.ok);
00300         infoc_1.infot = 6;
00301         d__1 = -anrm;
00302         zsycon_("U", &c__1, a, &c__1, ip, &d__1, &rcond, w, &info);
00303         chkxer_("ZSYCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00304                 infoc_1.ok);
00305 
00306 /*     Test error exits of the routines that use the diagonal pivoting */
00307 /*     factorization of a symmetric indefinite packed matrix. */
00308 
00309     } else if (lsamen_(&c__2, c2, "SP")) {
00310 
00311 /*        ZSPTRF */
00312 
00313         s_copy(srnamc_1.srnamt, "ZSPTRF", (ftnlen)32, (ftnlen)6);
00314         infoc_1.infot = 1;
00315         zsptrf_("/", &c__0, a, ip, &info);
00316         chkxer_("ZSPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00317                 infoc_1.ok);
00318         infoc_1.infot = 2;
00319         zsptrf_("U", &c_n1, a, ip, &info);
00320         chkxer_("ZSPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00321                 infoc_1.ok);
00322 
00323 /*        ZSPTRI */
00324 
00325         s_copy(srnamc_1.srnamt, "ZSPTRI", (ftnlen)32, (ftnlen)6);
00326         infoc_1.infot = 1;
00327         zsptri_("/", &c__0, a, ip, w, &info);
00328         chkxer_("ZSPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00329                 infoc_1.ok);
00330         infoc_1.infot = 2;
00331         zsptri_("U", &c_n1, a, ip, w, &info);
00332         chkxer_("ZSPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00333                 infoc_1.ok);
00334 
00335 /*        ZSPTRS */
00336 
00337         s_copy(srnamc_1.srnamt, "ZSPTRS", (ftnlen)32, (ftnlen)6);
00338         infoc_1.infot = 1;
00339         zsptrs_("/", &c__0, &c__0, a, ip, b, &c__1, &info);
00340         chkxer_("ZSPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00341                 infoc_1.ok);
00342         infoc_1.infot = 2;
00343         zsptrs_("U", &c_n1, &c__0, a, ip, b, &c__1, &info);
00344         chkxer_("ZSPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00345                 infoc_1.ok);
00346         infoc_1.infot = 3;
00347         zsptrs_("U", &c__0, &c_n1, a, ip, b, &c__1, &info);
00348         chkxer_("ZSPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00349                 infoc_1.ok);
00350         infoc_1.infot = 7;
00351         zsptrs_("U", &c__2, &c__1, a, ip, b, &c__1, &info);
00352         chkxer_("ZSPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00353                 infoc_1.ok);
00354 
00355 /*        ZSPRFS */
00356 
00357         s_copy(srnamc_1.srnamt, "ZSPRFS", (ftnlen)32, (ftnlen)6);
00358         infoc_1.infot = 1;
00359         zsprfs_("/", &c__0, &c__0, a, af, ip, b, &c__1, x, &c__1, r1, r2, w, 
00360                 r__, &info);
00361         chkxer_("ZSPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00362                 infoc_1.ok);
00363         infoc_1.infot = 2;
00364         zsprfs_("U", &c_n1, &c__0, a, af, ip, b, &c__1, x, &c__1, r1, r2, w, 
00365                 r__, &info);
00366         chkxer_("ZSPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00367                 infoc_1.ok);
00368         infoc_1.infot = 3;
00369         zsprfs_("U", &c__0, &c_n1, a, af, ip, b, &c__1, x, &c__1, r1, r2, w, 
00370                 r__, &info);
00371         chkxer_("ZSPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00372                 infoc_1.ok);
00373         infoc_1.infot = 8;
00374         zsprfs_("U", &c__2, &c__1, a, af, ip, b, &c__1, x, &c__2, r1, r2, w, 
00375                 r__, &info);
00376         chkxer_("ZSPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00377                 infoc_1.ok);
00378         infoc_1.infot = 10;
00379         zsprfs_("U", &c__2, &c__1, a, af, ip, b, &c__2, x, &c__1, r1, r2, w, 
00380                 r__, &info);
00381         chkxer_("ZSPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00382                 infoc_1.ok);
00383 
00384 /*        ZSPCON */
00385 
00386         s_copy(srnamc_1.srnamt, "ZSPCON", (ftnlen)32, (ftnlen)6);
00387         infoc_1.infot = 1;
00388         zspcon_("/", &c__0, a, ip, &anrm, &rcond, w, &info);
00389         chkxer_("ZSPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00390                 infoc_1.ok);
00391         infoc_1.infot = 2;
00392         zspcon_("U", &c_n1, a, ip, &anrm, &rcond, w, &info);
00393         chkxer_("ZSPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00394                 infoc_1.ok);
00395         infoc_1.infot = 5;
00396         d__1 = -anrm;
00397         zspcon_("U", &c__1, a, ip, &d__1, &rcond, w, &info);
00398         chkxer_("ZSPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00399                 infoc_1.ok);
00400     }
00401 
00402 /*     Print a summary line. */
00403 
00404     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00405 
00406     return 0;
00407 
00408 /*     End of ZERRSY */
00409 
00410 } /* zerrsy_ */


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