ddrvvx.c
Go to the documentation of this file.
00001 /* ddrvvx.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 /* Table of constant values */
00017 
00018 static doublereal c_b18 = 0.;
00019 static integer c__0 = 0;
00020 static doublereal c_b32 = 1.;
00021 static integer c__4 = 4;
00022 static integer c__6 = 6;
00023 static integer c__1 = 1;
00024 static integer c__2 = 2;
00025 static logical c_false = FALSE_;
00026 static integer c__3 = 3;
00027 static integer c__5 = 5;
00028 static logical c_true = TRUE_;
00029 static integer c__22 = 22;
00030 
00031 /* Subroutine */ int ddrvvx_(integer *nsizes, integer *nn, integer *ntypes, 
00032         logical *dotype, integer *iseed, doublereal *thresh, integer *niunit, 
00033         integer *nounit, doublereal *a, integer *lda, doublereal *h__, 
00034         doublereal *wr, doublereal *wi, doublereal *wr1, doublereal *wi1, 
00035         doublereal *vl, integer *ldvl, doublereal *vr, integer *ldvr, 
00036         doublereal *lre, integer *ldlre, doublereal *rcondv, doublereal *
00037         rcndv1, doublereal *rcdvin, doublereal *rconde, doublereal *rcnde1, 
00038         doublereal *rcdein, doublereal *scale, doublereal *scale1, doublereal 
00039         *result, doublereal *work, integer *nwork, integer *iwork, integer *
00040         info)
00041 {
00042     /* Initialized data */
00043 
00044     static integer ktype[21] = { 1,2,3,4,4,4,4,4,6,6,6,6,6,6,6,6,6,6,9,9,9 };
00045     static integer kmagn[21] = { 1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,2,3,1,2,3 };
00046     static integer kmode[21] = { 0,0,0,4,3,1,4,4,4,3,1,5,4,3,1,5,5,5,4,3,1 };
00047     static integer kconds[21] = { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,2,2,0,0,0 };
00048     static char bal[1*4] = "N" "P" "S" "B";
00049 
00050     /* Format strings */
00051     static char fmt_9992[] = "(\002 DDRVVX: \002,a,\002 returned INFO=\002,i"
00052             "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00053             "(\002,3(i5,\002,\002),i5,\002)\002)";
00054     static char fmt_9999[] = "(/1x,a3,\002 -- Real Eigenvalue-Eigenvector De"
00055             "composition\002,\002 Expert Driver\002,/\002 Matrix types (see D"
00056             "DRVVX for details): \002)";
00057     static char fmt_9998[] = "(/\002 Special Matrices:\002,/\002  1=Zero mat"
00058             "rix.             \002,\002           \002,\002  5=Diagonal: geom"
00059             "etr. spaced entries.\002,/\002  2=Identity matrix.              "
00060             "      \002,\002  6=Diagona\002,\002l: clustered entries.\002,"
00061             "/\002  3=Transposed Jordan block.  \002,\002          \002,\002 "
00062             " 7=Diagonal: large, evenly spaced.\002,/\002  \002,\0024=Diagona"
00063             "l: evenly spaced entries.    \002,\002  8=Diagonal: s\002,\002ma"
00064             "ll, evenly spaced.\002)";
00065     static char fmt_9997[] = "(\002 Dense, Non-Symmetric Matrices:\002,/\002"
00066             "  9=Well-cond., ev\002,\002enly spaced eigenvals.\002,\002 14=Il"
00067             "l-cond., geomet. spaced e\002,\002igenals.\002,/\002 10=Well-con"
00068             "d., geom. spaced eigenvals. \002,\002 15=Ill-conditioned, cluste"
00069             "red e.vals.\002,/\002 11=Well-cond\002,\002itioned, clustered e."
00070             "vals. \002,\002 16=Ill-cond., random comp\002,\002lex \002,/\002"
00071             " 12=Well-cond., random complex \002,\002         \002,\002 17=Il"
00072             "l-cond., large rand. complx \002,/\002 13=Ill-condi\002,\002tion"
00073             "ed, evenly spaced.     \002,\002 18=Ill-cond., small rand.\002"
00074             ",\002 complx \002)";
00075     static char fmt_9996[] = "(\002 19=Matrix with random O(1) entries.   "
00076             " \002,\002 21=Matrix \002,\002with small random entries.\002,"
00077             "/\002 20=Matrix with large ran\002,\002dom entries.   \002,\002 "
00078             "22=Matrix read from input file\002,/)";
00079     static char fmt_9995[] = "(\002 Tests performed with test threshold ="
00080             "\002,f8.2,//\002 1 = | A VR - VR W | / ( n |A| ulp ) \002,/\002 "
00081             "2 = | transpose(A) VL - VL W | / ( n |A| ulp ) \002,/\002 3 = | "
00082             "|VR(i)| - 1 | / ulp \002,/\002 4 = | |VL(i)| - 1 | / ulp \002,"
00083             "/\002 5 = 0 if W same no matter if VR or VL computed,\002,\002 1"
00084             "/ulp otherwise\002,/\002 6 = 0 if VR same no matter what else co"
00085             "mputed,\002,\002  1/ulp otherwise\002,/\002 7 = 0 if VL same no "
00086             "matter what else computed,\002,\002  1/ulp otherwise\002,/\002 8"
00087             " = 0 if RCONDV same no matter what else computed,\002,\002  1/ul"
00088             "p otherwise\002,/\002 9 = 0 if SCALE, ILO, IHI, ABNRM same no ma"
00089             "tter what else\002,\002 computed,  1/ulp otherwise\002,/\002 10 "
00090             "= | RCONDV - RCONDV(precomputed) | / cond(RCONDV),\002,/\002 11 "
00091             "= | RCONDE - RCONDE(precomputed) | / cond(RCONDE),\002)";
00092     static char fmt_9994[] = "(\002 BALANC='\002,a1,\002',N=\002,i4,\002,I"
00093             "WK=\002,i1,\002, seed=\002,4(i4,\002,\002),\002 type \002,i2,"
00094             "\002, test(\002,i2,\002)=\002,g10.3)";
00095     static char fmt_9993[] = "(\002 N=\002,i5,\002, input example =\002,i3"
00096             ",\002,  test(\002,i2,\002)=\002,g10.3)";
00097 
00098     /* System generated locals */
00099     integer a_dim1, a_offset, h_dim1, h_offset, lre_dim1, lre_offset, vl_dim1,
00100              vl_offset, vr_dim1, vr_offset, i__1, i__2, i__3;
00101 
00102     /* Builtin functions */
00103     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00104     double sqrt(doublereal);
00105     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void),
00106              s_rsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00107             e_rsle(void);
00108 
00109     /* Local variables */
00110     integer i__, j, n, iwk;
00111     doublereal ulp;
00112     integer ibal;
00113     doublereal cond;
00114     integer jcol;
00115     char path[3];
00116     integer nmax;
00117     doublereal unfl, ovfl;
00118     logical badnn;
00119     extern /* Subroutine */ int dget23_(logical *, char *, integer *, 
00120             doublereal *, integer *, integer *, integer *, doublereal *, 
00121             integer *, doublereal *, doublereal *, doublereal *, doublereal *, 
00122              doublereal *, doublereal *, integer *, doublereal *, integer *, 
00123             doublereal *, integer *, doublereal *, doublereal *, doublereal *, 
00124              doublereal *, doublereal *, doublereal *, doublereal *, 
00125             doublereal *, doublereal *, doublereal *, integer *, integer *, 
00126             integer *);
00127     integer nfail, imode, iinfo;
00128     doublereal conds, anorm;
00129     integer jsize, nerrs, itype, jtype, ntest;
00130     doublereal rtulp;
00131     extern /* Subroutine */ int dlabad_(doublereal *, doublereal *);
00132     char balanc[1];
00133     extern doublereal dlamch_(char *);
00134     char adumma[1*1];
00135     extern /* Subroutine */ int dlatme_(integer *, char *, integer *, 
00136             doublereal *, integer *, doublereal *, doublereal *, char *, char 
00137             *, char *, char *, doublereal *, integer *, doublereal *, integer 
00138             *, integer *, doublereal *, doublereal *, integer *, doublereal *, 
00139              integer *);
00140     integer idumma[1];
00141     extern /* Subroutine */ int dlaset_(char *, integer *, integer *, 
00142             doublereal *, doublereal *, doublereal *, integer *);
00143     integer ioldsd[4];
00144     extern /* Subroutine */ int xerbla_(char *, integer *), dlatmr_(
00145             integer *, integer *, char *, integer *, char *, doublereal *, 
00146             integer *, doublereal *, doublereal *, char *, char *, doublereal 
00147             *, integer *, doublereal *, doublereal *, integer *, doublereal *, 
00148              char *, integer *, integer *, integer *, doublereal *, 
00149             doublereal *, char *, doublereal *, integer *, integer *, integer 
00150             *), dlatms_(
00151             integer *, integer *, char *, integer *, char *, doublereal *, 
00152             integer *, doublereal *, doublereal *, integer *, integer *, char 
00153             *, doublereal *, integer *, doublereal *, integer *), dlasum_(char *, integer *, integer *, integer *);
00154     integer ntestf, nnwork;
00155     doublereal rtulpi;
00156     integer mtypes, ntestt;
00157     doublereal ulpinv;
00158 
00159     /* Fortran I/O blocks */
00160     static cilist io___33 = { 0, 0, 0, fmt_9992, 0 };
00161     static cilist io___40 = { 0, 0, 0, fmt_9999, 0 };
00162     static cilist io___41 = { 0, 0, 0, fmt_9998, 0 };
00163     static cilist io___42 = { 0, 0, 0, fmt_9997, 0 };
00164     static cilist io___43 = { 0, 0, 0, fmt_9996, 0 };
00165     static cilist io___44 = { 0, 0, 0, fmt_9995, 0 };
00166     static cilist io___45 = { 0, 0, 0, fmt_9994, 0 };
00167     static cilist io___46 = { 0, 0, 1, 0, 0 };
00168     static cilist io___48 = { 0, 0, 0, 0, 0 };
00169     static cilist io___49 = { 0, 0, 0, 0, 0 };
00170     static cilist io___50 = { 0, 0, 0, fmt_9999, 0 };
00171     static cilist io___51 = { 0, 0, 0, fmt_9998, 0 };
00172     static cilist io___52 = { 0, 0, 0, fmt_9997, 0 };
00173     static cilist io___53 = { 0, 0, 0, fmt_9996, 0 };
00174     static cilist io___54 = { 0, 0, 0, fmt_9995, 0 };
00175     static cilist io___55 = { 0, 0, 0, fmt_9993, 0 };
00176 
00177 
00178 
00179 /*  -- LAPACK test routine (version 3.1) -- */
00180 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00181 /*     November 2006 */
00182 
00183 /*     .. Scalar Arguments .. */
00184 /*     .. */
00185 /*     .. Array Arguments .. */
00186 /*     .. */
00187 
00188 /*  Purpose */
00189 /*  ======= */
00190 
00191 /*     DDRVVX  checks the nonsymmetric eigenvalue problem expert driver */
00192 /*     DGEEVX. */
00193 
00194 /*     DDRVVX uses both test matrices generated randomly depending on */
00195 /*     data supplied in the calling sequence, as well as on data */
00196 /*     read from an input file and including precomputed condition */
00197 /*     numbers to which it compares the ones it computes. */
00198 
00199 /*     When DDRVVX is called, a number of matrix "sizes" ("n's") and a */
00200 /*     number of matrix "types" are specified in the calling sequence. */
00201 /*     For each size ("n") and each type of matrix, one matrix will be */
00202 /*     generated and used to test the nonsymmetric eigenroutines.  For */
00203 /*     each matrix, 9 tests will be performed: */
00204 
00205 /*     (1)     | A * VR - VR * W | / ( n |A| ulp ) */
00206 
00207 /*       Here VR is the matrix of unit right eigenvectors. */
00208 /*       W is a block diagonal matrix, with a 1x1 block for each */
00209 /*       real eigenvalue and a 2x2 block for each complex conjugate */
00210 /*       pair.  If eigenvalues j and j+1 are a complex conjugate pair, */
00211 /*       so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the */
00212 /*       2 x 2 block corresponding to the pair will be: */
00213 
00214 /*               (  wr  wi  ) */
00215 /*               ( -wi  wr  ) */
00216 
00217 /*       Such a block multiplying an n x 2 matrix  ( ur ui ) on the */
00218 /*       right will be the same as multiplying  ur + i*ui  by  wr + i*wi. */
00219 
00220 /*     (2)     | A**H * VL - VL * W**H | / ( n |A| ulp ) */
00221 
00222 /*       Here VL is the matrix of unit left eigenvectors, A**H is the */
00223 /*       conjugate transpose of A, and W is as above. */
00224 
00225 /*     (3)     | |VR(i)| - 1 | / ulp and largest component real */
00226 
00227 /*       VR(i) denotes the i-th column of VR. */
00228 
00229 /*     (4)     | |VL(i)| - 1 | / ulp and largest component real */
00230 
00231 /*       VL(i) denotes the i-th column of VL. */
00232 
00233 /*     (5)     W(full) = W(partial) */
00234 
00235 /*       W(full) denotes the eigenvalues computed when VR, VL, RCONDV */
00236 /*       and RCONDE are also computed, and W(partial) denotes the */
00237 /*       eigenvalues computed when only some of VR, VL, RCONDV, and */
00238 /*       RCONDE are computed. */
00239 
00240 /*     (6)     VR(full) = VR(partial) */
00241 
00242 /*       VR(full) denotes the right eigenvectors computed when VL, RCONDV */
00243 /*       and RCONDE are computed, and VR(partial) denotes the result */
00244 /*       when only some of VL and RCONDV are computed. */
00245 
00246 /*     (7)     VL(full) = VL(partial) */
00247 
00248 /*       VL(full) denotes the left eigenvectors computed when VR, RCONDV */
00249 /*       and RCONDE are computed, and VL(partial) denotes the result */
00250 /*       when only some of VR and RCONDV are computed. */
00251 
00252 /*     (8)     0 if SCALE, ILO, IHI, ABNRM (full) = */
00253 /*                  SCALE, ILO, IHI, ABNRM (partial) */
00254 /*             1/ulp otherwise */
00255 
00256 /*       SCALE, ILO, IHI and ABNRM describe how the matrix is balanced. */
00257 /*       (full) is when VR, VL, RCONDE and RCONDV are also computed, and */
00258 /*       (partial) is when some are not computed. */
00259 
00260 /*     (9)     RCONDV(full) = RCONDV(partial) */
00261 
00262 /*       RCONDV(full) denotes the reciprocal condition numbers of the */
00263 /*       right eigenvectors computed when VR, VL and RCONDE are also */
00264 /*       computed. RCONDV(partial) denotes the reciprocal condition */
00265 /*       numbers when only some of VR, VL and RCONDE are computed. */
00266 
00267 /*     The "sizes" are specified by an array NN(1:NSIZES); the value of */
00268 /*     each element NN(j) specifies one size. */
00269 /*     The "types" are specified by a logical array DOTYPE( 1:NTYPES ); */
00270 /*     if DOTYPE(j) is .TRUE., then matrix type "j" will be generated. */
00271 /*     Currently, the list of possible types is: */
00272 
00273 /*     (1)  The zero matrix. */
00274 /*     (2)  The identity matrix. */
00275 /*     (3)  A (transposed) Jordan block, with 1's on the diagonal. */
00276 
00277 /*     (4)  A diagonal matrix with evenly spaced entries */
00278 /*          1, ..., ULP  and random signs. */
00279 /*          (ULP = (first number larger than 1) - 1 ) */
00280 /*     (5)  A diagonal matrix with geometrically spaced entries */
00281 /*          1, ..., ULP  and random signs. */
00282 /*     (6)  A diagonal matrix with "clustered" entries 1, ULP, ..., ULP */
00283 /*          and random signs. */
00284 
00285 /*     (7)  Same as (4), but multiplied by a constant near */
00286 /*          the overflow threshold */
00287 /*     (8)  Same as (4), but multiplied by a constant near */
00288 /*          the underflow threshold */
00289 
00290 /*     (9)  A matrix of the form  U' T U, where U is orthogonal and */
00291 /*          T has evenly spaced entries 1, ..., ULP with random signs */
00292 /*          on the diagonal and random O(1) entries in the upper */
00293 /*          triangle. */
00294 
00295 /*     (10) A matrix of the form  U' T U, where U is orthogonal and */
00296 /*          T has geometrically spaced entries 1, ..., ULP with random */
00297 /*          signs on the diagonal and random O(1) entries in the upper */
00298 /*          triangle. */
00299 
00300 /*     (11) A matrix of the form  U' T U, where U is orthogonal and */
00301 /*          T has "clustered" entries 1, ULP,..., ULP with random */
00302 /*          signs on the diagonal and random O(1) entries in the upper */
00303 /*          triangle. */
00304 
00305 /*     (12) A matrix of the form  U' T U, where U is orthogonal and */
00306 /*          T has real or complex conjugate paired eigenvalues randomly */
00307 /*          chosen from ( ULP, 1 ) and random O(1) entries in the upper */
00308 /*          triangle. */
00309 
00310 /*     (13) A matrix of the form  X' T X, where X has condition */
00311 /*          SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP */
00312 /*          with random signs on the diagonal and random O(1) entries */
00313 /*          in the upper triangle. */
00314 
00315 /*     (14) A matrix of the form  X' T X, where X has condition */
00316 /*          SQRT( ULP ) and T has geometrically spaced entries */
00317 /*          1, ..., ULP with random signs on the diagonal and random */
00318 /*          O(1) entries in the upper triangle. */
00319 
00320 /*     (15) A matrix of the form  X' T X, where X has condition */
00321 /*          SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP */
00322 /*          with random signs on the diagonal and random O(1) entries */
00323 /*          in the upper triangle. */
00324 
00325 /*     (16) A matrix of the form  X' T X, where X has condition */
00326 /*          SQRT( ULP ) and T has real or complex conjugate paired */
00327 /*          eigenvalues randomly chosen from ( ULP, 1 ) and random */
00328 /*          O(1) entries in the upper triangle. */
00329 
00330 /*     (17) Same as (16), but multiplied by a constant */
00331 /*          near the overflow threshold */
00332 /*     (18) Same as (16), but multiplied by a constant */
00333 /*          near the underflow threshold */
00334 
00335 /*     (19) Nonsymmetric matrix with random entries chosen from (-1,1). */
00336 /*          If N is at least 4, all entries in first two rows and last */
00337 /*          row, and first column and last two columns are zero. */
00338 /*     (20) Same as (19), but multiplied by a constant */
00339 /*          near the overflow threshold */
00340 /*     (21) Same as (19), but multiplied by a constant */
00341 /*          near the underflow threshold */
00342 
00343 /*     In addition, an input file will be read from logical unit number */
00344 /*     NIUNIT. The file contains matrices along with precomputed */
00345 /*     eigenvalues and reciprocal condition numbers for the eigenvalues */
00346 /*     and right eigenvectors. For these matrices, in addition to tests */
00347 /*     (1) to (9) we will compute the following two tests: */
00348 
00349 /*    (10)  |RCONDV - RCDVIN| / cond(RCONDV) */
00350 
00351 /*       RCONDV is the reciprocal right eigenvector condition number */
00352 /*       computed by DGEEVX and RCDVIN (the precomputed true value) */
00353 /*       is supplied as input. cond(RCONDV) is the condition number of */
00354 /*       RCONDV, and takes errors in computing RCONDV into account, so */
00355 /*       that the resulting quantity should be O(ULP). cond(RCONDV) is */
00356 /*       essentially given by norm(A)/RCONDE. */
00357 
00358 /*    (11)  |RCONDE - RCDEIN| / cond(RCONDE) */
00359 
00360 /*       RCONDE is the reciprocal eigenvalue condition number */
00361 /*       computed by DGEEVX and RCDEIN (the precomputed true value) */
00362 /*       is supplied as input.  cond(RCONDE) is the condition number */
00363 /*       of RCONDE, and takes errors in computing RCONDE into account, */
00364 /*       so that the resulting quantity should be O(ULP). cond(RCONDE) */
00365 /*       is essentially given by norm(A)/RCONDV. */
00366 
00367 /*  Arguments */
00368 /*  ========== */
00369 
00370 /*  NSIZES  (input) INTEGER */
00371 /*          The number of sizes of matrices to use.  NSIZES must be at */
00372 /*          least zero. If it is zero, no randomly generated matrices */
00373 /*          are tested, but any test matrices read from NIUNIT will be */
00374 /*          tested. */
00375 
00376 /*  NN      (input) INTEGER array, dimension (NSIZES) */
00377 /*          An array containing the sizes to be used for the matrices. */
00378 /*          Zero values will be skipped.  The values must be at least */
00379 /*          zero. */
00380 
00381 /*  NTYPES  (input) INTEGER */
00382 /*          The number of elements in DOTYPE. NTYPES must be at least */
00383 /*          zero. If it is zero, no randomly generated test matrices */
00384 /*          are tested, but and test matrices read from NIUNIT will be */
00385 /*          tested. If it is MAXTYP+1 and NSIZES is 1, then an */
00386 /*          additional type, MAXTYP+1 is defined, which is to use */
00387 /*          whatever matrix is in A.  This is only useful if */
00388 /*          DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . */
00389 
00390 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00391 /*          If DOTYPE(j) is .TRUE., then for each size in NN a */
00392 /*          matrix of that size and of type j will be generated. */
00393 /*          If NTYPES is smaller than the maximum number of types */
00394 /*          defined (PARAMETER MAXTYP), then types NTYPES+1 through */
00395 /*          MAXTYP will not be generated.  If NTYPES is larger */
00396 /*          than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) */
00397 /*          will be ignored. */
00398 
00399 /*  ISEED   (input/output) INTEGER array, dimension (4) */
00400 /*          On entry ISEED specifies the seed of the random number */
00401 /*          generator. The array elements should be between 0 and 4095; */
00402 /*          if not they will be reduced mod 4096.  Also, ISEED(4) must */
00403 /*          be odd.  The random number generator uses a linear */
00404 /*          congruential sequence limited to small integers, and so */
00405 /*          should produce machine independent random numbers. The */
00406 /*          values of ISEED are changed on exit, and can be used in the */
00407 /*          next call to DDRVVX to continue the same random number */
00408 /*          sequence. */
00409 
00410 /*  THRESH  (input) DOUBLE PRECISION */
00411 /*          A test will count as "failed" if the "error", computed as */
00412 /*          described above, exceeds THRESH.  Note that the error */
00413 /*          is scaled to be O(1), so THRESH should be a reasonably */
00414 /*          small multiple of 1, e.g., 10 or 100.  In particular, */
00415 /*          it should not depend on the precision (single vs. double) */
00416 /*          or the size of the matrix.  It must be at least zero. */
00417 
00418 /*  NIUNIT  (input) INTEGER */
00419 /*          The FORTRAN unit number for reading in the data file of */
00420 /*          problems to solve. */
00421 
00422 /*  NOUNIT  (input) INTEGER */
00423 /*          The FORTRAN unit number for printing out error messages */
00424 /*          (e.g., if a routine returns INFO not equal to 0.) */
00425 
00426 /*  A       (workspace) DOUBLE PRECISION array, dimension */
00427 /*                      (LDA, max(NN,12)) */
00428 /*          Used to hold the matrix whose eigenvalues are to be */
00429 /*          computed.  On exit, A contains the last matrix actually used. */
00430 
00431 /*  LDA     (input) INTEGER */
00432 /*          The leading dimension of the arrays A and H. */
00433 /*          LDA >= max(NN,12), since 12 is the dimension of the largest */
00434 /*          matrix in the precomputed input file. */
00435 
00436 /*  H       (workspace) DOUBLE PRECISION array, dimension */
00437 /*                      (LDA, max(NN,12)) */
00438 /*          Another copy of the test matrix A, modified by DGEEVX. */
00439 
00440 /*  WR      (workspace) DOUBLE PRECISION array, dimension (max(NN)) */
00441 /*  WI      (workspace) DOUBLE PRECISION array, dimension (max(NN)) */
00442 /*          The real and imaginary parts of the eigenvalues of A. */
00443 /*          On exit, WR + WI*i are the eigenvalues of the matrix in A. */
00444 
00445 /*  WR1     (workspace) DOUBLE PRECISION array, dimension (max(NN,12)) */
00446 /*  WI1     (workspace) DOUBLE PRECISION array, dimension (max(NN,12)) */
00447 /*          Like WR, WI, these arrays contain the eigenvalues of A, */
00448 /*          but those computed when DGEEVX only computes a partial */
00449 /*          eigendecomposition, i.e. not the eigenvalues and left */
00450 /*          and right eigenvectors. */
00451 
00452 /*  VL      (workspace) DOUBLE PRECISION array, dimension */
00453 /*                      (LDVL, max(NN,12)) */
00454 /*          VL holds the computed left eigenvectors. */
00455 
00456 /*  LDVL    (input) INTEGER */
00457 /*          Leading dimension of VL. Must be at least max(1,max(NN,12)). */
00458 
00459 /*  VR      (workspace) DOUBLE PRECISION array, dimension */
00460 /*                      (LDVR, max(NN,12)) */
00461 /*          VR holds the computed right eigenvectors. */
00462 
00463 /*  LDVR    (input) INTEGER */
00464 /*          Leading dimension of VR. Must be at least max(1,max(NN,12)). */
00465 
00466 /*  LRE     (workspace) DOUBLE PRECISION array, dimension */
00467 /*                      (LDLRE, max(NN,12)) */
00468 /*          LRE holds the computed right or left eigenvectors. */
00469 
00470 /*  LDLRE   (input) INTEGER */
00471 /*          Leading dimension of LRE. Must be at least max(1,max(NN,12)) */
00472 
00473 /*  RCONDV  (workspace) DOUBLE PRECISION array, dimension (N) */
00474 /*          RCONDV holds the computed reciprocal condition numbers */
00475 /*          for eigenvectors. */
00476 
00477 /*  RCNDV1  (workspace) DOUBLE PRECISION array, dimension (N) */
00478 /*          RCNDV1 holds more computed reciprocal condition numbers */
00479 /*          for eigenvectors. */
00480 
00481 /*  RCDVIN  (workspace) DOUBLE PRECISION array, dimension (N) */
00482 /*          When COMP = .TRUE. RCDVIN holds the precomputed reciprocal */
00483 /*          condition numbers for eigenvectors to be compared with */
00484 /*          RCONDV. */
00485 
00486 /*  RCONDE  (workspace) DOUBLE PRECISION array, dimension (N) */
00487 /*          RCONDE holds the computed reciprocal condition numbers */
00488 /*          for eigenvalues. */
00489 
00490 /*  RCNDE1  (workspace) DOUBLE PRECISION array, dimension (N) */
00491 /*          RCNDE1 holds more computed reciprocal condition numbers */
00492 /*          for eigenvalues. */
00493 
00494 /*  RCDEIN  (workspace) DOUBLE PRECISION array, dimension (N) */
00495 /*          When COMP = .TRUE. RCDEIN holds the precomputed reciprocal */
00496 /*          condition numbers for eigenvalues to be compared with */
00497 /*          RCONDE. */
00498 
00499 /*  RESULT  (output) DOUBLE PRECISION array, dimension (11) */
00500 /*          The values computed by the seven tests described above. */
00501 /*          The values are currently limited to 1/ulp, to avoid overflow. */
00502 
00503 /*  WORK    (workspace) DOUBLE PRECISION array, dimension (NWORK) */
00504 
00505 /*  NWORK   (input) INTEGER */
00506 /*          The number of entries in WORK.  This must be at least */
00507 /*          max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) = */
00508 /*          max(    360     ,6*NN(j)+2*NN(j)**2)    for all j. */
00509 
00510 /*  IWORK   (workspace) INTEGER array, dimension (2*max(NN,12)) */
00511 
00512 /*  INFO    (output) INTEGER */
00513 /*          If 0,  then successful exit. */
00514 /*          If <0, then input paramter -INFO is incorrect. */
00515 /*          If >0, DLATMR, SLATMS, SLATME or DGET23 returned an error */
00516 /*                 code, and INFO is its absolute value. */
00517 
00518 /* ----------------------------------------------------------------------- */
00519 
00520 /*     Some Local Variables and Parameters: */
00521 /*     ---- ----- --------- --- ---------- */
00522 
00523 /*     ZERO, ONE       Real 0 and 1. */
00524 /*     MAXTYP          The number of types defined. */
00525 /*     NMAX            Largest value in NN or 12. */
00526 /*     NERRS           The number of tests which have exceeded THRESH */
00527 /*     COND, CONDS, */
00528 /*     IMODE           Values to be passed to the matrix generators. */
00529 /*     ANORM           Norm of A; passed to matrix generators. */
00530 
00531 /*     OVFL, UNFL      Overflow and underflow thresholds. */
00532 /*     ULP, ULPINV     Finest relative precision and its inverse. */
00533 /*     RTULP, RTULPI   Square roots of the previous 4 values. */
00534 
00535 /*             The following four arrays decode JTYPE: */
00536 /*     KTYPE(j)        The general type (1-10) for type "j". */
00537 /*     KMODE(j)        The MODE value to be passed to the matrix */
00538 /*                     generator for type "j". */
00539 /*     KMAGN(j)        The order of magnitude ( O(1), */
00540 /*                     O(overflow^(1/2) ), O(underflow^(1/2) ) */
00541 /*     KCONDS(j)       Selectw whether CONDS is to be 1 or */
00542 /*                     1/sqrt(ulp).  (0 means irrelevant.) */
00543 
00544 /*  ===================================================================== */
00545 
00546 /*     .. Parameters .. */
00547 /*     .. */
00548 /*     .. Local Scalars .. */
00549 /*     .. */
00550 /*     .. Local Arrays .. */
00551 /*     .. */
00552 /*     .. External Functions .. */
00553 /*     .. */
00554 /*     .. External Subroutines .. */
00555 /*     .. */
00556 /*     .. Intrinsic Functions .. */
00557 /*     .. */
00558 /*     .. Data statements .. */
00559     /* Parameter adjustments */
00560     --nn;
00561     --dotype;
00562     --iseed;
00563     h_dim1 = *lda;
00564     h_offset = 1 + h_dim1;
00565     h__ -= h_offset;
00566     a_dim1 = *lda;
00567     a_offset = 1 + a_dim1;
00568     a -= a_offset;
00569     --wr;
00570     --wi;
00571     --wr1;
00572     --wi1;
00573     vl_dim1 = *ldvl;
00574     vl_offset = 1 + vl_dim1;
00575     vl -= vl_offset;
00576     vr_dim1 = *ldvr;
00577     vr_offset = 1 + vr_dim1;
00578     vr -= vr_offset;
00579     lre_dim1 = *ldlre;
00580     lre_offset = 1 + lre_dim1;
00581     lre -= lre_offset;
00582     --rcondv;
00583     --rcndv1;
00584     --rcdvin;
00585     --rconde;
00586     --rcnde1;
00587     --rcdein;
00588     --scale;
00589     --scale1;
00590     --result;
00591     --work;
00592     --iwork;
00593 
00594     /* Function Body */
00595 /*     .. */
00596 /*     .. Executable Statements .. */
00597 
00598     s_copy(path, "Double precision", (ftnlen)1, (ftnlen)16);
00599     s_copy(path + 1, "VX", (ftnlen)2, (ftnlen)2);
00600 
00601 /*     Check for errors */
00602 
00603     ntestt = 0;
00604     ntestf = 0;
00605     *info = 0;
00606 
00607 /*     Important constants */
00608 
00609     badnn = FALSE_;
00610 
00611 /*     12 is the largest dimension in the input file of precomputed */
00612 /*     problems */
00613 
00614     nmax = 12;
00615     i__1 = *nsizes;
00616     for (j = 1; j <= i__1; ++j) {
00617 /* Computing MAX */
00618         i__2 = nmax, i__3 = nn[j];
00619         nmax = max(i__2,i__3);
00620         if (nn[j] < 0) {
00621             badnn = TRUE_;
00622         }
00623 /* L10: */
00624     }
00625 
00626 /*     Check for errors */
00627 
00628     if (*nsizes < 0) {
00629         *info = -1;
00630     } else if (badnn) {
00631         *info = -2;
00632     } else if (*ntypes < 0) {
00633         *info = -3;
00634     } else if (*thresh < 0.) {
00635         *info = -6;
00636     } else if (*lda < 1 || *lda < nmax) {
00637         *info = -10;
00638     } else if (*ldvl < 1 || *ldvl < nmax) {
00639         *info = -17;
00640     } else if (*ldvr < 1 || *ldvr < nmax) {
00641         *info = -19;
00642     } else if (*ldlre < 1 || *ldlre < nmax) {
00643         *info = -21;
00644     } else /* if(complicated condition) */ {
00645 /* Computing 2nd power */
00646         i__1 = nmax;
00647         if (nmax * 6 + (i__1 * i__1 << 1) > *nwork) {
00648             *info = -32;
00649         }
00650     }
00651 
00652     if (*info != 0) {
00653         i__1 = -(*info);
00654         xerbla_("DDRVVX", &i__1);
00655         return 0;
00656     }
00657 
00658 /*     If nothing to do check on NIUNIT */
00659 
00660     if (*nsizes == 0 || *ntypes == 0) {
00661         goto L160;
00662     }
00663 
00664 /*     More Important constants */
00665 
00666     unfl = dlamch_("Safe minimum");
00667     ovfl = 1. / unfl;
00668     dlabad_(&unfl, &ovfl);
00669     ulp = dlamch_("Precision");
00670     ulpinv = 1. / ulp;
00671     rtulp = sqrt(ulp);
00672     rtulpi = 1. / rtulp;
00673 
00674 /*     Loop over sizes, types */
00675 
00676     nerrs = 0;
00677 
00678     i__1 = *nsizes;
00679     for (jsize = 1; jsize <= i__1; ++jsize) {
00680         n = nn[jsize];
00681         if (*nsizes != 1) {
00682             mtypes = min(21,*ntypes);
00683         } else {
00684             mtypes = min(22,*ntypes);
00685         }
00686 
00687         i__2 = mtypes;
00688         for (jtype = 1; jtype <= i__2; ++jtype) {
00689             if (! dotype[jtype]) {
00690                 goto L140;
00691             }
00692 
00693 /*           Save ISEED in case of an error. */
00694 
00695             for (j = 1; j <= 4; ++j) {
00696                 ioldsd[j - 1] = iseed[j];
00697 /* L20: */
00698             }
00699 
00700 /*           Compute "A" */
00701 
00702 /*           Control parameters: */
00703 
00704 /*           KMAGN  KCONDS  KMODE        KTYPE */
00705 /*       =1  O(1)   1       clustered 1  zero */
00706 /*       =2  large  large   clustered 2  identity */
00707 /*       =3  small          exponential  Jordan */
00708 /*       =4                 arithmetic   diagonal, (w/ eigenvalues) */
00709 /*       =5                 random log   symmetric, w/ eigenvalues */
00710 /*       =6                 random       general, w/ eigenvalues */
00711 /*       =7                              random diagonal */
00712 /*       =8                              random symmetric */
00713 /*       =9                              random general */
00714 /*       =10                             random triangular */
00715 
00716             if (mtypes > 21) {
00717                 goto L90;
00718             }
00719 
00720             itype = ktype[jtype - 1];
00721             imode = kmode[jtype - 1];
00722 
00723 /*           Compute norm */
00724 
00725             switch (kmagn[jtype - 1]) {
00726                 case 1:  goto L30;
00727                 case 2:  goto L40;
00728                 case 3:  goto L50;
00729             }
00730 
00731 L30:
00732             anorm = 1.;
00733             goto L60;
00734 
00735 L40:
00736             anorm = ovfl * ulp;
00737             goto L60;
00738 
00739 L50:
00740             anorm = unfl * ulpinv;
00741             goto L60;
00742 
00743 L60:
00744 
00745             dlaset_("Full", lda, &n, &c_b18, &c_b18, &a[a_offset], lda);
00746             iinfo = 0;
00747             cond = ulpinv;
00748 
00749 /*           Special Matrices -- Identity & Jordan block */
00750 
00751 /*              Zero */
00752 
00753             if (itype == 1) {
00754                 iinfo = 0;
00755 
00756             } else if (itype == 2) {
00757 
00758 /*              Identity */
00759 
00760                 i__3 = n;
00761                 for (jcol = 1; jcol <= i__3; ++jcol) {
00762                     a[jcol + jcol * a_dim1] = anorm;
00763 /* L70: */
00764                 }
00765 
00766             } else if (itype == 3) {
00767 
00768 /*              Jordan Block */
00769 
00770                 i__3 = n;
00771                 for (jcol = 1; jcol <= i__3; ++jcol) {
00772                     a[jcol + jcol * a_dim1] = anorm;
00773                     if (jcol > 1) {
00774                         a[jcol + (jcol - 1) * a_dim1] = 1.;
00775                     }
00776 /* L80: */
00777                 }
00778 
00779             } else if (itype == 4) {
00780 
00781 /*              Diagonal Matrix, [Eigen]values Specified */
00782 
00783                 dlatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond, 
00784                         &anorm, &c__0, &c__0, "N", &a[a_offset], lda, &work[n 
00785                         + 1], &iinfo);
00786 
00787             } else if (itype == 5) {
00788 
00789 /*              Symmetric, eigenvalues specified */
00790 
00791                 dlatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond, 
00792                         &anorm, &n, &n, "N", &a[a_offset], lda, &work[n + 1], 
00793                         &iinfo);
00794 
00795             } else if (itype == 6) {
00796 
00797 /*              General, eigenvalues specified */
00798 
00799                 if (kconds[jtype - 1] == 1) {
00800                     conds = 1.;
00801                 } else if (kconds[jtype - 1] == 2) {
00802                     conds = rtulpi;
00803                 } else {
00804                     conds = 0.;
00805                 }
00806 
00807                 *(unsigned char *)&adumma[0] = ' ';
00808                 dlatme_(&n, "S", &iseed[1], &work[1], &imode, &cond, &c_b32, 
00809                         adumma, "T", "T", "T", &work[n + 1], &c__4, &conds, &
00810                         n, &n, &anorm, &a[a_offset], lda, &work[(n << 1) + 1], 
00811                          &iinfo);
00812 
00813             } else if (itype == 7) {
00814 
00815 /*              Diagonal, random eigenvalues */
00816 
00817                 dlatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b32, 
00818                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00819                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &c__0, &
00820                         c__0, &c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[
00821                         1], &iinfo);
00822 
00823             } else if (itype == 8) {
00824 
00825 /*              Symmetric, random eigenvalues */
00826 
00827                 dlatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b32, 
00828                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00829                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &n, &
00830                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00831                         iinfo);
00832 
00833             } else if (itype == 9) {
00834 
00835 /*              General, random eigenvalues */
00836 
00837                 dlatmr_(&n, &n, "S", &iseed[1], "N", &work[1], &c__6, &c_b32, 
00838                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00839                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &n, &
00840                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00841                         iinfo);
00842                 if (n >= 4) {
00843                     dlaset_("Full", &c__2, &n, &c_b18, &c_b18, &a[a_offset], 
00844                             lda);
00845                     i__3 = n - 3;
00846                     dlaset_("Full", &i__3, &c__1, &c_b18, &c_b18, &a[a_dim1 + 
00847                             3], lda);
00848                     i__3 = n - 3;
00849                     dlaset_("Full", &i__3, &c__2, &c_b18, &c_b18, &a[(n - 1) *
00850                              a_dim1 + 3], lda);
00851                     dlaset_("Full", &c__1, &n, &c_b18, &c_b18, &a[n + a_dim1], 
00852                              lda);
00853                 }
00854 
00855             } else if (itype == 10) {
00856 
00857 /*              Triangular, random eigenvalues */
00858 
00859                 dlatmr_(&n, &n, "S", &iseed[1], "N", &work[1], &c__6, &c_b32, 
00860                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00861                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &c__0, &
00862                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00863                         iinfo);
00864 
00865             } else {
00866 
00867                 iinfo = 1;
00868             }
00869 
00870             if (iinfo != 0) {
00871                 io___33.ciunit = *nounit;
00872                 s_wsfe(&io___33);
00873                 do_fio(&c__1, "Generator", (ftnlen)9);
00874                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00875                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00876                 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00877                 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00878                 e_wsfe();
00879                 *info = abs(iinfo);
00880                 return 0;
00881             }
00882 
00883 L90:
00884 
00885 /*           Test for minimal and generous workspace */
00886 
00887             for (iwk = 1; iwk <= 3; ++iwk) {
00888                 if (iwk == 1) {
00889                     nnwork = n * 3;
00890                 } else if (iwk == 2) {
00891 /* Computing 2nd power */
00892                     i__3 = n;
00893                     nnwork = n * 6 + i__3 * i__3;
00894                 } else {
00895 /* Computing 2nd power */
00896                     i__3 = n;
00897                     nnwork = n * 6 + (i__3 * i__3 << 1);
00898                 }
00899                 nnwork = max(nnwork,1);
00900 
00901 /*              Test for all balancing options */
00902 
00903                 for (ibal = 1; ibal <= 4; ++ibal) {
00904                     *(unsigned char *)balanc = *(unsigned char *)&bal[ibal - 
00905                             1];
00906 
00907 /*                 Perform tests */
00908 
00909                     dget23_(&c_false, balanc, &jtype, thresh, ioldsd, nounit, 
00910                             &n, &a[a_offset], lda, &h__[h_offset], &wr[1], &
00911                             wi[1], &wr1[1], &wi1[1], &vl[vl_offset], ldvl, &
00912                             vr[vr_offset], ldvr, &lre[lre_offset], ldlre, &
00913                             rcondv[1], &rcndv1[1], &rcdvin[1], &rconde[1], &
00914                             rcnde1[1], &rcdein[1], &scale[1], &scale1[1], &
00915                             result[1], &work[1], &nnwork, &iwork[1], info);
00916 
00917 /*                 Check for RESULT(j) > THRESH */
00918 
00919                     ntest = 0;
00920                     nfail = 0;
00921                     for (j = 1; j <= 9; ++j) {
00922                         if (result[j] >= 0.) {
00923                             ++ntest;
00924                         }
00925                         if (result[j] >= *thresh) {
00926                             ++nfail;
00927                         }
00928 /* L100: */
00929                     }
00930 
00931                     if (nfail > 0) {
00932                         ++ntestf;
00933                     }
00934                     if (ntestf == 1) {
00935                         io___40.ciunit = *nounit;
00936                         s_wsfe(&io___40);
00937                         do_fio(&c__1, path, (ftnlen)3);
00938                         e_wsfe();
00939                         io___41.ciunit = *nounit;
00940                         s_wsfe(&io___41);
00941                         e_wsfe();
00942                         io___42.ciunit = *nounit;
00943                         s_wsfe(&io___42);
00944                         e_wsfe();
00945                         io___43.ciunit = *nounit;
00946                         s_wsfe(&io___43);
00947                         e_wsfe();
00948                         io___44.ciunit = *nounit;
00949                         s_wsfe(&io___44);
00950                         do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(
00951                                 doublereal));
00952                         e_wsfe();
00953                         ntestf = 2;
00954                     }
00955 
00956                     for (j = 1; j <= 9; ++j) {
00957                         if (result[j] >= *thresh) {
00958                             io___45.ciunit = *nounit;
00959                             s_wsfe(&io___45);
00960                             do_fio(&c__1, balanc, (ftnlen)1);
00961                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00962                                     ;
00963                             do_fio(&c__1, (char *)&iwk, (ftnlen)sizeof(
00964                                     integer));
00965                             do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
00966                                     integer));
00967                             do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(
00968                                     integer));
00969                             do_fio(&c__1, (char *)&j, (ftnlen)sizeof(integer))
00970                                     ;
00971                             do_fio(&c__1, (char *)&result[j], (ftnlen)sizeof(
00972                                     doublereal));
00973                             e_wsfe();
00974                         }
00975 /* L110: */
00976                     }
00977 
00978                     nerrs += nfail;
00979                     ntestt += ntest;
00980 
00981 /* L120: */
00982                 }
00983 /* L130: */
00984             }
00985 L140:
00986             ;
00987         }
00988 /* L150: */
00989     }
00990 
00991 L160:
00992 
00993 /*     Read in data from file to check accuracy of condition estimation. */
00994 /*     Assume input eigenvalues are sorted lexicographically (increasing */
00995 /*     by real part, then decreasing by imaginary part) */
00996 
00997     jtype = 0;
00998 L170:
00999     io___46.ciunit = *niunit;
01000     i__1 = s_rsle(&io___46);
01001     if (i__1 != 0) {
01002         goto L220;
01003     }
01004     i__1 = do_lio(&c__3, &c__1, (char *)&n, (ftnlen)sizeof(integer));
01005     if (i__1 != 0) {
01006         goto L220;
01007     }
01008     i__1 = e_rsle();
01009     if (i__1 != 0) {
01010         goto L220;
01011     }
01012 
01013 /*     Read input data until N=0 */
01014 
01015     if (n == 0) {
01016         goto L220;
01017     }
01018     ++jtype;
01019     iseed[1] = jtype;
01020     i__1 = n;
01021     for (i__ = 1; i__ <= i__1; ++i__) {
01022         io___48.ciunit = *niunit;
01023         s_rsle(&io___48);
01024         i__2 = n;
01025         for (j = 1; j <= i__2; ++j) {
01026             do_lio(&c__5, &c__1, (char *)&a[i__ + j * a_dim1], (ftnlen)sizeof(
01027                     doublereal));
01028         }
01029         e_rsle();
01030 /* L180: */
01031     }
01032     i__1 = n;
01033     for (i__ = 1; i__ <= i__1; ++i__) {
01034         io___49.ciunit = *niunit;
01035         s_rsle(&io___49);
01036         do_lio(&c__5, &c__1, (char *)&wr1[i__], (ftnlen)sizeof(doublereal));
01037         do_lio(&c__5, &c__1, (char *)&wi1[i__], (ftnlen)sizeof(doublereal));
01038         do_lio(&c__5, &c__1, (char *)&rcdein[i__], (ftnlen)sizeof(doublereal))
01039                 ;
01040         do_lio(&c__5, &c__1, (char *)&rcdvin[i__], (ftnlen)sizeof(doublereal))
01041                 ;
01042         e_rsle();
01043 /* L190: */
01044     }
01045 /* Computing 2nd power */
01046     i__2 = n;
01047     i__1 = n * 6 + (i__2 * i__2 << 1);
01048     dget23_(&c_true, "N", &c__22, thresh, &iseed[1], nounit, &n, &a[a_offset], 
01049              lda, &h__[h_offset], &wr[1], &wi[1], &wr1[1], &wi1[1], &vl[
01050             vl_offset], ldvl, &vr[vr_offset], ldvr, &lre[lre_offset], ldlre, &
01051             rcondv[1], &rcndv1[1], &rcdvin[1], &rconde[1], &rcnde1[1], &
01052             rcdein[1], &scale[1], &scale1[1], &result[1], &work[1], &i__1, &
01053             iwork[1], info);
01054 
01055 /*     Check for RESULT(j) > THRESH */
01056 
01057     ntest = 0;
01058     nfail = 0;
01059     for (j = 1; j <= 11; ++j) {
01060         if (result[j] >= 0.) {
01061             ++ntest;
01062         }
01063         if (result[j] >= *thresh) {
01064             ++nfail;
01065         }
01066 /* L200: */
01067     }
01068 
01069     if (nfail > 0) {
01070         ++ntestf;
01071     }
01072     if (ntestf == 1) {
01073         io___50.ciunit = *nounit;
01074         s_wsfe(&io___50);
01075         do_fio(&c__1, path, (ftnlen)3);
01076         e_wsfe();
01077         io___51.ciunit = *nounit;
01078         s_wsfe(&io___51);
01079         e_wsfe();
01080         io___52.ciunit = *nounit;
01081         s_wsfe(&io___52);
01082         e_wsfe();
01083         io___53.ciunit = *nounit;
01084         s_wsfe(&io___53);
01085         e_wsfe();
01086         io___54.ciunit = *nounit;
01087         s_wsfe(&io___54);
01088         do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
01089         e_wsfe();
01090         ntestf = 2;
01091     }
01092 
01093     for (j = 1; j <= 11; ++j) {
01094         if (result[j] >= *thresh) {
01095             io___55.ciunit = *nounit;
01096             s_wsfe(&io___55);
01097             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01098             do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01099             do_fio(&c__1, (char *)&j, (ftnlen)sizeof(integer));
01100             do_fio(&c__1, (char *)&result[j], (ftnlen)sizeof(doublereal));
01101             e_wsfe();
01102         }
01103 /* L210: */
01104     }
01105 
01106     nerrs += nfail;
01107     ntestt += ntest;
01108     goto L170;
01109 L220:
01110 
01111 /*     Summary */
01112 
01113     dlasum_(path, nounit, &nerrs, &ntestt);
01114 
01115 
01116 
01117     return 0;
01118 
01119 /*     End of DDRVVX */
01120 
01121 } /* ddrvvx_ */


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