cerrls.c
Go to the documentation of this file.
00001 /* cerrls.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__10 = 10;
00038 static integer c__3 = 3;
00039 
00040 /* Subroutine */ int cerrls_(char *path, integer *nunit)
00041 {
00042     /* Builtin functions */
00043     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00044     integer s_wsle(cilist *), e_wsle(void);
00045 
00046     /* Local variables */
00047     complex a[4]        /* was [2][2] */, b[4]  /* was [2][2] */;
00048     real s[2];
00049     complex w[2];
00050     char c2[2];
00051     integer ip[2];
00052     real rw[2];
00053     integer info, irnk;
00054     extern /* Subroutine */ int cgels_(char *, integer *, integer *, integer *
00055 , complex *, integer *, complex *, integer *, complex *, integer *
00056 , integer *);
00057     real rcond;
00058     extern /* Subroutine */ int cgelsd_(integer *, integer *, integer *, 
00059             complex *, integer *, complex *, integer *, real *, real *, 
00060             integer *, complex *, integer *, real *, integer *, integer *), 
00061             alaesm_(char *, logical *, integer *);
00062     extern logical lsamen_(integer *, char *, char *);
00063     extern /* Subroutine */ int cgelss_(integer *, integer *, integer *, 
00064             complex *, integer *, complex *, integer *, real *, real *, 
00065             integer *, complex *, integer *, real *, integer *), chkxer_(char 
00066             *, integer *, integer *, logical *, logical *), cgelsx_(
00067             integer *, integer *, integer *, complex *, integer *, complex *, 
00068             integer *, integer *, real *, integer *, complex *, real *, 
00069             integer *), cgelsy_(integer *, integer *, integer *, complex *, 
00070             integer *, complex *, integer *, integer *, real *, integer *, 
00071             complex *, integer *, real *, integer *);
00072 
00073     /* Fortran I/O blocks */
00074     static cilist io___3 = { 0, 0, 0, 0, 0 };
00075 
00076 
00077 
00078 /*  -- LAPACK test routine (version 3.1) -- */
00079 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00080 /*     November 2006 */
00081 
00082 /*     .. Scalar Arguments .. */
00083 /*     .. */
00084 
00085 /*  Purpose */
00086 /*  ======= */
00087 
00088 /*  CERRLS tests the error exits for the COMPLEX least squares */
00089 /*  driver routines (CGELS, CGELSS, CGELSX, CGELSY, CGELSD). */
00090 
00091 /*  Arguments */
00092 /*  ========= */
00093 
00094 /*  PATH    (input) CHARACTER*3 */
00095 /*          The LAPACK path name for the routines to be tested. */
00096 
00097 /*  NUNIT   (input) INTEGER */
00098 /*          The unit number for output. */
00099 
00100 /*  ===================================================================== */
00101 
00102 /*     .. Parameters .. */
00103 /*     .. */
00104 /*     .. Local Scalars .. */
00105 /*     .. */
00106 /*     .. Local Arrays .. */
00107 /*     .. */
00108 /*     .. External Functions .. */
00109 /*     .. */
00110 /*     .. External Subroutines .. */
00111 /*     .. */
00112 /*     .. Scalars in Common .. */
00113 /*     .. */
00114 /*     .. Common blocks .. */
00115 /*     .. */
00116 /*     .. Executable Statements .. */
00117 
00118     infoc_1.nout = *nunit;
00119     s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00120     a[0].r = 1.f, a[0].i = 0.f;
00121     a[2].r = 2.f, a[2].i = 0.f;
00122     a[3].r = 3.f, a[3].i = 0.f;
00123     a[1].r = 4.f, a[1].i = 0.f;
00124     infoc_1.ok = TRUE_;
00125     io___3.ciunit = infoc_1.nout;
00126     s_wsle(&io___3);
00127     e_wsle();
00128 
00129 /*     Test error exits for the least squares driver routines. */
00130 
00131     if (lsamen_(&c__2, c2, "LS")) {
00132 
00133 /*        CGELS */
00134 
00135         s_copy(srnamc_1.srnamt, "CGELS ", (ftnlen)32, (ftnlen)6);
00136         infoc_1.infot = 1;
00137         cgels_("/", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, w, &c__1, &info);
00138         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00139                 infoc_1.ok);
00140         infoc_1.infot = 2;
00141         cgels_("N", &c_n1, &c__0, &c__0, a, &c__1, b, &c__1, w, &c__1, &info);
00142         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00143                 infoc_1.ok);
00144         infoc_1.infot = 3;
00145         cgels_("N", &c__0, &c_n1, &c__0, a, &c__1, b, &c__1, w, &c__1, &info);
00146         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00147                 infoc_1.ok);
00148         infoc_1.infot = 4;
00149         cgels_("N", &c__0, &c__0, &c_n1, a, &c__1, b, &c__1, w, &c__1, &info);
00150         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00151                 infoc_1.ok);
00152         infoc_1.infot = 6;
00153         cgels_("N", &c__2, &c__0, &c__0, a, &c__1, b, &c__2, w, &c__2, &info);
00154         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00155                 infoc_1.ok);
00156         infoc_1.infot = 8;
00157         cgels_("N", &c__2, &c__0, &c__0, a, &c__2, b, &c__1, w, &c__2, &info);
00158         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00159                 infoc_1.ok);
00160         infoc_1.infot = 10;
00161         cgels_("N", &c__1, &c__1, &c__0, a, &c__1, b, &c__1, w, &c__1, &info);
00162         chkxer_("CGELS ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00163                 infoc_1.ok);
00164 
00165 /*        CGELSS */
00166 
00167         s_copy(srnamc_1.srnamt, "CGELSS", (ftnlen)32, (ftnlen)6);
00168         infoc_1.infot = 1;
00169         cgelss_(&c_n1, &c__0, &c__0, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00170                 &c__1, rw, &info);
00171         chkxer_("CGELSS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00172                 infoc_1.ok);
00173         infoc_1.infot = 2;
00174         cgelss_(&c__0, &c_n1, &c__0, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00175                 &c__1, rw, &info);
00176         chkxer_("CGELSS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00177                 infoc_1.ok);
00178         infoc_1.infot = 3;
00179         cgelss_(&c__0, &c__0, &c_n1, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00180                 &c__1, rw, &info);
00181         chkxer_("CGELSS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00182                 infoc_1.ok);
00183         infoc_1.infot = 5;
00184         cgelss_(&c__2, &c__0, &c__0, a, &c__1, b, &c__2, s, &rcond, &irnk, w, 
00185                 &c__2, rw, &info);
00186         chkxer_("CGELSS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00187                 infoc_1.ok);
00188         infoc_1.infot = 7;
00189         cgelss_(&c__2, &c__0, &c__0, a, &c__2, b, &c__1, s, &rcond, &irnk, w, 
00190                 &c__2, rw, &info);
00191         chkxer_("CGELSS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00192                 infoc_1.ok);
00193 
00194 /*        CGELSX */
00195 
00196         s_copy(srnamc_1.srnamt, "CGELSX", (ftnlen)32, (ftnlen)6);
00197         infoc_1.infot = 1;
00198         cgelsx_(&c_n1, &c__0, &c__0, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00199                  rw, &info);
00200         chkxer_("CGELSX", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00201                 infoc_1.ok);
00202         infoc_1.infot = 2;
00203         cgelsx_(&c__0, &c_n1, &c__0, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00204                  rw, &info);
00205         chkxer_("CGELSX", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00206                 infoc_1.ok);
00207         infoc_1.infot = 3;
00208         cgelsx_(&c__0, &c__0, &c_n1, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00209                  rw, &info);
00210         chkxer_("CGELSX", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00211                 infoc_1.ok);
00212         infoc_1.infot = 5;
00213         cgelsx_(&c__2, &c__0, &c__0, a, &c__1, b, &c__2, ip, &rcond, &irnk, w, 
00214                  rw, &info);
00215         chkxer_("CGELSX", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00216                 infoc_1.ok);
00217         infoc_1.infot = 7;
00218         cgelsx_(&c__2, &c__0, &c__0, a, &c__2, b, &c__1, ip, &rcond, &irnk, w, 
00219                  rw, &info);
00220         chkxer_("CGELSX", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00221                 infoc_1.ok);
00222 
00223 /*        CGELSY */
00224 
00225         s_copy(srnamc_1.srnamt, "CGELSY", (ftnlen)32, (ftnlen)6);
00226         infoc_1.infot = 1;
00227         cgelsy_(&c_n1, &c__0, &c__0, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00228                  &c__10, rw, &info);
00229         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00230                 infoc_1.ok);
00231         infoc_1.infot = 2;
00232         cgelsy_(&c__0, &c_n1, &c__0, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00233                  &c__10, rw, &info);
00234         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00235                 infoc_1.ok);
00236         infoc_1.infot = 3;
00237         cgelsy_(&c__0, &c__0, &c_n1, a, &c__1, b, &c__1, ip, &rcond, &irnk, w, 
00238                  &c__10, rw, &info);
00239         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00240                 infoc_1.ok);
00241         infoc_1.infot = 5;
00242         cgelsy_(&c__2, &c__0, &c__0, a, &c__1, b, &c__2, ip, &rcond, &irnk, w, 
00243                  &c__10, rw, &info);
00244         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00245                 infoc_1.ok);
00246         infoc_1.infot = 7;
00247         cgelsy_(&c__2, &c__0, &c__0, a, &c__2, b, &c__1, ip, &rcond, &irnk, w, 
00248                  &c__10, rw, &info);
00249         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00250                 infoc_1.ok);
00251         infoc_1.infot = 12;
00252         cgelsy_(&c__0, &c__3, &c__0, a, &c__1, b, &c__3, ip, &rcond, &irnk, w, 
00253                  &c__1, rw, &info);
00254         chkxer_("CGELSY", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00255                 infoc_1.ok);
00256 
00257 /*        CGELSD */
00258 
00259         s_copy(srnamc_1.srnamt, "CGELSD", (ftnlen)32, (ftnlen)6);
00260         infoc_1.infot = 1;
00261         cgelsd_(&c_n1, &c__0, &c__0, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00262                 &c__10, rw, ip, &info);
00263         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00264                 infoc_1.ok);
00265         infoc_1.infot = 2;
00266         cgelsd_(&c__0, &c_n1, &c__0, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00267                 &c__10, rw, ip, &info);
00268         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00269                 infoc_1.ok);
00270         infoc_1.infot = 3;
00271         cgelsd_(&c__0, &c__0, &c_n1, a, &c__1, b, &c__1, s, &rcond, &irnk, w, 
00272                 &c__10, rw, ip, &info);
00273         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00274                 infoc_1.ok);
00275         infoc_1.infot = 5;
00276         cgelsd_(&c__2, &c__0, &c__0, a, &c__1, b, &c__2, s, &rcond, &irnk, w, 
00277                 &c__10, rw, ip, &info);
00278         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00279                 infoc_1.ok);
00280         infoc_1.infot = 7;
00281         cgelsd_(&c__2, &c__0, &c__0, a, &c__2, b, &c__1, s, &rcond, &irnk, w, 
00282                 &c__10, rw, ip, &info);
00283         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00284                 infoc_1.ok);
00285         infoc_1.infot = 12;
00286         cgelsd_(&c__2, &c__2, &c__1, a, &c__2, b, &c__2, s, &rcond, &irnk, w, 
00287                 &c__1, rw, ip, &info);
00288         chkxer_("CGELSD", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00289                 infoc_1.ok);
00290     }
00291 
00292 /*     Print a summary line. */
00293 
00294     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00295 
00296     return 0;
00297 
00298 /*     End of CERRLS */
00299 
00300 } /* cerrls_ */


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