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


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