PageRenderTime 56ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/TESTING/EIG/dchkee.f

https://bitbucket.org/iricpt/lapack
FORTRAN Legacy | 2535 lines | 1029 code | 0 blank | 1506 comment | 0 complexity | 8fdf0ff5e059b0e925dcc88c03d84239 MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. *> \brief \b DCHKEE
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. * Definition:
  9. * ===========
  10. *
  11. * PROGRAM DCHKEE
  12. *
  13. *
  14. *> \par Purpose:
  15. * =============
  16. *>
  17. *> \verbatim
  18. *>
  19. *> DCHKEE tests the DOUBLE PRECISION LAPACK subroutines for the matrix
  20. *> eigenvalue problem. The test paths in this version are
  21. *>
  22. *> NEP (Nonsymmetric Eigenvalue Problem):
  23. *> Test DGEHRD, DORGHR, DHSEQR, DTREVC, DHSEIN, and DORMHR
  24. *>
  25. *> SEP (Symmetric Eigenvalue Problem):
  26. *> Test DSYTRD, DORGTR, DSTEQR, DSTERF, DSTEIN, DSTEDC,
  27. *> and drivers DSYEV(X), DSBEV(X), DSPEV(X), DSTEV(X),
  28. *> DSYEVD, DSBEVD, DSPEVD, DSTEVD
  29. *>
  30. *> SVD (Singular Value Decomposition):
  31. *> Test DGEBRD, DORGBR, DBDSQR, DBDSDC
  32. *> and the drivers DGESVD, DGESDD
  33. *>
  34. *> DEV (Nonsymmetric Eigenvalue/eigenvector Driver):
  35. *> Test DGEEV
  36. *>
  37. *> DES (Nonsymmetric Schur form Driver):
  38. *> Test DGEES
  39. *>
  40. *> DVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
  41. *> Test DGEEVX
  42. *>
  43. *> DSX (Nonsymmetric Schur form Expert Driver):
  44. *> Test DGEESX
  45. *>
  46. *> DGG (Generalized Nonsymmetric Eigenvalue Problem):
  47. *> Test DGGHD3, DGGBAL, DGGBAK, DHGEQZ, and DTGEVC
  48. *>
  49. *> DGS (Generalized Nonsymmetric Schur form Driver):
  50. *> Test DGGES
  51. *>
  52. *> DGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
  53. *> Test DGGEV
  54. *>
  55. *> DGX (Generalized Nonsymmetric Schur form Expert Driver):
  56. *> Test DGGESX
  57. *>
  58. *> DXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
  59. *> Test DGGEVX
  60. *>
  61. *> DSG (Symmetric Generalized Eigenvalue Problem):
  62. *> Test DSYGST, DSYGV, DSYGVD, DSYGVX, DSPGST, DSPGV, DSPGVD,
  63. *> DSPGVX, DSBGST, DSBGV, DSBGVD, and DSBGVX
  64. *>
  65. *> DSB (Symmetric Band Eigenvalue Problem):
  66. *> Test DSBTRD
  67. *>
  68. *> DBB (Band Singular Value Decomposition):
  69. *> Test DGBBRD
  70. *>
  71. *> DEC (Eigencondition estimation):
  72. *> Test DLALN2, DLASY2, DLAEQU, DLAEXC, DTRSYL, DTREXC, DTRSNA,
  73. *> DTRSEN, and DLAQTR
  74. *>
  75. *> DBL (Balancing a general matrix)
  76. *> Test DGEBAL
  77. *>
  78. *> DBK (Back transformation on a balanced matrix)
  79. *> Test DGEBAK
  80. *>
  81. *> DGL (Balancing a matrix pair)
  82. *> Test DGGBAL
  83. *>
  84. *> DGK (Back transformation on a matrix pair)
  85. *> Test DGGBAK
  86. *>
  87. *> GLM (Generalized Linear Regression Model):
  88. *> Tests DGGGLM
  89. *>
  90. *> GQR (Generalized QR and RQ factorizations):
  91. *> Tests DGGQRF and DGGRQF
  92. *>
  93. *> GSV (Generalized Singular Value Decomposition):
  94. *> Tests DGGSVD, DGGSVP, DTGSJA, DLAGS2, DLAPLL, and DLAPMT
  95. *>
  96. *> CSD (CS decomposition):
  97. *> Tests DORCSD
  98. *>
  99. *> LSE (Constrained Linear Least Squares):
  100. *> Tests DGGLSE
  101. *>
  102. *> Each test path has a different set of inputs, but the data sets for
  103. *> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
  104. *> single input file. The first line of input should contain one of the
  105. *> 3-character path names in columns 1-3. The number of remaining lines
  106. *> depends on what is found on the first line.
  107. *>
  108. *> The number of matrix types used in testing is often controllable from
  109. *> the input file. The number of matrix types for each path, and the
  110. *> test routine that describes them, is as follows:
  111. *>
  112. *> Path name(s) Types Test routine
  113. *>
  114. *> DHS or NEP 21 DCHKHS
  115. *> DST or SEP 21 DCHKST (routines)
  116. *> 18 DDRVST (drivers)
  117. *> DBD or SVD 16 DCHKBD (routines)
  118. *> 5 DDRVBD (drivers)
  119. *> DEV 21 DDRVEV
  120. *> DES 21 DDRVES
  121. *> DVX 21 DDRVVX
  122. *> DSX 21 DDRVSX
  123. *> DGG 26 DCHKGG (routines)
  124. *> DGS 26 DDRGES
  125. *> DGX 5 DDRGSX
  126. *> DGV 26 DDRGEV
  127. *> DXV 2 DDRGVX
  128. *> DSG 21 DDRVSG
  129. *> DSB 15 DCHKSB
  130. *> DBB 15 DCHKBB
  131. *> DEC - DCHKEC
  132. *> DBL - DCHKBL
  133. *> DBK - DCHKBK
  134. *> DGL - DCHKGL
  135. *> DGK - DCHKGK
  136. *> GLM 8 DCKGLM
  137. *> GQR 8 DCKGQR
  138. *> GSV 8 DCKGSV
  139. *> CSD 3 DCKCSD
  140. *> LSE 8 DCKLSE
  141. *>
  142. *>-----------------------------------------------------------------------
  143. *>
  144. *> NEP input file:
  145. *>
  146. *> line 2: NN, INTEGER
  147. *> Number of values of N.
  148. *>
  149. *> line 3: NVAL, INTEGER array, dimension (NN)
  150. *> The values for the matrix dimension N.
  151. *>
  152. *> line 4: NPARMS, INTEGER
  153. *> Number of values of the parameters NB, NBMIN, NX, NS, and
  154. *> MAXB.
  155. *>
  156. *> line 5: NBVAL, INTEGER array, dimension (NPARMS)
  157. *> The values for the blocksize NB.
  158. *>
  159. *> line 6: NBMIN, INTEGER array, dimension (NPARMS)
  160. *> The values for the minimum blocksize NBMIN.
  161. *>
  162. *> line 7: NXVAL, INTEGER array, dimension (NPARMS)
  163. *> The values for the crossover point NX.
  164. *>
  165. *> line 8: INMIN, INTEGER array, dimension (NPARMS)
  166. *> LAHQR vs TTQRE crossover point, >= 11
  167. *>
  168. *> line 9: INWIN, INTEGER array, dimension (NPARMS)
  169. *> recommended deflation window size
  170. *>
  171. *> line 10: INIBL, INTEGER array, dimension (NPARMS)
  172. *> nibble crossover point
  173. *>
  174. *> line 11: ISHFTS, INTEGER array, dimension (NPARMS)
  175. *> number of simultaneous shifts)
  176. *>
  177. *> line 12: IACC22, INTEGER array, dimension (NPARMS)
  178. *> select structured matrix multiply: 0, 1 or 2)
  179. *>
  180. *> line 13: THRESH
  181. *> Threshold value for the test ratios. Information will be
  182. *> printed about each test for which the test ratio is greater
  183. *> than or equal to the threshold. To have all of the test
  184. *> ratios printed, use THRESH = 0.0 .
  185. *>
  186. *> line 14: NEWSD, INTEGER
  187. *> A code indicating how to set the random number seed.
  188. *> = 0: Set the seed to a default value before each run
  189. *> = 1: Initialize the seed to a default value only before the
  190. *> first run
  191. *> = 2: Like 1, but use the seed values on the next line
  192. *>
  193. *> If line 14 was 2:
  194. *>
  195. *> line 15: INTEGER array, dimension (4)
  196. *> Four integer values for the random number seed.
  197. *>
  198. *> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
  199. *> the user to specify the matrix types. Each line contains
  200. *> a 3-character path name in columns 1-3, and the number
  201. *> of matrix types must be the first nonblank item in columns
  202. *> 4-80. If the number of matrix types is at least 1 but is
  203. *> less than the maximum number of possible types, a second
  204. *> line will be read to get the numbers of the matrix types to
  205. *> be used. For example,
  206. *> NEP 21
  207. *> requests all of the matrix types for the nonsymmetric
  208. *> eigenvalue problem, while
  209. *> NEP 4
  210. *> 9 10 11 12
  211. *> requests only matrices of type 9, 10, 11, and 12.
  212. *>
  213. *> The valid 3-character path names are 'NEP' or 'SHS' for the
  214. *> nonsymmetric eigenvalue routines.
  215. *>
  216. *>-----------------------------------------------------------------------
  217. *>
  218. *> SEP or DSG input file:
  219. *>
  220. *> line 2: NN, INTEGER
  221. *> Number of values of N.
  222. *>
  223. *> line 3: NVAL, INTEGER array, dimension (NN)
  224. *> The values for the matrix dimension N.
  225. *>
  226. *> line 4: NPARMS, INTEGER
  227. *> Number of values of the parameters NB, NBMIN, and NX.
  228. *>
  229. *> line 5: NBVAL, INTEGER array, dimension (NPARMS)
  230. *> The values for the blocksize NB.
  231. *>
  232. *> line 6: NBMIN, INTEGER array, dimension (NPARMS)
  233. *> The values for the minimum blocksize NBMIN.
  234. *>
  235. *> line 7: NXVAL, INTEGER array, dimension (NPARMS)
  236. *> The values for the crossover point NX.
  237. *>
  238. *> line 8: THRESH
  239. *> Threshold value for the test ratios. Information will be
  240. *> printed about each test for which the test ratio is greater
  241. *> than or equal to the threshold.
  242. *>
  243. *> line 9: TSTCHK, LOGICAL
  244. *> Flag indicating whether or not to test the LAPACK routines.
  245. *>
  246. *> line 10: TSTDRV, LOGICAL
  247. *> Flag indicating whether or not to test the driver routines.
  248. *>
  249. *> line 11: TSTERR, LOGICAL
  250. *> Flag indicating whether or not to test the error exits for
  251. *> the LAPACK routines and driver routines.
  252. *>
  253. *> line 12: NEWSD, INTEGER
  254. *> A code indicating how to set the random number seed.
  255. *> = 0: Set the seed to a default value before each run
  256. *> = 1: Initialize the seed to a default value only before the
  257. *> first run
  258. *> = 2: Like 1, but use the seed values on the next line
  259. *>
  260. *> If line 12 was 2:
  261. *>
  262. *> line 13: INTEGER array, dimension (4)
  263. *> Four integer values for the random number seed.
  264. *>
  265. *> lines 13-EOF: Lines specifying matrix types, as for NEP.
  266. *> The 3-character path names are 'SEP' or 'SST' for the
  267. *> symmetric eigenvalue routines and driver routines, and
  268. *> 'DSG' for the routines for the symmetric generalized
  269. *> eigenvalue problem.
  270. *>
  271. *>-----------------------------------------------------------------------
  272. *>
  273. *> SVD input file:
  274. *>
  275. *> line 2: NN, INTEGER
  276. *> Number of values of M and N.
  277. *>
  278. *> line 3: MVAL, INTEGER array, dimension (NN)
  279. *> The values for the matrix row dimension M.
  280. *>
  281. *> line 4: NVAL, INTEGER array, dimension (NN)
  282. *> The values for the matrix column dimension N.
  283. *>
  284. *> line 5: NPARMS, INTEGER
  285. *> Number of values of the parameter NB, NBMIN, NX, and NRHS.
  286. *>
  287. *> line 6: NBVAL, INTEGER array, dimension (NPARMS)
  288. *> The values for the blocksize NB.
  289. *>
  290. *> line 7: NBMIN, INTEGER array, dimension (NPARMS)
  291. *> The values for the minimum blocksize NBMIN.
  292. *>
  293. *> line 8: NXVAL, INTEGER array, dimension (NPARMS)
  294. *> The values for the crossover point NX.
  295. *>
  296. *> line 9: NSVAL, INTEGER array, dimension (NPARMS)
  297. *> The values for the number of right hand sides NRHS.
  298. *>
  299. *> line 10: THRESH
  300. *> Threshold value for the test ratios. Information will be
  301. *> printed about each test for which the test ratio is greater
  302. *> than or equal to the threshold.
  303. *>
  304. *> line 11: TSTCHK, LOGICAL
  305. *> Flag indicating whether or not to test the LAPACK routines.
  306. *>
  307. *> line 12: TSTDRV, LOGICAL
  308. *> Flag indicating whether or not to test the driver routines.
  309. *>
  310. *> line 13: TSTERR, LOGICAL
  311. *> Flag indicating whether or not to test the error exits for
  312. *> the LAPACK routines and driver routines.
  313. *>
  314. *> line 14: NEWSD, INTEGER
  315. *> A code indicating how to set the random number seed.
  316. *> = 0: Set the seed to a default value before each run
  317. *> = 1: Initialize the seed to a default value only before the
  318. *> first run
  319. *> = 2: Like 1, but use the seed values on the next line
  320. *>
  321. *> If line 14 was 2:
  322. *>
  323. *> line 15: INTEGER array, dimension (4)
  324. *> Four integer values for the random number seed.
  325. *>
  326. *> lines 15-EOF: Lines specifying matrix types, as for NEP.
  327. *> The 3-character path names are 'SVD' or 'SBD' for both the
  328. *> SVD routines and the SVD driver routines.
  329. *>
  330. *>-----------------------------------------------------------------------
  331. *>
  332. *> DEV and DES data files:
  333. *>
  334. *> line 1: 'DEV' or 'DES' in columns 1 to 3.
  335. *>
  336. *> line 2: NSIZES, INTEGER
  337. *> Number of sizes of matrices to use. Should be at least 0
  338. *> and at most 20. If NSIZES = 0, no testing is done
  339. *> (although the remaining 3 lines are still read).
  340. *>
  341. *> line 3: NN, INTEGER array, dimension(NSIZES)
  342. *> Dimensions of matrices to be tested.
  343. *>
  344. *> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  345. *> These integer parameters determine how blocking is done
  346. *> (see ILAENV for details)
  347. *> NB : block size
  348. *> NBMIN : minimum block size
  349. *> NX : minimum dimension for blocking
  350. *> NS : number of shifts in xHSEQR
  351. *> NBCOL : minimum column dimension for blocking
  352. *>
  353. *> line 5: THRESH, REAL
  354. *> The test threshold against which computed residuals are
  355. *> compared. Should generally be in the range from 10. to 20.
  356. *> If it is 0., all test case data will be printed.
  357. *>
  358. *> line 6: TSTERR, LOGICAL
  359. *> Flag indicating whether or not to test the error exits.
  360. *>
  361. *> line 7: NEWSD, INTEGER
  362. *> A code indicating how to set the random number seed.
  363. *> = 0: Set the seed to a default value before each run
  364. *> = 1: Initialize the seed to a default value only before the
  365. *> first run
  366. *> = 2: Like 1, but use the seed values on the next line
  367. *>
  368. *> If line 7 was 2:
  369. *>
  370. *> line 8: INTEGER array, dimension (4)
  371. *> Four integer values for the random number seed.
  372. *>
  373. *> lines 9 and following: Lines specifying matrix types, as for NEP.
  374. *> The 3-character path name is 'DEV' to test SGEEV, or
  375. *> 'DES' to test SGEES.
  376. *>
  377. *>-----------------------------------------------------------------------
  378. *>
  379. *> The DVX data has two parts. The first part is identical to DEV,
  380. *> and the second part consists of test matrices with precomputed
  381. *> solutions.
  382. *>
  383. *> line 1: 'DVX' in columns 1-3.
  384. *>
  385. *> line 2: NSIZES, INTEGER
  386. *> If NSIZES = 0, no testing of randomly generated examples
  387. *> is done, but any precomputed examples are tested.
  388. *>
  389. *> line 3: NN, INTEGER array, dimension(NSIZES)
  390. *>
  391. *> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  392. *>
  393. *> line 5: THRESH, REAL
  394. *>
  395. *> line 6: TSTERR, LOGICAL
  396. *>
  397. *> line 7: NEWSD, INTEGER
  398. *>
  399. *> If line 7 was 2:
  400. *>
  401. *> line 8: INTEGER array, dimension (4)
  402. *>
  403. *> lines 9 and following: The first line contains 'DVX' in columns 1-3
  404. *> followed by the number of matrix types, possibly with
  405. *> a second line to specify certain matrix types.
  406. *> If the number of matrix types = 0, no testing of randomly
  407. *> generated examples is done, but any precomputed examples
  408. *> are tested.
  409. *>
  410. *> remaining lines : Each matrix is stored on 1+2*N lines, where N is
  411. *> its dimension. The first line contains the dimension (a
  412. *> single integer). The next N lines contain the matrix, one
  413. *> row per line. The last N lines correspond to each
  414. *> eigenvalue. Each of these last N lines contains 4 real
  415. *> values: the real part of the eigenvalue, the imaginary
  416. *> part of the eigenvalue, the reciprocal condition number of
  417. *> the eigenvalues, and the reciprocal condition number of the
  418. *> eigenvector. The end of data is indicated by dimension N=0.
  419. *> Even if no data is to be tested, there must be at least one
  420. *> line containing N=0.
  421. *>
  422. *>-----------------------------------------------------------------------
  423. *>
  424. *> The DSX data is like DVX. The first part is identical to DEV, and the
  425. *> second part consists of test matrices with precomputed solutions.
  426. *>
  427. *> line 1: 'DSX' in columns 1-3.
  428. *>
  429. *> line 2: NSIZES, INTEGER
  430. *> If NSIZES = 0, no testing of randomly generated examples
  431. *> is done, but any precomputed examples are tested.
  432. *>
  433. *> line 3: NN, INTEGER array, dimension(NSIZES)
  434. *>
  435. *> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  436. *>
  437. *> line 5: THRESH, REAL
  438. *>
  439. *> line 6: TSTERR, LOGICAL
  440. *>
  441. *> line 7: NEWSD, INTEGER
  442. *>
  443. *> If line 7 was 2:
  444. *>
  445. *> line 8: INTEGER array, dimension (4)
  446. *>
  447. *> lines 9 and following: The first line contains 'DSX' in columns 1-3
  448. *> followed by the number of matrix types, possibly with
  449. *> a second line to specify certain matrix types.
  450. *> If the number of matrix types = 0, no testing of randomly
  451. *> generated examples is done, but any precomputed examples
  452. *> are tested.
  453. *>
  454. *> remaining lines : Each matrix is stored on 3+N lines, where N is its
  455. *> dimension. The first line contains the dimension N and the
  456. *> dimension M of an invariant subspace. The second line
  457. *> contains M integers, identifying the eigenvalues in the
  458. *> invariant subspace (by their position in a list of
  459. *> eigenvalues ordered by increasing real part). The next N
  460. *> lines contain the matrix. The last line contains the
  461. *> reciprocal condition number for the average of the selected
  462. *> eigenvalues, and the reciprocal condition number for the
  463. *> corresponding right invariant subspace. The end of data is
  464. *> indicated by a line containing N=0 and M=0. Even if no data
  465. *> is to be tested, there must be at least one line containing
  466. *> N=0 and M=0.
  467. *>
  468. *>-----------------------------------------------------------------------
  469. *>
  470. *> DGG input file:
  471. *>
  472. *> line 2: NN, INTEGER
  473. *> Number of values of N.
  474. *>
  475. *> line 3: NVAL, INTEGER array, dimension (NN)
  476. *> The values for the matrix dimension N.
  477. *>
  478. *> line 4: NPARMS, INTEGER
  479. *> Number of values of the parameters NB, NBMIN, NS, MAXB, and
  480. *> NBCOL.
  481. *>
  482. *> line 5: NBVAL, INTEGER array, dimension (NPARMS)
  483. *> The values for the blocksize NB.
  484. *>
  485. *> line 6: NBMIN, INTEGER array, dimension (NPARMS)
  486. *> The values for NBMIN, the minimum row dimension for blocks.
  487. *>
  488. *> line 7: NSVAL, INTEGER array, dimension (NPARMS)
  489. *> The values for the number of shifts.
  490. *>
  491. *> line 8: MXBVAL, INTEGER array, dimension (NPARMS)
  492. *> The values for MAXB, used in determining minimum blocksize.
  493. *>
  494. *> line 9: IACC22, INTEGER array, dimension (NPARMS)
  495. *> select structured matrix multiply: 1 or 2)
  496. *>
  497. *> line 10: NBCOL, INTEGER array, dimension (NPARMS)
  498. *> The values for NBCOL, the minimum column dimension for
  499. *> blocks.
  500. *>
  501. *> line 11: THRESH
  502. *> Threshold value for the test ratios. Information will be
  503. *> printed about each test for which the test ratio is greater
  504. *> than or equal to the threshold.
  505. *>
  506. *> line 12: TSTCHK, LOGICAL
  507. *> Flag indicating whether or not to test the LAPACK routines.
  508. *>
  509. *> line 13: TSTDRV, LOGICAL
  510. *> Flag indicating whether or not to test the driver routines.
  511. *>
  512. *> line 14: TSTERR, LOGICAL
  513. *> Flag indicating whether or not to test the error exits for
  514. *> the LAPACK routines and driver routines.
  515. *>
  516. *> line 15: NEWSD, INTEGER
  517. *> A code indicating how to set the random number seed.
  518. *> = 0: Set the seed to a default value before each run
  519. *> = 1: Initialize the seed to a default value only before the
  520. *> first run
  521. *> = 2: Like 1, but use the seed values on the next line
  522. *>
  523. *> If line 15 was 2:
  524. *>
  525. *> line 16: INTEGER array, dimension (4)
  526. *> Four integer values for the random number seed.
  527. *>
  528. *> lines 17-EOF: Lines specifying matrix types, as for NEP.
  529. *> The 3-character path name is 'DGG' for the generalized
  530. *> eigenvalue problem routines and driver routines.
  531. *>
  532. *>-----------------------------------------------------------------------
  533. *>
  534. *> DGS and DGV input files:
  535. *>
  536. *> line 1: 'DGS' or 'DGV' in columns 1 to 3.
  537. *>
  538. *> line 2: NN, INTEGER
  539. *> Number of values of N.
  540. *>
  541. *> line 3: NVAL, INTEGER array, dimension(NN)
  542. *> Dimensions of matrices to be tested.
  543. *>
  544. *> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  545. *> These integer parameters determine how blocking is done
  546. *> (see ILAENV for details)
  547. *> NB : block size
  548. *> NBMIN : minimum block size
  549. *> NX : minimum dimension for blocking
  550. *> NS : number of shifts in xHGEQR
  551. *> NBCOL : minimum column dimension for blocking
  552. *>
  553. *> line 5: THRESH, REAL
  554. *> The test threshold against which computed residuals are
  555. *> compared. Should generally be in the range from 10. to 20.
  556. *> If it is 0., all test case data will be printed.
  557. *>
  558. *> line 6: TSTERR, LOGICAL
  559. *> Flag indicating whether or not to test the error exits.
  560. *>
  561. *> line 7: NEWSD, INTEGER
  562. *> A code indicating how to set the random number seed.
  563. *> = 0: Set the seed to a default value before each run
  564. *> = 1: Initialize the seed to a default value only before the
  565. *> first run
  566. *> = 2: Like 1, but use the seed values on the next line
  567. *>
  568. *> If line 17 was 2:
  569. *>
  570. *> line 7: INTEGER array, dimension (4)
  571. *> Four integer values for the random number seed.
  572. *>
  573. *> lines 7-EOF: Lines specifying matrix types, as for NEP.
  574. *> The 3-character path name is 'DGS' for the generalized
  575. *> eigenvalue problem routines and driver routines.
  576. *>
  577. *>-----------------------------------------------------------------------
  578. *>
  579. *> DXV input files:
  580. *>
  581. *> line 1: 'DXV' in columns 1 to 3.
  582. *>
  583. *> line 2: N, INTEGER
  584. *> Value of N.
  585. *>
  586. *> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  587. *> These integer parameters determine how blocking is done
  588. *> (see ILAENV for details)
  589. *> NB : block size
  590. *> NBMIN : minimum block size
  591. *> NX : minimum dimension for blocking
  592. *> NS : number of shifts in xHGEQR
  593. *> NBCOL : minimum column dimension for blocking
  594. *>
  595. *> line 4: THRESH, REAL
  596. *> The test threshold against which computed residuals are
  597. *> compared. Should generally be in the range from 10. to 20.
  598. *> Information will be printed about each test for which the
  599. *> test ratio is greater than or equal to the threshold.
  600. *>
  601. *> line 5: TSTERR, LOGICAL
  602. *> Flag indicating whether or not to test the error exits for
  603. *> the LAPACK routines and driver routines.
  604. *>
  605. *> line 6: NEWSD, INTEGER
  606. *> A code indicating how to set the random number seed.
  607. *> = 0: Set the seed to a default value before each run
  608. *> = 1: Initialize the seed to a default value only before the
  609. *> first run
  610. *> = 2: Like 1, but use the seed values on the next line
  611. *>
  612. *> If line 6 was 2:
  613. *>
  614. *> line 7: INTEGER array, dimension (4)
  615. *> Four integer values for the random number seed.
  616. *>
  617. *> If line 2 was 0:
  618. *>
  619. *> line 7-EOF: Precomputed examples are tested.
  620. *>
  621. *> remaining lines : Each example is stored on 3+2*N lines, where N is
  622. *> its dimension. The first line contains the dimension (a
  623. *> single integer). The next N lines contain the matrix A, one
  624. *> row per line. The next N lines contain the matrix B. The
  625. *> next line contains the reciprocals of the eigenvalue
  626. *> condition numbers. The last line contains the reciprocals of
  627. *> the eigenvector condition numbers. The end of data is
  628. *> indicated by dimension N=0. Even if no data is to be tested,
  629. *> there must be at least one line containing N=0.
  630. *>
  631. *>-----------------------------------------------------------------------
  632. *>
  633. *> DGX input files:
  634. *>
  635. *> line 1: 'DGX' in columns 1 to 3.
  636. *>
  637. *> line 2: N, INTEGER
  638. *> Value of N.
  639. *>
  640. *> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
  641. *> These integer parameters determine how blocking is done
  642. *> (see ILAENV for details)
  643. *> NB : block size
  644. *> NBMIN : minimum block size
  645. *> NX : minimum dimension for blocking
  646. *> NS : number of shifts in xHGEQR
  647. *> NBCOL : minimum column dimension for blocking
  648. *>
  649. *> line 4: THRESH, REAL
  650. *> The test threshold against which computed residuals are
  651. *> compared. Should generally be in the range from 10. to 20.
  652. *> Information will be printed about each test for which the
  653. *> test ratio is greater than or equal to the threshold.
  654. *>
  655. *> line 5: TSTERR, LOGICAL
  656. *> Flag indicating whether or not to test the error exits for
  657. *> the LAPACK routines and driver routines.
  658. *>
  659. *> line 6: NEWSD, INTEGER
  660. *> A code indicating how to set the random number seed.
  661. *> = 0: Set the seed to a default value before each run
  662. *> = 1: Initialize the seed to a default value only before the
  663. *> first run
  664. *> = 2: Like 1, but use the seed values on the next line
  665. *>
  666. *> If line 6 was 2:
  667. *>
  668. *> line 7: INTEGER array, dimension (4)
  669. *> Four integer values for the random number seed.
  670. *>
  671. *> If line 2 was 0:
  672. *>
  673. *> line 7-EOF: Precomputed examples are tested.
  674. *>
  675. *> remaining lines : Each example is stored on 3+2*N lines, where N is
  676. *> its dimension. The first line contains the dimension (a
  677. *> single integer). The next line contains an integer k such
  678. *> that only the last k eigenvalues will be selected and appear
  679. *> in the leading diagonal blocks of $A$ and $B$. The next N
  680. *> lines contain the matrix A, one row per line. The next N
  681. *> lines contain the matrix B. The last line contains the
  682. *> reciprocal of the eigenvalue cluster condition number and the
  683. *> reciprocal of the deflating subspace (associated with the
  684. *> selected eigencluster) condition number. The end of data is
  685. *> indicated by dimension N=0. Even if no data is to be tested,
  686. *> there must be at least one line containing N=0.
  687. *>
  688. *>-----------------------------------------------------------------------
  689. *>
  690. *> DSB input file:
  691. *>
  692. *> line 2: NN, INTEGER
  693. *> Number of values of N.
  694. *>
  695. *> line 3: NVAL, INTEGER array, dimension (NN)
  696. *> The values for the matrix dimension N.
  697. *>
  698. *> line 4: NK, INTEGER
  699. *> Number of values of K.
  700. *>
  701. *> line 5: KVAL, INTEGER array, dimension (NK)
  702. *> The values for the matrix dimension K.
  703. *>
  704. *> line 6: THRESH
  705. *> Threshold value for the test ratios. Information will be
  706. *> printed about each test for which the test ratio is greater
  707. *> than or equal to the threshold.
  708. *>
  709. *> line 7: NEWSD, INTEGER
  710. *> A code indicating how to set the random number seed.
  711. *> = 0: Set the seed to a default value before each run
  712. *> = 1: Initialize the seed to a default value only before the
  713. *> first run
  714. *> = 2: Like 1, but use the seed values on the next line
  715. *>
  716. *> If line 7 was 2:
  717. *>
  718. *> line 8: INTEGER array, dimension (4)
  719. *> Four integer values for the random number seed.
  720. *>
  721. *> lines 8-EOF: Lines specifying matrix types, as for NEP.
  722. *> The 3-character path name is 'DSB'.
  723. *>
  724. *>-----------------------------------------------------------------------
  725. *>
  726. *> DBB input file:
  727. *>
  728. *> line 2: NN, INTEGER
  729. *> Number of values of M and N.
  730. *>
  731. *> line 3: MVAL, INTEGER array, dimension (NN)
  732. *> The values for the matrix row dimension M.
  733. *>
  734. *> line 4: NVAL, INTEGER array, dimension (NN)
  735. *> The values for the matrix column dimension N.
  736. *>
  737. *> line 4: NK, INTEGER
  738. *> Number of values of K.
  739. *>
  740. *> line 5: KVAL, INTEGER array, dimension (NK)
  741. *> The values for the matrix bandwidth K.
  742. *>
  743. *> line 6: NPARMS, INTEGER
  744. *> Number of values of the parameter NRHS
  745. *>
  746. *> line 7: NSVAL, INTEGER array, dimension (NPARMS)
  747. *> The values for the number of right hand sides NRHS.
  748. *>
  749. *> line 8: THRESH
  750. *> Threshold value for the test ratios. Information will be
  751. *> printed about each test for which the test ratio is greater
  752. *> than or equal to the threshold.
  753. *>
  754. *> line 9: NEWSD, INTEGER
  755. *> A code indicating how to set the random number seed.
  756. *> = 0: Set the seed to a default value before each run
  757. *> = 1: Initialize the seed to a default value only before the
  758. *> first run
  759. *> = 2: Like 1, but use the seed values on the next line
  760. *>
  761. *> If line 9 was 2:
  762. *>
  763. *> line 10: INTEGER array, dimension (4)
  764. *> Four integer values for the random number seed.
  765. *>
  766. *> lines 10-EOF: Lines specifying matrix types, as for SVD.
  767. *> The 3-character path name is 'DBB'.
  768. *>
  769. *>-----------------------------------------------------------------------
  770. *>
  771. *> DEC input file:
  772. *>
  773. *> line 2: THRESH, REAL
  774. *> Threshold value for the test ratios. Information will be
  775. *> printed about each test for which the test ratio is greater
  776. *> than or equal to the threshold.
  777. *>
  778. *> lines 3-EOF:
  779. *>
  780. *> Input for testing the eigencondition routines consists of a set of
  781. *> specially constructed test cases and their solutions. The data
  782. *> format is not intended to be modified by the user.
  783. *>
  784. *>-----------------------------------------------------------------------
  785. *>
  786. *> DBL and DBK input files:
  787. *>
  788. *> line 1: 'DBL' in columns 1-3 to test SGEBAL, or 'DBK' in
  789. *> columns 1-3 to test SGEBAK.
  790. *>
  791. *> The remaining lines consist of specially constructed test cases.
  792. *>
  793. *>-----------------------------------------------------------------------
  794. *>
  795. *> DGL and DGK input files:
  796. *>
  797. *> line 1: 'DGL' in columns 1-3 to test DGGBAL, or 'DGK' in
  798. *> columns 1-3 to test DGGBAK.
  799. *>
  800. *> The remaining lines consist of specially constructed test cases.
  801. *>
  802. *>-----------------------------------------------------------------------
  803. *>
  804. *> GLM data file:
  805. *>
  806. *> line 1: 'GLM' in columns 1 to 3.
  807. *>
  808. *> line 2: NN, INTEGER
  809. *> Number of values of M, P, and N.
  810. *>
  811. *> line 3: MVAL, INTEGER array, dimension(NN)
  812. *> Values of M (row dimension).
  813. *>
  814. *> line 4: PVAL, INTEGER array, dimension(NN)
  815. *> Values of P (row dimension).
  816. *>
  817. *> line 5: NVAL, INTEGER array, dimension(NN)
  818. *> Values of N (column dimension), note M <= N <= M+P.
  819. *>
  820. *> line 6: THRESH, REAL
  821. *> Threshold value for the test ratios. Information will be
  822. *> printed about each test for which the test ratio is greater
  823. *> than or equal to the threshold.
  824. *>
  825. *> line 7: TSTERR, LOGICAL
  826. *> Flag indicating whether or not to test the error exits for
  827. *> the LAPACK routines and driver routines.
  828. *>
  829. *> line 8: NEWSD, INTEGER
  830. *> A code indicating how to set the random number seed.
  831. *> = 0: Set the seed to a default value before each run
  832. *> = 1: Initialize the seed to a default value only before the
  833. *> first run
  834. *> = 2: Like 1, but use the seed values on the next line
  835. *>
  836. *> If line 8 was 2:
  837. *>
  838. *> line 9: INTEGER array, dimension (4)
  839. *> Four integer values for the random number seed.
  840. *>
  841. *> lines 9-EOF: Lines specifying matrix types, as for NEP.
  842. *> The 3-character path name is 'GLM' for the generalized
  843. *> linear regression model routines.
  844. *>
  845. *>-----------------------------------------------------------------------
  846. *>
  847. *> GQR data file:
  848. *>
  849. *> line 1: 'GQR' in columns 1 to 3.
  850. *>
  851. *> line 2: NN, INTEGER
  852. *> Number of values of M, P, and N.
  853. *>
  854. *> line 3: MVAL, INTEGER array, dimension(NN)
  855. *> Values of M.
  856. *>
  857. *> line 4: PVAL, INTEGER array, dimension(NN)
  858. *> Values of P.
  859. *>
  860. *> line 5: NVAL, INTEGER array, dimension(NN)
  861. *> Values of N.
  862. *>
  863. *> line 6: THRESH, REAL
  864. *> Threshold value for the test ratios. Information will be
  865. *> printed about each test for which the test ratio is greater
  866. *> than or equal to the threshold.
  867. *>
  868. *> line 7: TSTERR, LOGICAL
  869. *> Flag indicating whether or not to test the error exits for
  870. *> the LAPACK routines and driver routines.
  871. *>
  872. *> line 8: NEWSD, INTEGER
  873. *> A code indicating how to set the random number seed.
  874. *> = 0: Set the seed to a default value before each run
  875. *> = 1: Initialize the seed to a default value only before the
  876. *> first run
  877. *> = 2: Like 1, but use the seed values on the next line
  878. *>
  879. *> If line 8 was 2:
  880. *>
  881. *> line 9: INTEGER array, dimension (4)
  882. *> Four integer values for the random number seed.
  883. *>
  884. *> lines 9-EOF: Lines specifying matrix types, as for NEP.
  885. *> The 3-character path name is 'GQR' for the generalized
  886. *> QR and RQ routines.
  887. *>
  888. *>-----------------------------------------------------------------------
  889. *>
  890. *> GSV data file:
  891. *>
  892. *> line 1: 'GSV' in columns 1 to 3.
  893. *>
  894. *> line 2: NN, INTEGER
  895. *> Number of values of M, P, and N.
  896. *>
  897. *> line 3: MVAL, INTEGER array, dimension(NN)
  898. *> Values of M (row dimension).
  899. *>
  900. *> line 4: PVAL, INTEGER array, dimension(NN)
  901. *> Values of P (row dimension).
  902. *>
  903. *> line 5: NVAL, INTEGER array, dimension(NN)
  904. *> Values of N (column dimension).
  905. *>
  906. *> line 6: THRESH, REAL
  907. *> Threshold value for the test ratios. Information will be
  908. *> printed about each test for which the test ratio is greater
  909. *> than or equal to the threshold.
  910. *>
  911. *> line 7: TSTERR, LOGICAL
  912. *> Flag indicating whether or not to test the error exits for
  913. *> the LAPACK routines and driver routines.
  914. *>
  915. *> line 8: NEWSD, INTEGER
  916. *> A code indicating how to set the random number seed.
  917. *> = 0: Set the seed to a default value before each run
  918. *> = 1: Initialize the seed to a default value only before the
  919. *> first run
  920. *> = 2: Like 1, but use the seed values on the next line
  921. *>
  922. *> If line 8 was 2:
  923. *>
  924. *> line 9: INTEGER array, dimension (4)
  925. *> Four integer values for the random number seed.
  926. *>
  927. *> lines 9-EOF: Lines specifying matrix types, as for NEP.
  928. *> The 3-character path name is 'GSV' for the generalized
  929. *> SVD routines.
  930. *>
  931. *>-----------------------------------------------------------------------
  932. *>
  933. *> CSD data file:
  934. *>
  935. *> line 1: 'CSD' in columns 1 to 3.
  936. *>
  937. *> line 2: NM, INTEGER
  938. *> Number of values of M, P, and N.
  939. *>
  940. *> line 3: MVAL, INTEGER array, dimension(NM)
  941. *> Values of M (row and column dimension of orthogonal matrix).
  942. *>
  943. *> line 4: PVAL, INTEGER array, dimension(NM)
  944. *> Values of P (row dimension of top-left block).
  945. *>
  946. *> line 5: NVAL, INTEGER array, dimension(NM)
  947. *> Values of N (column dimension of top-left block).
  948. *>
  949. *> line 6: THRESH, REAL
  950. *> Threshold value for the test ratios. Information will be
  951. *> printed about each test for which the test ratio is greater
  952. *> than or equal to the threshold.
  953. *>
  954. *> line 7: TSTERR, LOGICAL
  955. *> Flag indicating whether or not to test the error exits for
  956. *> the LAPACK routines and driver routines.
  957. *>
  958. *> line 8: NEWSD, INTEGER
  959. *> A code indicating how to set the random number seed.
  960. *> = 0: Set the seed to a default value before each run
  961. *> = 1: Initialize the seed to a default value only before the
  962. *> first run
  963. *> = 2: Like 1, but use the seed values on the next line
  964. *>
  965. *> If line 8 was 2:
  966. *>
  967. *> line 9: INTEGER array, dimension (4)
  968. *> Four integer values for the random number seed.
  969. *>
  970. *> lines 9-EOF: Lines specifying matrix types, as for NEP.
  971. *> The 3-character path name is 'CSD' for the CSD routine.
  972. *>
  973. *>-----------------------------------------------------------------------
  974. *>
  975. *> LSE data file:
  976. *>
  977. *> line 1: 'LSE' in columns 1 to 3.
  978. *>
  979. *> line 2: NN, INTEGER
  980. *> Number of values of M, P, and N.
  981. *>
  982. *> line 3: MVAL, INTEGER array, dimension(NN)
  983. *> Values of M.
  984. *>
  985. *> line 4: PVAL, INTEGER array, dimension(NN)
  986. *> Values of P.
  987. *>
  988. *> line 5: NVAL, INTEGER array, dimension(NN)
  989. *> Values of N, note P <= N <= P+M.
  990. *>
  991. *> line 6: THRESH, REAL
  992. *> Threshold value for the test ratios. Information will be
  993. *> printed about each test for which the test ratio is greater
  994. *> than or equal to the threshold.
  995. *>
  996. *> line 7: TSTERR, LOGICAL
  997. *> Flag indicating whether or not to test the error exits for
  998. *> the LAPACK routines and driver routines.
  999. *>
  1000. *> line 8: NEWSD, INTEGER
  1001. *> A code indicating how to set the random number seed.
  1002. *> = 0: Set the seed to a default value before each run
  1003. *> = 1: Initialize the seed to a default value only before the
  1004. *> first run
  1005. *> = 2: Like 1, but use the seed values on the next line
  1006. *>
  1007. *> If line 8 was 2:
  1008. *>
  1009. *> line 9: INTEGER array, dimension (4)
  1010. *> Four integer values for the random number seed.
  1011. *>
  1012. *> lines 9-EOF: Lines specifying matrix types, as for NEP.
  1013. *> The 3-character path name is 'GSV' for the generalized
  1014. *> SVD routines.
  1015. *>
  1016. *>-----------------------------------------------------------------------
  1017. *>
  1018. *> NMAX is currently set to 132 and must be at least 12 for some of the
  1019. *> precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
  1020. *> statements below. For SVD, we assume NRHS may be as big as N. The
  1021. *> parameter NEED is set to 14 to allow for 14 N-by-N matrices for DGG.
  1022. *> \endverbatim
  1023. *
  1024. * Arguments:
  1025. * ==========
  1026. *
  1027. *
  1028. * Authors:
  1029. * ========
  1030. *
  1031. *> \author Univ. of Tennessee
  1032. *> \author Univ. of California Berkeley
  1033. *> \author Univ. of Colorado Denver
  1034. *> \author NAG Ltd.
  1035. *
  1036. *> \ingroup double_eig
  1037. *
  1038. * =====================================================================
  1039. PROGRAM DCHKEE
  1040. *
  1041. #if defined(_OPENMP)
  1042. use omp_lib
  1043. #endif
  1044. *
  1045. * -- LAPACK test routine --
  1046. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  1047. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  1048. *
  1049. * =====================================================================
  1050. *
  1051. * .. Parameters ..
  1052. INTEGER NMAX
  1053. PARAMETER ( NMAX = 132 )
  1054. INTEGER NCMAX
  1055. PARAMETER ( NCMAX = 20 )
  1056. INTEGER NEED
  1057. PARAMETER ( NEED = 14 )
  1058. INTEGER LWORK
  1059. PARAMETER ( LWORK = NMAX*( 5*NMAX+5 )+1 )
  1060. INTEGER LIWORK
  1061. PARAMETER ( LIWORK = NMAX*( 5*NMAX+20 ) )
  1062. INTEGER MAXIN
  1063. PARAMETER ( MAXIN = 20 )
  1064. INTEGER MAXT
  1065. PARAMETER ( MAXT = 30 )
  1066. INTEGER NIN, NOUT
  1067. PARAMETER ( NIN = 5, NOUT = 6 )
  1068. * ..
  1069. * .. Local Scalars ..
  1070. LOGICAL CSD, DBB, DGG, DSB, FATAL, GLM, GQR, GSV, LSE,
  1071. $ NEP, DBK, DBL, SEP, DES, DEV, DGK, DGL, DGS,
  1072. $ DGV, DGX, DSX, SVD, DVX, DXV, TSTCHK, TSTDIF,
  1073. $ TSTDRV, TSTERR
  1074. CHARACTER C1
  1075. CHARACTER*3 C3, PATH
  1076. CHARACTER*32 VNAME
  1077. CHARACTER*10 INTSTR
  1078. CHARACTER*80 LINE
  1079. INTEGER I, I1, IC, INFO, ITMP, K, LENP, MAXTYP, NEWSD,
  1080. $ NK, NN, NPARMS, NRHS, NTYPES,
  1081. $ VERS_MAJOR, VERS_MINOR, VERS_PATCH, N_THREADS
  1082. DOUBLE PRECISION EPS, S1, S2, THRESH, THRSHN
  1083. * ..
  1084. * .. Local Arrays ..
  1085. LOGICAL DOTYPE( MAXT ), LOGWRK( NMAX )
  1086. INTEGER IOLDSD( 4 ), ISEED( 4 ), IWORK( LIWORK ),
  1087. $ KVAL( MAXIN ), MVAL( MAXIN ), MXBVAL( MAXIN ),
  1088. $ NBCOL( MAXIN ), NBMIN( MAXIN ), NBVAL( MAXIN ),
  1089. $ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ),
  1090. $ PVAL( MAXIN )
  1091. INTEGER INMIN( MAXIN ), INWIN( MAXIN ), INIBL( MAXIN ),
  1092. $ ISHFTS( MAXIN ), IACC22( MAXIN )
  1093. DOUBLE PRECISION D( NMAX, 12 ), RESULT( 500 ), TAUA( NMAX ),
  1094. $ TAUB( NMAX ), X( 5*NMAX )
  1095. * ..
  1096. * .. Allocatable Arrays ..
  1097. INTEGER AllocateStatus
  1098. DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: WORK
  1099. DOUBLE PRECISION, DIMENSION(:,:), ALLOCATABLE :: A, B, C
  1100. * ..
  1101. * .. External Functions ..
  1102. LOGICAL LSAMEN
  1103. DOUBLE PRECISION DLAMCH, DSECND
  1104. EXTERNAL LSAMEN, DLAMCH, DSECND
  1105. * ..
  1106. * .. External Subroutines ..
  1107. EXTERNAL ALAREQ, DCHKBB, DCHKBD, DCHKBK, DCHKBL, DCHKEC,
  1108. $ DCHKGG, DCHKGK, DCHKGL, DCHKHS, DCHKSB, DCHKST,
  1109. $ DCKCSD, DCKGLM, DCKGQR, DCKGSV, DCKLSE, DDRGES,
  1110. $ DDRGEV, DDRGSX, DDRGVX, DDRVBD, DDRVES, DDRVEV,
  1111. $ DDRVSG, DDRVST, DDRVSX, DDRVVX, DERRBD,
  1112. $ DERRED, DERRGG, DERRHS, DERRST, ILAVER, XLAENV,
  1113. $ DDRGES3, DDRGEV3,
  1114. $ DCHKST2STG, DDRVST2STG, DCHKSB2STG, DDRVSG2STG
  1115. * ..
  1116. * .. Intrinsic Functions ..
  1117. INTRINSIC LEN, MIN
  1118. * ..
  1119. * .. Scalars in Common ..
  1120. LOGICAL LERR, OK
  1121. CHARACTER*32 SRNAMT
  1122. INTEGER INFOT, MAXB, NPROC, NSHIFT, NUNIT, SELDIM,
  1123. $ SELOPT
  1124. * ..
  1125. * .. Arrays in Common ..
  1126. LOGICAL SELVAL( 20 )
  1127. INTEGER IPARMS( 100 )
  1128. DOUBLE PRECISION SELWI( 20 ), SELWR( 20 )
  1129. * ..
  1130. * .. Common blocks ..
  1131. COMMON / CENVIR / NPROC, NSHIFT, MAXB
  1132. COMMON / INFOC / INFOT, NUNIT, OK, LERR
  1133. COMMON / SRNAMC / SRNAMT
  1134. COMMON / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
  1135. COMMON / CLAENV / IPARMS
  1136. * ..
  1137. * .. Data statements ..
  1138. DATA INTSTR / '0123456789' /
  1139. DATA IOLDSD / 0, 0, 0, 1 /
  1140. * ..
  1141. * .. Allocate memory dynamically ..
  1142. *
  1143. ALLOCATE ( A(NMAX*NMAX,NEED), STAT = AllocateStatus )
  1144. IF (AllocateStatus /= 0) STOP "*** Not enough memory ***"
  1145. ALLOCATE ( B(NMAX*NMAX,5), STAT = AllocateStatus )
  1146. IF (AllocateStatus /= 0) STOP "*** Not enough memory ***"
  1147. ALLOCATE ( C(NCMAX*NCMAX,NCMAX*NCMAX), STAT = AllocateStatus )
  1148. IF (AllocateStatus /= 0) STOP "*** Not enough memory ***"
  1149. ALLOCATE ( WORK(LWORK), STAT = AllocateStatus )
  1150. IF (AllocateStatus /= 0) STOP "*** Not enough memory ***"
  1151. * ..
  1152. * .. Executable Statements ..
  1153. *
  1154. A = 0.0
  1155. B = 0.0
  1156. C = 0.0
  1157. D = 0.0
  1158. S1 = DSECND( )
  1159. FATAL = .FALSE.
  1160. NUNIT = NOUT
  1161. *
  1162. * Return to here to read multiple sets of data
  1163. *
  1164. 10 CONTINUE
  1165. *
  1166. * Read the first line and set the 3-character test path
  1167. *
  1168. READ( NIN, FMT = '(A80)', END = 380 )LINE
  1169. PATH = LINE( 1: 3 )
  1170. NEP = LSAMEN( 3, PATH, 'NEP' ) .OR. LSAMEN( 3, PATH, 'DHS' )
  1171. SEP = LSAMEN( 3, PATH, 'SEP' ) .OR. LSAMEN( 3, PATH, 'DST' ) .OR.
  1172. $ LSAMEN( 3, PATH, 'DSG' ) .OR. LSAMEN( 3, PATH, 'SE2' )
  1173. SVD = LSAMEN( 3, PATH, 'SVD' ) .OR. LSAMEN( 3, PATH, 'DBD' )
  1174. DEV = LSAMEN( 3, PATH, 'DEV' )
  1175. DES = LSAMEN( 3, PATH, 'DES' )
  1176. DVX = LSAMEN( 3, PATH, 'DVX' )
  1177. DSX = LSAMEN( 3, PATH, 'DSX' )
  1178. DGG = LSAMEN( 3, PATH, 'DGG' )
  1179. DGS = LSAMEN( 3, PATH, 'DGS' )
  1180. DGX = LSAMEN( 3, PATH, 'DGX' )
  1181. DGV = LSAMEN( 3, PATH, 'DGV' )
  1182. DXV = LSAMEN( 3, PATH, 'DXV' )
  1183. DSB = LSAMEN( 3, PATH, 'DSB' )
  1184. DBB = LSAMEN( 3, PATH, 'DBB' )
  1185. GLM = LSAMEN( 3, PATH, 'GLM' )
  1186. GQR = LSAMEN( 3, PATH, 'GQR' ) .OR. LSAMEN( 3, PATH, 'GRQ' )
  1187. GSV = LSAMEN( 3, PATH, 'GSV' )
  1188. CSD = LSAMEN( 3, PATH, 'CSD' )
  1189. LSE = LSAMEN( 3, PATH, 'LSE' )
  1190. DBL = LSAMEN( 3, PATH, 'DBL' )
  1191. DBK = LSAMEN( 3, PATH, 'DBK' )
  1192. DGL = LSAMEN( 3, PATH, 'DGL' )
  1193. DGK = LSAMEN( 3, PATH, 'DGK' )
  1194. *
  1195. * Report values of parameters.
  1196. *
  1197. IF( PATH.EQ.' ' ) THEN
  1198. GO TO 10
  1199. ELSE IF( NEP ) THEN
  1200. WRITE( NOUT, FMT = 9987 )
  1201. ELSE IF( SEP ) THEN
  1202. WRITE( NOUT, FMT = 9986 )
  1203. ELSE IF( SVD ) THEN
  1204. WRITE( NOUT, FMT = 9985 )
  1205. ELSE IF( DEV ) THEN
  1206. WRITE( NOUT, FMT = 9979 )
  1207. ELSE IF( DES ) THEN
  1208. WRITE( NOUT, FMT = 9978 )
  1209. ELSE IF( DVX ) THEN
  1210. WRITE( NOUT, FMT = 9977 )
  1211. ELSE IF( DSX ) THEN
  1212. WRITE( NOUT, FMT = 9976 )
  1213. ELSE IF( DGG ) THEN
  1214. WRITE( NOUT, FMT = 9975 )
  1215. ELSE IF( DGS ) THEN
  1216. WRITE( NOUT, FMT = 9964 )
  1217. ELSE IF( DGX ) THEN
  1218. WRITE( NOUT, FMT = 9965 )
  1219. ELSE IF( DGV ) THEN
  1220. WRITE( NOUT, FMT = 9963 )
  1221. ELSE IF( DXV ) THEN
  1222. WRITE( NOUT, FMT = 9962 )
  1223. ELSE IF( DSB ) THEN
  1224. WRITE( NOUT, FMT = 9974 )
  1225. ELSE IF( DBB ) THEN
  1226. WRITE( NOUT, FMT = 9967 )
  1227. ELSE IF( GLM ) THEN
  1228. WRITE( NOUT, FMT = 9971 )
  1229. ELSE IF( GQR ) THEN
  1230. WRITE( NOUT, FMT = 9970 )
  1231. ELSE IF( GSV ) THEN
  1232. WRITE( NOUT, FMT = 9969 )
  1233. ELSE IF( CSD ) THEN
  1234. WRITE( NOUT, FMT = 9960 )
  1235. ELSE IF( LSE ) THEN
  1236. WRITE( NOUT, FMT = 9968 )
  1237. ELSE IF( DBL ) THEN
  1238. *
  1239. * DGEBAL: Balancing
  1240. *
  1241. CALL DCHKBL( NIN, NOUT )
  1242. GO TO 10
  1243. ELSE IF( DBK ) THEN
  1244. *
  1245. * DGEBAK: Back transformation
  1246. *
  1247. CALL DCHKBK( NIN, NOUT )
  1248. GO TO 10
  1249. ELSE IF( DGL ) THEN
  1250. *
  1251. * DGGBAL: Balancing
  1252. *
  1253. CALL DCHKGL( NIN, NOUT )
  1254. GO TO 10
  1255. ELSE IF( DGK ) THEN
  1256. *
  1257. * DGGBAK: Back transformation
  1258. *
  1259. CALL DCHKGK( NIN, NOUT )
  1260. GO TO 10
  1261. ELSE IF( LSAMEN( 3, PATH, 'DEC' ) ) THEN
  1262. *
  1263. * DEC: Eigencondition estimation
  1264. *
  1265. READ( NIN, FMT = * )THRESH
  1266. CALL XLAENV( 1, 1 )
  1267. CALL XLAENV( 12, 11 )
  1268. CALL XLAENV( 13, 2 )
  1269. CALL XLAENV( 14, 0 )
  1270. CALL XLAENV( 15, 2 )
  1271. CALL XLAENV( 16, 2 )
  1272. TSTERR = .TRUE.
  1273. CALL DCHKEC( THRESH, TSTERR, NIN, NOUT )
  1274. GO TO 10
  1275. ELSE
  1276. WRITE( NOUT, FMT = 9992 )PATH
  1277. GO TO 10
  1278. END IF
  1279. CALL ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
  1280. WRITE( NOUT, FMT = 9972 ) VERS_MAJOR, VERS_MINOR, VERS_PATCH
  1281. WRITE( NOUT, FMT = 9984 )
  1282. *
  1283. * Read the number of values of M, P, and N.
  1284. *
  1285. READ( NIN, FMT = * )NN
  1286. IF( NN.LT.0 ) THEN
  1287. WRITE( NOUT, FMT = 9989 )' NN ', NN, 1
  1288. NN = 0
  1289. FATAL = .TRUE.
  1290. ELSE IF( NN.GT.MAXIN ) THEN
  1291. WRITE( NOUT, FMT = 9988 )' NN ', NN, MAXIN
  1292. NN = 0
  1293. FATAL = .TRUE.
  1294. END IF
  1295. *
  1296. * Read the values of M
  1297. *
  1298. IF( .NOT.( DGX .OR. DXV ) ) THEN
  1299. READ( NIN, FMT = * )( MVAL( I ), I = 1, NN )
  1300. IF( SVD ) THEN
  1301. VNAME = ' M '
  1302. ELSE
  1303. VNAME = ' N '
  1304. END IF
  1305. DO 20 I = 1, NN
  1306. IF( MVAL( I ).LT.0 ) THEN
  1307. WRITE( NOUT, FMT = 9989 )VNAME, MVAL( I ), 0
  1308. FATAL = .TRUE.
  1309. ELSE IF( MVAL( I ).GT.NMAX ) THEN
  1310. WRITE( NOUT, FMT = 9988 )VNAME, MVAL( I ), NMAX
  1311. FATAL = .TRUE.
  1312. END IF
  1313. 20 CONTINUE
  1314. WRITE( NOUT, FMT = 9983 )'M: ', ( MVAL( I ), I = 1, NN )
  1315. END IF
  1316. *
  1317. * Read the values of P
  1318. *
  1319. IF( GLM .OR. GQR .OR. GSV .OR. CSD .OR. LSE ) THEN
  1320. READ( NIN, FMT = * )( PVAL( I ), I = 1, NN )
  1321. DO 30 I = 1, NN
  1322. IF( PVAL( I ).LT.0 ) THEN
  1323. WRITE( NOUT, FMT = 9989 )' P ', PVAL( I ), 0
  1324. FATAL = .TRUE.
  1325. ELSE IF( PVAL( I ).GT.NMAX ) THEN
  1326. WRITE( NOUT, FMT = 9988 )' P ', PVAL( I ), NMAX
  1327. FATAL = .TRUE.
  1328. END IF
  1329. 30 CONTINUE
  1330. WRITE( NOUT, FMT = 9983 )'P: ', ( PVAL( I ), I = 1, NN )
  1331. END IF
  1332. *
  1333. * Read the values of N
  1334. *
  1335. IF( SVD .OR. DBB .OR. GLM .OR. GQR .OR. GSV .OR. CSD .OR.
  1336. $ LSE ) THEN
  1337. READ( NIN, FMT = * )( NVAL( I ), I = 1, NN )
  1338. DO 40 I = 1, NN
  1339. IF( NVAL( I ).LT.0 ) THEN
  1340. WRITE( NOUT, FMT = 9989 )' N ', NVAL( I ), 0
  1341. FATAL = .TRUE.
  1342. ELSE IF( NVAL( I ).GT.NMAX ) THEN
  1343. WRITE( NOUT, FMT = 9988 )' N ', NVAL( I ), NMAX
  1344. FATAL = .TRUE.
  1345. END IF
  1346. 40 CONTINUE
  1347. ELSE
  1348. DO 50 I = 1, NN
  1349. NVAL( I ) = MVAL( I )
  1350. 50 CONTINUE
  1351. END IF
  1352. IF( .NOT.( DGX .OR. DXV ) ) THEN
  1353. WRITE( NOUT, FMT = 9983 )'N: ', ( NVAL( I ), I = 1, NN )
  1354. ELSE
  1355. WRITE( NOUT, FMT = 9983 )'N: ', NN
  1356. END IF
  1357. *
  1358. * Read the number of values of K, followed by the values of K
  1359. *
  1360. IF( DSB .OR. DBB ) THEN
  1361. READ( NIN, FMT = * )NK
  1362. READ( NIN, FMT = * )( KVAL( I ), I = 1, NK )
  1363. DO 60 I = 1, NK
  1364. IF( KVAL( I ).LT.0 ) THEN
  1365. WRITE( NOUT, FMT = 9989 )' K ', KVAL( I ), 0
  1366. FATAL = .TRUE.
  1367. ELSE IF( KVAL( I ).GT.NMAX ) THEN
  1368. WRITE( NOUT, FMT = 9988 )' K ', KVAL( I ), NMAX
  1369. FATAL = .TRUE.
  1370. END IF
  1371. 60 CONTINUE
  1372. WRITE( NOUT, FMT = 9983 )'K: ', ( KVAL( I ), I = 1, NK )
  1373. END IF
  1374. *
  1375. IF( DEV .OR. DES .OR. DVX .OR. DSX ) THEN
  1376. *
  1377. * For the nonsymmetric QR driver routines, only one set of
  1378. * parameters is allowed.
  1379. *
  1380. READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
  1381. $ INMIN( 1 ), INWIN( 1 ), INIBL(1), ISHFTS(1), IACC22(1)
  1382. IF( NBVAL( 1 ).LT.1 ) THEN
  1383. WRITE( NOUT, FMT = 9989 )' NB ', NBVAL( 1 ), 1
  1384. FATAL = .TRUE.
  1385. ELSE IF( NBMIN( 1 ).LT.1 ) THEN
  1386. WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
  1387. FATAL = .TRUE.
  1388. ELSE IF( NXVAL( 1 ).LT.1 ) THEN
  1389. WRITE( NOUT, FMT = 9989 )' NX ', NXVAL( 1 ), 1
  1390. FATAL = .TRUE.
  1391. ELSE IF( INMIN( 1 ).LT.1 ) THEN
  1392. WRITE( NOUT, FMT = 9989 )' INMIN ', INMIN( 1 ), 1
  1393. FATAL = .TRUE.
  1394. ELSE IF( INWIN( 1 ).LT.1 ) THEN
  1395. WRITE( NOUT, FMT = 9989 )' INWIN ', INWIN( 1 ), 1
  1396. FATAL = .TRUE.
  1397. ELSE IF( INIBL( 1 ).LT.1 ) THEN
  1398. WRITE( NOUT, FMT = 9989 )' INIBL ', INIBL( 1 ), 1
  1399. FATAL = .TRUE.
  1400. ELSE IF( ISHFTS( 1 ).LT.1 ) THEN
  1401. WRITE( NOUT, FMT = 9989 )' ISHFTS ', ISHFTS( 1 ), 1
  1402. FATAL = .TRUE.
  1403. ELSE IF( IACC22( 1 ).LT.0 ) THEN
  1404. WRITE( NOUT, FMT = 9989 )' IACC22 ', IACC22( 1 ), 0
  1405. FATAL = .TRUE.
  1406. END IF
  1407. CALL XLAENV( 1, NBVAL( 1 ) )
  1408. CALL XLAENV( 2, NBMIN( 1 ) )
  1409. CALL XLAENV( 3, NXVAL( 1 ) )
  1410. CALL XLAENV(12, MAX( 11, INMIN( 1 ) ) )
  1411. CALL XLAENV(13, INWIN( 1 ) )
  1412. CALL XLA

Large files files are truncated, but you can click here to view the full file