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.

ddrvrfp.f 20 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. *> \brief \b DDRVRFP
  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 DDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
  12. * + THRESH, A, ASAV, AFAC, AINV, B,
  13. * + BSAV, XACT, X, ARF, ARFINV,
  14. * + D_WORK_DLATMS, D_WORK_DPOT01, D_TEMP_DPOT02,
  15. * + D_TEMP_DPOT03, D_WORK_DLANSY,
  16. * + D_WORK_DPOT02, D_WORK_DPOT03 )
  17. *
  18. * .. Scalar Arguments ..
  19. * INTEGER NN, NNS, NNT, NOUT
  20. * DOUBLE PRECISION THRESH
  21. * ..
  22. * .. Array Arguments ..
  23. * INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
  24. * DOUBLE PRECISION A( * )
  25. * DOUBLE PRECISION AINV( * )
  26. * DOUBLE PRECISION ASAV( * )
  27. * DOUBLE PRECISION B( * )
  28. * DOUBLE PRECISION BSAV( * )
  29. * DOUBLE PRECISION AFAC( * )
  30. * DOUBLE PRECISION ARF( * )
  31. * DOUBLE PRECISION ARFINV( * )
  32. * DOUBLE PRECISION XACT( * )
  33. * DOUBLE PRECISION X( * )
  34. * DOUBLE PRECISION D_WORK_DLATMS( * )
  35. * DOUBLE PRECISION D_WORK_DPOT01( * )
  36. * DOUBLE PRECISION D_TEMP_DPOT02( * )
  37. * DOUBLE PRECISION D_TEMP_DPOT03( * )
  38. * DOUBLE PRECISION D_WORK_DLANSY( * )
  39. * DOUBLE PRECISION D_WORK_DPOT02( * )
  40. * DOUBLE PRECISION D_WORK_DPOT03( * )
  41. * ..
  42. *
  43. *
  44. *> \par Purpose:
  45. * =============
  46. *>
  47. *> \verbatim
  48. *>
  49. *> DDRVRFP tests the LAPACK RFP routines:
  50. *> DPFTRF, DPFTRS, and DPFTRI.
  51. *>
  52. *> This testing routine follow the same tests as DDRVPO (test for the full
  53. *> format Symmetric Positive Definite solver).
  54. *>
  55. *> The tests are performed in Full Format, conversion back and forth from
  56. *> full format to RFP format are performed using the routines DTRTTF and
  57. *> DTFTTR.
  58. *>
  59. *> First, a specific matrix A of size N is created. There is nine types of
  60. *> different matrixes possible.
  61. *> 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
  62. *> 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
  63. *> *3. First row and column zero 8. Scaled near underflow
  64. *> *4. Last row and column zero 9. Scaled near overflow
  65. *> *5. Middle row and column zero
  66. *> (* - tests error exits from DPFTRF, no test ratios are computed)
  67. *> A solution XACT of size N-by-NRHS is created and the associated right
  68. *> hand side B as well. Then DPFTRF is called to compute L (or U), the
  69. *> Cholesky factor of A. Then L (or U) is used to solve the linear system
  70. *> of equations AX = B. This gives X. Then L (or U) is used to compute the
  71. *> inverse of A, AINV. The following four tests are then performed:
  72. *> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
  73. *> norm( U'*U - A ) / ( N * norm(A) * EPS ),
  74. *> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
  75. *> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
  76. *> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
  77. *> where EPS is the machine precision, RCOND the condition number of A, and
  78. *> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
  79. *> Errors occur when INFO parameter is not as expected. Failures occur when
  80. *> a test ratios is greater than THRES.
  81. *> \endverbatim
  82. *
  83. * Arguments:
  84. * ==========
  85. *
  86. *> \param[in] NOUT
  87. *> \verbatim
  88. *> NOUT is INTEGER
  89. *> The unit number for output.
  90. *> \endverbatim
  91. *>
  92. *> \param[in] NN
  93. *> \verbatim
  94. *> NN is INTEGER
  95. *> The number of values of N contained in the vector NVAL.
  96. *> \endverbatim
  97. *>
  98. *> \param[in] NVAL
  99. *> \verbatim
  100. *> NVAL is INTEGER array, dimension (NN)
  101. *> The values of the matrix dimension N.
  102. *> \endverbatim
  103. *>
  104. *> \param[in] NNS
  105. *> \verbatim
  106. *> NNS is INTEGER
  107. *> The number of values of NRHS contained in the vector NSVAL.
  108. *> \endverbatim
  109. *>
  110. *> \param[in] NSVAL
  111. *> \verbatim
  112. *> NSVAL is INTEGER array, dimension (NNS)
  113. *> The values of the number of right-hand sides NRHS.
  114. *> \endverbatim
  115. *>
  116. *> \param[in] NNT
  117. *> \verbatim
  118. *> NNT is INTEGER
  119. *> The number of values of MATRIX TYPE contained in the vector NTVAL.
  120. *> \endverbatim
  121. *>
  122. *> \param[in] NTVAL
  123. *> \verbatim
  124. *> NTVAL is INTEGER array, dimension (NNT)
  125. *> The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
  126. *> \endverbatim
  127. *>
  128. *> \param[in] THRESH
  129. *> \verbatim
  130. *> THRESH is DOUBLE PRECISION
  131. *> The threshold value for the test ratios. A result is
  132. *> included in the output file if RESULT >= THRESH. To have
  133. *> every test ratio printed, use THRESH = 0.
  134. *> \endverbatim
  135. *>
  136. *> \param[out] A
  137. *> \verbatim
  138. *> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
  139. *> \endverbatim
  140. *>
  141. *> \param[out] ASAV
  142. *> \verbatim
  143. *> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
  144. *> \endverbatim
  145. *>
  146. *> \param[out] AFAC
  147. *> \verbatim
  148. *> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
  149. *> \endverbatim
  150. *>
  151. *> \param[out] AINV
  152. *> \verbatim
  153. *> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
  154. *> \endverbatim
  155. *>
  156. *> \param[out] B
  157. *> \verbatim
  158. *> B is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
  159. *> \endverbatim
  160. *>
  161. *> \param[out] BSAV
  162. *> \verbatim
  163. *> BSAV is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
  164. *> \endverbatim
  165. *>
  166. *> \param[out] XACT
  167. *> \verbatim
  168. *> XACT is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
  169. *> \endverbatim
  170. *>
  171. *> \param[out] X
  172. *> \verbatim
  173. *> X is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
  174. *> \endverbatim
  175. *>
  176. *> \param[out] ARF
  177. *> \verbatim
  178. *> ARF is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
  179. *> \endverbatim
  180. *>
  181. *> \param[out] ARFINV
  182. *> \verbatim
  183. *> ARFINV is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
  184. *> \endverbatim
  185. *>
  186. *> \param[out] D_WORK_DLATMS
  187. *> \verbatim
  188. *> D_WORK_DLATMS is DOUBLE PRECISION array, dimension ( 3*NMAX )
  189. *> \endverbatim
  190. *>
  191. *> \param[out] D_WORK_DPOT01
  192. *> \verbatim
  193. *> D_WORK_DPOT01 is DOUBLE PRECISION array, dimension ( NMAX )
  194. *> \endverbatim
  195. *>
  196. *> \param[out] D_TEMP_DPOT02
  197. *> \verbatim
  198. *> D_TEMP_DPOT02 is DOUBLE PRECISION array, dimension ( NMAX*MAXRHS )
  199. *> \endverbatim
  200. *>
  201. *> \param[out] D_TEMP_DPOT03
  202. *> \verbatim
  203. *> D_TEMP_DPOT03 is DOUBLE PRECISION array, dimension ( NMAX*NMAX )
  204. *> \endverbatim
  205. *>
  206. *> \param[out] D_WORK_DLANSY
  207. *> \verbatim
  208. *> D_WORK_DLANSY is DOUBLE PRECISION array, dimension ( NMAX )
  209. *> \endverbatim
  210. *>
  211. *> \param[out] D_WORK_DPOT02
  212. *> \verbatim
  213. *> D_WORK_DPOT02 is DOUBLE PRECISION array, dimension ( NMAX )
  214. *> \endverbatim
  215. *>
  216. *> \param[out] D_WORK_DPOT03
  217. *> \verbatim
  218. *> D_WORK_DPOT03 is DOUBLE PRECISION array, dimension ( NMAX )
  219. *> \endverbatim
  220. *
  221. * Authors:
  222. * ========
  223. *
  224. *> \author Univ. of Tennessee
  225. *> \author Univ. of California Berkeley
  226. *> \author Univ. of Colorado Denver
  227. *> \author NAG Ltd.
  228. *
  229. *> \ingroup double_lin
  230. *
  231. * =====================================================================
  232. SUBROUTINE DDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
  233. + THRESH, A, ASAV, AFAC, AINV, B,
  234. + BSAV, XACT, X, ARF, ARFINV,
  235. + D_WORK_DLATMS, D_WORK_DPOT01, D_TEMP_DPOT02,
  236. + D_TEMP_DPOT03, D_WORK_DLANSY,
  237. + D_WORK_DPOT02, D_WORK_DPOT03 )
  238. *
  239. * -- LAPACK test routine --
  240. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  241. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  242. *
  243. * .. Scalar Arguments ..
  244. INTEGER NN, NNS, NNT, NOUT
  245. DOUBLE PRECISION THRESH
  246. * ..
  247. * .. Array Arguments ..
  248. INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
  249. DOUBLE PRECISION A( * )
  250. DOUBLE PRECISION AINV( * )
  251. DOUBLE PRECISION ASAV( * )
  252. DOUBLE PRECISION B( * )
  253. DOUBLE PRECISION BSAV( * )
  254. DOUBLE PRECISION AFAC( * )
  255. DOUBLE PRECISION ARF( * )
  256. DOUBLE PRECISION ARFINV( * )
  257. DOUBLE PRECISION XACT( * )
  258. DOUBLE PRECISION X( * )
  259. DOUBLE PRECISION D_WORK_DLATMS( * )
  260. DOUBLE PRECISION D_WORK_DPOT01( * )
  261. DOUBLE PRECISION D_TEMP_DPOT02( * )
  262. DOUBLE PRECISION D_TEMP_DPOT03( * )
  263. DOUBLE PRECISION D_WORK_DLANSY( * )
  264. DOUBLE PRECISION D_WORK_DPOT02( * )
  265. DOUBLE PRECISION D_WORK_DPOT03( * )
  266. * ..
  267. *
  268. * =====================================================================
  269. *
  270. * .. Parameters ..
  271. DOUBLE PRECISION ONE, ZERO
  272. PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
  273. INTEGER NTESTS
  274. PARAMETER ( NTESTS = 4 )
  275. * ..
  276. * .. Local Scalars ..
  277. LOGICAL ZEROT
  278. INTEGER I, INFO, IUPLO, LDA, LDB, IMAT, NERRS, NFAIL,
  279. + NRHS, NRUN, IZERO, IOFF, K, NT, N, IFORM, IIN,
  280. + IIT, IIS
  281. CHARACTER DIST, CTYPE, UPLO, CFORM
  282. INTEGER KL, KU, MODE
  283. DOUBLE PRECISION ANORM, AINVNM, CNDNUM, RCONDC
  284. * ..
  285. * .. Local Arrays ..
  286. CHARACTER UPLOS( 2 ), FORMS( 2 )
  287. INTEGER ISEED( 4 ), ISEEDY( 4 )
  288. DOUBLE PRECISION RESULT( NTESTS )
  289. * ..
  290. * .. External Functions ..
  291. DOUBLE PRECISION DLANSY
  292. EXTERNAL DLANSY
  293. * ..
  294. * .. External Subroutines ..
  295. EXTERNAL ALADHD, ALAERH, ALASVM, DGET04, DTFTTR, DLACPY,
  296. + DLARHS, DLATB4, DLATMS, DPFTRI, DPFTRF, DPFTRS,
  297. + DPOT01, DPOT02, DPOT03, DPOTRI, DPOTRF, DTRTTF
  298. * ..
  299. * .. Scalars in Common ..
  300. CHARACTER*32 SRNAMT
  301. * ..
  302. * .. Common blocks ..
  303. COMMON / SRNAMC / SRNAMT
  304. * ..
  305. * .. Data statements ..
  306. DATA ISEEDY / 1988, 1989, 1990, 1991 /
  307. DATA UPLOS / 'U', 'L' /
  308. DATA FORMS / 'N', 'T' /
  309. * ..
  310. * .. Executable Statements ..
  311. *
  312. * Initialize constants and the random number seed.
  313. *
  314. NRUN = 0
  315. NFAIL = 0
  316. NERRS = 0
  317. DO 10 I = 1, 4
  318. ISEED( I ) = ISEEDY( I )
  319. 10 CONTINUE
  320. *
  321. DO 130 IIN = 1, NN
  322. *
  323. N = NVAL( IIN )
  324. LDA = MAX( N, 1 )
  325. LDB = MAX( N, 1 )
  326. *
  327. DO 980 IIS = 1, NNS
  328. *
  329. NRHS = NSVAL( IIS )
  330. *
  331. DO 120 IIT = 1, NNT
  332. *
  333. IMAT = NTVAL( IIT )
  334. *
  335. * If N.EQ.0, only consider the first type
  336. *
  337. IF( N.EQ.0 .AND. IIT.GE.1 ) GO TO 120
  338. *
  339. * Skip types 3, 4, or 5 if the matrix size is too small.
  340. *
  341. IF( IMAT.EQ.4 .AND. N.LE.1 ) GO TO 120
  342. IF( IMAT.EQ.5 .AND. N.LE.2 ) GO TO 120
  343. *
  344. * Do first for UPLO = 'U', then for UPLO = 'L'
  345. *
  346. DO 110 IUPLO = 1, 2
  347. UPLO = UPLOS( IUPLO )
  348. *
  349. * Do first for CFORM = 'N', then for CFORM = 'C'
  350. *
  351. DO 100 IFORM = 1, 2
  352. CFORM = FORMS( IFORM )
  353. *
  354. * Set up parameters with DLATB4 and generate a test
  355. * matrix with DLATMS.
  356. *
  357. CALL DLATB4( 'DPO', IMAT, N, N, CTYPE, KL, KU,
  358. + ANORM, MODE, CNDNUM, DIST )
  359. *
  360. SRNAMT = 'DLATMS'
  361. CALL DLATMS( N, N, DIST, ISEED, CTYPE,
  362. + D_WORK_DLATMS,
  363. + MODE, CNDNUM, ANORM, KL, KU, UPLO, A,
  364. + LDA, D_WORK_DLATMS, INFO )
  365. *
  366. * Check error code from DLATMS.
  367. *
  368. IF( INFO.NE.0 ) THEN
  369. CALL ALAERH( 'DPF', 'DLATMS', INFO, 0, UPLO, N,
  370. + N, -1, -1, -1, IIT, NFAIL, NERRS,
  371. + NOUT )
  372. GO TO 100
  373. END IF
  374. *
  375. * For types 3-5, zero one row and column of the matrix to
  376. * test that INFO is returned correctly.
  377. *
  378. ZEROT = IMAT.GE.3 .AND. IMAT.LE.5
  379. IF( ZEROT ) THEN
  380. IF( IIT.EQ.3 ) THEN
  381. IZERO = 1
  382. ELSE IF( IIT.EQ.4 ) THEN
  383. IZERO = N
  384. ELSE
  385. IZERO = N / 2 + 1
  386. END IF
  387. IOFF = ( IZERO-1 )*LDA
  388. *
  389. * Set row and column IZERO of A to 0.
  390. *
  391. IF( IUPLO.EQ.1 ) THEN
  392. DO 20 I = 1, IZERO - 1
  393. A( IOFF+I ) = ZERO
  394. 20 CONTINUE
  395. IOFF = IOFF + IZERO
  396. DO 30 I = IZERO, N
  397. A( IOFF ) = ZERO
  398. IOFF = IOFF + LDA
  399. 30 CONTINUE
  400. ELSE
  401. IOFF = IZERO
  402. DO 40 I = 1, IZERO - 1
  403. A( IOFF ) = ZERO
  404. IOFF = IOFF + LDA
  405. 40 CONTINUE
  406. IOFF = IOFF - IZERO
  407. DO 50 I = IZERO, N
  408. A( IOFF+I ) = ZERO
  409. 50 CONTINUE
  410. END IF
  411. ELSE
  412. IZERO = 0
  413. END IF
  414. *
  415. * Save a copy of the matrix A in ASAV.
  416. *
  417. CALL DLACPY( UPLO, N, N, A, LDA, ASAV, LDA )
  418. *
  419. * Compute the condition number of A (RCONDC).
  420. *
  421. IF( ZEROT ) THEN
  422. RCONDC = ZERO
  423. ELSE
  424. *
  425. * Compute the 1-norm of A.
  426. *
  427. ANORM = DLANSY( '1', UPLO, N, A, LDA,
  428. + D_WORK_DLANSY )
  429. *
  430. * Factor the matrix A.
  431. *
  432. CALL DPOTRF( UPLO, N, A, LDA, INFO )
  433. *
  434. * Form the inverse of A.
  435. *
  436. CALL DPOTRI( UPLO, N, A, LDA, INFO )
  437. IF ( N .NE. 0 ) THEN
  438. *
  439. * Compute the 1-norm condition number of A.
  440. *
  441. AINVNM = DLANSY( '1', UPLO, N, A, LDA,
  442. + D_WORK_DLANSY )
  443. RCONDC = ( ONE / ANORM ) / AINVNM
  444. *
  445. * Restore the matrix A.
  446. *
  447. CALL DLACPY( UPLO, N, N, ASAV, LDA, A, LDA )
  448. END IF
  449. *
  450. END IF
  451. *
  452. * Form an exact solution and set the right hand side.
  453. *
  454. SRNAMT = 'DLARHS'
  455. CALL DLARHS( 'DPO', 'N', UPLO, ' ', N, N, KL, KU,
  456. + NRHS, A, LDA, XACT, LDA, B, LDA,
  457. + ISEED, INFO )
  458. CALL DLACPY( 'Full', N, NRHS, B, LDA, BSAV, LDA )
  459. *
  460. * Compute the L*L' or U'*U factorization of the
  461. * matrix and solve the system.
  462. *
  463. CALL DLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
  464. CALL DLACPY( 'Full', N, NRHS, B, LDB, X, LDB )
  465. *
  466. SRNAMT = 'DTRTTF'
  467. CALL DTRTTF( CFORM, UPLO, N, AFAC, LDA, ARF, INFO )
  468. SRNAMT = 'DPFTRF'
  469. CALL DPFTRF( CFORM, UPLO, N, ARF, INFO )
  470. *
  471. * Check error code from DPFTRF.
  472. *
  473. IF( INFO.NE.IZERO ) THEN
  474. *
  475. * LANGOU: there is a small hick here: IZERO should
  476. * always be INFO however if INFO is ZERO, ALAERH does not
  477. * complain.
  478. *
  479. CALL ALAERH( 'DPF', 'DPFSV ', INFO, IZERO,
  480. + UPLO, N, N, -1, -1, NRHS, IIT,
  481. + NFAIL, NERRS, NOUT )
  482. GO TO 100
  483. END IF
  484. *
  485. * Skip the tests if INFO is not 0.
  486. *
  487. IF( INFO.NE.0 ) THEN
  488. GO TO 100
  489. END IF
  490. *
  491. SRNAMT = 'DPFTRS'
  492. CALL DPFTRS( CFORM, UPLO, N, NRHS, ARF, X, LDB,
  493. + INFO )
  494. *
  495. SRNAMT = 'DTFTTR'
  496. CALL DTFTTR( CFORM, UPLO, N, ARF, AFAC, LDA, INFO )
  497. *
  498. * Reconstruct matrix from factors and compute
  499. * residual.
  500. *
  501. CALL DLACPY( UPLO, N, N, AFAC, LDA, ASAV, LDA )
  502. CALL DPOT01( UPLO, N, A, LDA, AFAC, LDA,
  503. + D_WORK_DPOT01, RESULT( 1 ) )
  504. CALL DLACPY( UPLO, N, N, ASAV, LDA, AFAC, LDA )
  505. *
  506. * Form the inverse and compute the residual.
  507. *
  508. IF(MOD(N,2).EQ.0)THEN
  509. CALL DLACPY( 'A', N+1, N/2, ARF, N+1, ARFINV,
  510. + N+1 )
  511. ELSE
  512. CALL DLACPY( 'A', N, (N+1)/2, ARF, N, ARFINV,
  513. + N )
  514. END IF
  515. *
  516. SRNAMT = 'DPFTRI'
  517. CALL DPFTRI( CFORM, UPLO, N, ARFINV , INFO )
  518. *
  519. SRNAMT = 'DTFTTR'
  520. CALL DTFTTR( CFORM, UPLO, N, ARFINV, AINV, LDA,
  521. + INFO )
  522. *
  523. * Check error code from DPFTRI.
  524. *
  525. IF( INFO.NE.0 )
  526. + CALL ALAERH( 'DPO', 'DPFTRI', INFO, 0, UPLO, N,
  527. + N, -1, -1, -1, IMAT, NFAIL, NERRS,
  528. + NOUT )
  529. *
  530. CALL DPOT03( UPLO, N, A, LDA, AINV, LDA,
  531. + D_TEMP_DPOT03, LDA, D_WORK_DPOT03,
  532. + RCONDC, RESULT( 2 ) )
  533. *
  534. * Compute residual of the computed solution.
  535. *
  536. CALL DLACPY( 'Full', N, NRHS, B, LDA,
  537. + D_TEMP_DPOT02, LDA )
  538. CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
  539. + D_TEMP_DPOT02, LDA, D_WORK_DPOT02,
  540. + RESULT( 3 ) )
  541. *
  542. * Check solution from generated exact solution.
  543. CALL DGET04( N, NRHS, X, LDA, XACT, LDA, RCONDC,
  544. + RESULT( 4 ) )
  545. NT = 4
  546. *
  547. * Print information about the tests that did not
  548. * pass the threshold.
  549. *
  550. DO 60 K = 1, NT
  551. IF( RESULT( K ).GE.THRESH ) THEN
  552. IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
  553. + CALL ALADHD( NOUT, 'DPF' )
  554. WRITE( NOUT, FMT = 9999 )'DPFSV ', UPLO,
  555. + N, IIT, K, RESULT( K )
  556. NFAIL = NFAIL + 1
  557. END IF
  558. 60 CONTINUE
  559. NRUN = NRUN + NT
  560. 100 CONTINUE
  561. 110 CONTINUE
  562. 120 CONTINUE
  563. 980 CONTINUE
  564. 130 CONTINUE
  565. *
  566. * Print a summary of the results.
  567. *
  568. CALL ALASVM( 'DPF', NOUT, NFAIL, NRUN, NERRS )
  569. *
  570. 9999 FORMAT( 1X, A6, ', UPLO=''', A1, ''', N =', I5, ', type ', I1,
  571. + ', test(', I1, ')=', G12.5 )
  572. *
  573. RETURN
  574. *
  575. * End of DDRVRFP
  576. *
  577. END