You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

zchkqrt.f 5.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. *> \brief \b ZCHKQRT
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. * Definition:
  9. * ===========
  10. *
  11. * SUBROUTINE ZCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
  12. * NBVAL, NOUT )
  13. * .. Scalar Arguments ..
  14. * LOGICAL TSTERR
  15. * INTEGER NM, NN, NNB, NOUT
  16. * DOUBLE PRECISION THRESH
  17. * ..
  18. * .. Array Arguments ..
  19. * INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
  20. *
  21. *> \par Purpose:
  22. * =============
  23. *>
  24. *> \verbatim
  25. *>
  26. *> ZCHKQRT tests ZGEQRT and ZGEMQRT.
  27. *> \endverbatim
  28. *
  29. * Arguments:
  30. * ==========
  31. *
  32. *> \param[in] THRESH
  33. *> \verbatim
  34. *> THRESH is DOUBLE PRECISION
  35. *> The threshold value for the test ratios. A result is
  36. *> included in the output file if RESULT >= THRESH. To have
  37. *> every test ratio printed, use THRESH = 0.
  38. *> \endverbatim
  39. *>
  40. *> \param[in] TSTERR
  41. *> \verbatim
  42. *> TSTERR is LOGICAL
  43. *> Flag that indicates whether error exits are to be tested.
  44. *> \endverbatim
  45. *>
  46. *> \param[in] NM
  47. *> \verbatim
  48. *> NM is INTEGER
  49. *> The number of values of M contained in the vector MVAL.
  50. *> \endverbatim
  51. *>
  52. *> \param[in] MVAL
  53. *> \verbatim
  54. *> MVAL is INTEGER array, dimension (NM)
  55. *> The values of the matrix row dimension M.
  56. *> \endverbatim
  57. *>
  58. *> \param[in] NN
  59. *> \verbatim
  60. *> NN is INTEGER
  61. *> The number of values of N contained in the vector NVAL.
  62. *> \endverbatim
  63. *>
  64. *> \param[in] NVAL
  65. *> \verbatim
  66. *> NVAL is INTEGER array, dimension (NN)
  67. *> The values of the matrix column dimension N.
  68. *> \endverbatim
  69. *>
  70. *> \param[in] NNB
  71. *> \verbatim
  72. *> NNB is INTEGER
  73. *> The number of values of NB contained in the vector NBVAL.
  74. *> \endverbatim
  75. *>
  76. *> \param[in] NBVAL
  77. *> \verbatim
  78. *> NBVAL is INTEGER array, dimension (NNB)
  79. *> The values of the blocksize NB.
  80. *> \endverbatim
  81. *>
  82. *> \param[in] NOUT
  83. *> \verbatim
  84. *> NOUT is INTEGER
  85. *> The unit number for output.
  86. *> \endverbatim
  87. *
  88. * Authors:
  89. * ========
  90. *
  91. *> \author Univ. of Tennessee
  92. *> \author Univ. of California Berkeley
  93. *> \author Univ. of Colorado Denver
  94. *> \author NAG Ltd.
  95. *
  96. *> \ingroup complex16_lin
  97. *
  98. * =====================================================================
  99. SUBROUTINE ZCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
  100. $ NBVAL, NOUT )
  101. IMPLICIT NONE
  102. *
  103. * -- LAPACK test routine --
  104. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  105. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  106. *
  107. * .. Scalar Arguments ..
  108. LOGICAL TSTERR
  109. INTEGER NM, NN, NNB, NOUT
  110. DOUBLE PRECISION THRESH
  111. * ..
  112. * .. Array Arguments ..
  113. INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
  114. * ..
  115. *
  116. * =====================================================================
  117. *
  118. * .. Parameters ..
  119. INTEGER NTESTS
  120. PARAMETER ( NTESTS = 6 )
  121. * ..
  122. * .. Local Scalars ..
  123. CHARACTER*3 PATH
  124. INTEGER I, J, K, T, M, N, NB, NFAIL, NERRS, NRUN,
  125. $ MINMN
  126. * ..
  127. * .. Local Arrays ..
  128. DOUBLE PRECISION RESULT( NTESTS )
  129. * ..
  130. * .. External Subroutines ..
  131. EXTERNAL ALAERH, ALAHD, ALASUM, ZERRQRT, ZQRT04
  132. * ..
  133. * .. Scalars in Common ..
  134. LOGICAL LERR, OK
  135. CHARACTER*32 SRNAMT
  136. INTEGER INFOT, NUNIT
  137. * ..
  138. * .. Common blocks ..
  139. COMMON / INFOC / INFOT, NUNIT, OK, LERR
  140. COMMON / SRNAMC / SRNAMT
  141. * ..
  142. * .. Executable Statements ..
  143. *
  144. * Initialize constants
  145. *
  146. PATH( 1: 1 ) = 'Z'
  147. PATH( 2: 3 ) = 'QT'
  148. NRUN = 0
  149. NFAIL = 0
  150. NERRS = 0
  151. *
  152. * Test the error exits
  153. *
  154. IF( TSTERR ) CALL ZERRQRT( PATH, NOUT )
  155. INFOT = 0
  156. *
  157. * Do for each value of M in MVAL.
  158. *
  159. DO I = 1, NM
  160. M = MVAL( I )
  161. *
  162. * Do for each value of N in NVAL.
  163. *
  164. DO J = 1, NN
  165. N = NVAL( J )
  166. *
  167. * Do for each possible value of NB
  168. *
  169. MINMN = MIN( M, N )
  170. DO K = 1, NNB
  171. NB = NBVAL( K )
  172. *
  173. * Test ZGEQRT and ZGEMQRT
  174. *
  175. IF( (NB.LE.MINMN).AND.(NB.GT.0) ) THEN
  176. CALL ZQRT04( M, N, NB, RESULT )
  177. *
  178. * Print information about the tests that did not
  179. * pass the threshold.
  180. *
  181. DO T = 1, NTESTS
  182. IF( RESULT( T ).GE.THRESH ) THEN
  183. IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
  184. $ CALL ALAHD( NOUT, PATH )
  185. WRITE( NOUT, FMT = 9999 )M, N, NB,
  186. $ T, RESULT( T )
  187. NFAIL = NFAIL + 1
  188. END IF
  189. END DO
  190. NRUN = NRUN + NTESTS
  191. END IF
  192. END DO
  193. END DO
  194. END DO
  195. *
  196. * Print a summary of the results.
  197. *
  198. CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
  199. *
  200. 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
  201. $ ' test(', I2, ')=', G12.5 )
  202. RETURN
  203. *
  204. * End of ZCHKQRT
  205. *
  206. END