derrqp.c
Go to the documentation of this file.
00001 /* derrqp.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_n1 = -1;
00035 static integer c__0 = 0;
00036 static integer c__1 = 1;
00037 static integer c__3 = 3;
00038 
00039 /* Subroutine */ int derrqp_(char *path, integer *nunit)
00040 {
00041     /* System generated locals */
00042     integer i__1;
00043 
00044     /* Builtin functions */
00045     integer s_wsle(cilist *), e_wsle(void);
00046     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00047 
00048     /* Local variables */
00049     doublereal a[9]     /* was [3][3] */, w[10];
00050     char c2[2];
00051     integer ip[3], lw;
00052     doublereal tau[3];
00053     integer info;
00054     extern /* Subroutine */ int dgeqp3_(integer *, integer *, doublereal *, 
00055             integer *, integer *, doublereal *, doublereal *, integer *, 
00056             integer *), alaesm_(char *, logical *, integer *), 
00057             dgeqpf_(integer *, integer *, doublereal *, integer *, integer *, 
00058             doublereal *, doublereal *, integer *);
00059     extern logical lsamen_(integer *, char *, char *);
00060     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00061             *, logical *);
00062 
00063     /* Fortran I/O blocks */
00064     static cilist io___1 = { 0, 0, 0, 0, 0 };
00065 
00066 
00067 
00068 /*  -- LAPACK test routine (version 3.1) -- */
00069 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00070 /*     November 2006 */
00071 
00072 /*     .. Scalar Arguments .. */
00073 /*     .. */
00074 
00075 /*  Purpose */
00076 /*  ======= */
00077 
00078 /*  DERRQP tests the error exits for DGEQPF and DGEQP3. */
00079 
00080 /*  Arguments */
00081 /*  ========= */
00082 
00083 /*  PATH    (input) CHARACTER*3 */
00084 /*          The LAPACK path name for the routines to be tested. */
00085 
00086 /*  NUNIT   (input) INTEGER */
00087 /*          The unit number for output. */
00088 
00089 /*  ===================================================================== */
00090 
00091 /*     .. Parameters .. */
00092 /*     .. */
00093 /*     .. Local Scalars .. */
00094 /*     .. */
00095 /*     .. Local Arrays .. */
00096 /*     .. */
00097 /*     .. External Functions .. */
00098 /*     .. */
00099 /*     .. External Subroutines .. */
00100 /*     .. */
00101 /*     .. Scalars in Common .. */
00102 /*     .. */
00103 /*     .. Common blocks .. */
00104 /*     .. */
00105 /*     .. Executable Statements .. */
00106 
00107     infoc_1.nout = *nunit;
00108     io___1.ciunit = infoc_1.nout;
00109     s_wsle(&io___1);
00110     e_wsle();
00111     s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00112     lw = 10;
00113     a[0] = 1.;
00114     a[3] = 2.;
00115     a[4] = 3.;
00116     a[1] = 4.;
00117     infoc_1.ok = TRUE_;
00118 
00119     if (lsamen_(&c__2, c2, "QP")) {
00120 
00121 /*        Test error exits for QR factorization with pivoting */
00122 
00123 /*        DGEQPF */
00124 
00125         s_copy(srnamc_1.srnamt, "DGEQPF", (ftnlen)32, (ftnlen)6);
00126         infoc_1.infot = 1;
00127         dgeqpf_(&c_n1, &c__0, a, &c__1, ip, tau, w, &info);
00128         chkxer_("DGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00129                 infoc_1.ok);
00130         infoc_1.infot = 2;
00131         dgeqpf_(&c__0, &c_n1, a, &c__1, ip, tau, w, &info);
00132         chkxer_("DGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00133                 infoc_1.ok);
00134         infoc_1.infot = 4;
00135         dgeqpf_(&c__2, &c__0, a, &c__1, ip, tau, w, &info);
00136         chkxer_("DGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00137                 infoc_1.ok);
00138 
00139 /*        DGEQP3 */
00140 
00141         s_copy(srnamc_1.srnamt, "DGEQP3", (ftnlen)32, (ftnlen)6);
00142         infoc_1.infot = 1;
00143         dgeqp3_(&c_n1, &c__0, a, &c__1, ip, tau, w, &lw, &info);
00144         chkxer_("DGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00145                 infoc_1.ok);
00146         infoc_1.infot = 2;
00147         dgeqp3_(&c__1, &c_n1, a, &c__1, ip, tau, w, &lw, &info);
00148         chkxer_("DGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00149                 infoc_1.ok);
00150         infoc_1.infot = 4;
00151         dgeqp3_(&c__2, &c__3, a, &c__1, ip, tau, w, &lw, &info);
00152         chkxer_("DGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00153                 infoc_1.ok);
00154         infoc_1.infot = 8;
00155         i__1 = lw - 10;
00156         dgeqp3_(&c__2, &c__2, a, &c__2, ip, tau, w, &i__1, &info);
00157         chkxer_("DGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00158                 infoc_1.ok);
00159     }
00160 
00161 /*     Print a summary line. */
00162 
00163     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00164 
00165     return 0;
00166 
00167 /*     End of DERRQP */
00168 
00169 } /* derrqp_ */


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