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.

schkqrt.f 5.2 kB

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