LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
zchksy_rook.f
Go to the documentation of this file.
1*> \brief \b ZCHKSY_ROOK
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 ZCHKSY_ROOK( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
12* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
13* XACT, WORK, RWORK, IWORK, NOUT )
14*
15* .. Scalar Arguments ..
16* LOGICAL TSTERR
17* INTEGER NMAX, NN, NNB, NNS, NOUT
18* DOUBLE PRECISION THRESH
19* ..
20* .. Array Arguments ..
21* LOGICAL DOTYPE( * )
22* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
23* DOUBLE PRECISION RWORK( * )
24* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
25* $ WORK( * ), X( * ), XACT( * )
26* ..
27*
28*
29*> \par Purpose:
30* =============
31*>
32*> \verbatim
33*>
34*> ZCHKSY_ROOK tests ZSYTRF_ROOK, -TRI_ROOK, -TRS_ROOK,
35*> and -CON_ROOK.
36*> \endverbatim
37*
38* Arguments:
39* ==========
40*
41*> \param[in] DOTYPE
42*> \verbatim
43*> DOTYPE is LOGICAL array, dimension (NTYPES)
44*> The matrix types to be used for testing. Matrices of type j
45*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
46*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
47*> \endverbatim
48*>
49*> \param[in] NN
50*> \verbatim
51*> NN is INTEGER
52*> The number of values of N contained in the vector NVAL.
53*> \endverbatim
54*>
55*> \param[in] NVAL
56*> \verbatim
57*> NVAL is INTEGER array, dimension (NN)
58*> The values of the matrix dimension N.
59*> \endverbatim
60*>
61*> \param[in] NNB
62*> \verbatim
63*> NNB is INTEGER
64*> The number of values of NB contained in the vector NBVAL.
65*> \endverbatim
66*>
67*> \param[in] NBVAL
68*> \verbatim
69*> NBVAL is INTEGER array, dimension (NNB)
70*> The values of the blocksize NB.
71*> \endverbatim
72*>
73*> \param[in] NNS
74*> \verbatim
75*> NNS is INTEGER
76*> The number of values of NRHS contained in the vector NSVAL.
77*> \endverbatim
78*>
79*> \param[in] NSVAL
80*> \verbatim
81*> NSVAL is INTEGER array, dimension (NNS)
82*> The values of the number of right hand sides NRHS.
83*> \endverbatim
84*>
85*> \param[in] THRESH
86*> \verbatim
87*> THRESH is DOUBLE PRECISION
88*> The threshold value for the test ratios. A result is
89*> included in the output file if RESULT >= THRESH. To have
90*> every test ratio printed, use THRESH = 0.
91*> \endverbatim
92*>
93*> \param[in] TSTERR
94*> \verbatim
95*> TSTERR is LOGICAL
96*> Flag that indicates whether error exits are to be tested.
97*> \endverbatim
98*>
99*> \param[in] NMAX
100*> \verbatim
101*> NMAX is INTEGER
102*> The maximum value permitted for N, used in dimensioning the
103*> work arrays.
104*> \endverbatim
105*>
106*> \param[out] A
107*> \verbatim
108*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
109*> \endverbatim
110*>
111*> \param[out] AFAC
112*> \verbatim
113*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
114*> \endverbatim
115*>
116*> \param[out] AINV
117*> \verbatim
118*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
119*> \endverbatim
120*>
121*> \param[out] B
122*> \verbatim
123*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
124*> where NSMAX is the largest entry in NSVAL.
125*> \endverbatim
126*>
127*> \param[out] X
128*> \verbatim
129*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
130*> \endverbatim
131*>
132*> \param[out] XACT
133*> \verbatim
134*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
135*> \endverbatim
136*>
137*> \param[out] WORK
138*> \verbatim
139*> WORK is COMPLEX*16 array, dimension (NMAX*max(3,NSMAX))
140*> \endverbatim
141*>
142*> \param[out] RWORK
143*> \verbatim
144*> RWORK is DOUBLE PRECISION array, dimension (max(NMAX,2*NSMAX))
145*> \endverbatim
146*>
147*> \param[out] IWORK
148*> \verbatim
149*> IWORK is INTEGER array, dimension (2*NMAX)
150*> \endverbatim
151*>
152*> \param[in] NOUT
153*> \verbatim
154*> NOUT is INTEGER
155*> The unit number for output.
156*> \endverbatim
157*
158* Authors:
159* ========
160*
161*> \author Univ. of Tennessee
162*> \author Univ. of California Berkeley
163*> \author Univ. of Colorado Denver
164*> \author NAG Ltd.
165*
166*> \ingroup complex16_lin
167*
168* =====================================================================
169 SUBROUTINE zchksy_rook( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
170 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
171 $ XACT, WORK, RWORK, IWORK, NOUT )
172*
173* -- LAPACK test routine --
174* -- LAPACK is a software package provided by Univ. of Tennessee, --
175* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
176*
177* .. Scalar Arguments ..
178 LOGICAL TSTERR
179 INTEGER NMAX, NN, NNB, NNS, NOUT
180 DOUBLE PRECISION THRESH
181* ..
182* .. Array Arguments ..
183 LOGICAL DOTYPE( * )
184 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
185 DOUBLE PRECISION RWORK( * )
186 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
187 $ work( * ), x( * ), xact( * )
188* ..
189*
190* =====================================================================
191*
192* .. Parameters ..
193 DOUBLE PRECISION ZERO, ONE
194 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
195 DOUBLE PRECISION ONEHALF
196 parameter( onehalf = 0.5d+0 )
197 DOUBLE PRECISION EIGHT, SEVTEN
198 parameter( eight = 8.0d+0, sevten = 17.0d+0 )
199 COMPLEX*16 CZERO
200 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
201 INTEGER NTYPES
202 parameter( ntypes = 11 )
203 INTEGER NTESTS
204 parameter( ntests = 7 )
205* ..
206* .. Local Scalars ..
207 LOGICAL TRFCON, ZEROT
208 CHARACTER DIST, TYPE, UPLO, XTYPE
209 CHARACTER*3 PATH, MATPATH
210 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
211 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
212 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
213 DOUBLE PRECISION ALPHA, ANORM, CNDNUM, CONST, DTEMP, SING_MAX,
214 $ SING_MIN, RCOND, RCONDC
215* ..
216* .. Local Arrays ..
217 CHARACTER UPLOS( 2 )
218 INTEGER ISEED( 4 ), ISEEDY( 4 )
219 DOUBLE PRECISION RESULT( NTESTS )
220 COMPLEX*16 BLOCK( 2, 2 ), ZDUMMY( 1 )
221* ..
222* .. External Functions ..
223 DOUBLE PRECISION DGET06, ZLANGE, ZLANSY
224 EXTERNAL DGET06, ZLANGE, ZLANSY
225* ..
226* .. External Subroutines ..
227 EXTERNAL alaerh, alahd, alasum, zerrsy, zgesvd, zget04,
231* ..
232* .. Intrinsic Functions ..
233 INTRINSIC max, min, sqrt
234* ..
235* .. Scalars in Common ..
236 LOGICAL LERR, OK
237 CHARACTER*32 SRNAMT
238 INTEGER INFOT, NUNIT
239* ..
240* .. Common blocks ..
241 COMMON / infoc / infot, nunit, ok, lerr
242 COMMON / srnamc / srnamt
243* ..
244* .. Data statements ..
245 DATA iseedy / 1988, 1989, 1990, 1991 /
246 DATA uplos / 'U', 'L' /
247* ..
248* .. Executable Statements ..
249*
250* Initialize constants and the random number seed.
251*
252 alpha = ( one+sqrt( sevten ) ) / eight
253*
254* Test path
255*
256 path( 1: 1 ) = 'Zomplex precision'
257 path( 2: 3 ) = 'SR'
258*
259* Path to generate matrices
260*
261 matpath( 1: 1 ) = 'Zomplex precision'
262 matpath( 2: 3 ) = 'SY'
263*
264 nrun = 0
265 nfail = 0
266 nerrs = 0
267 DO 10 i = 1, 4
268 iseed( i ) = iseedy( i )
269 10 CONTINUE
270*
271* Test the error exits
272*
273 IF( tsterr )
274 $ CALL zerrsy( path, nout )
275 infot = 0
276*
277* Set the minimum block size for which the block routine should
278* be used, which will be later returned by ILAENV
279*
280 CALL xlaenv( 2, 2 )
281*
282* Do for each value of N in NVAL
283*
284 DO 270 in = 1, nn
285 n = nval( in )
286 lda = max( n, 1 )
287 xtype = 'N'
288 nimat = ntypes
289 IF( n.LE.0 )
290 $ nimat = 1
291*
292 izero = 0
293*
294* Do for each value of matrix type IMAT
295*
296 DO 260 imat = 1, nimat
297*
298* Do the tests only if DOTYPE( IMAT ) is true.
299*
300 IF( .NOT.dotype( imat ) )
301 $ GO TO 260
302*
303* Skip types 3, 4, 5, or 6 if the matrix size is too small.
304*
305 zerot = imat.GE.3 .AND. imat.LE.6
306 IF( zerot .AND. n.LT.imat-2 )
307 $ GO TO 260
308*
309* Do first for UPLO = 'U', then for UPLO = 'L'
310*
311 DO 250 iuplo = 1, 2
312 uplo = uplos( iuplo )
313*
314* Begin generate test matrix A.
315*
316 IF( imat.NE.ntypes ) THEN
317*
318* Set up parameters with ZLATB4 for the matrix generator
319* based on the type of matrix to be generated.
320*
321 CALL zlatb4( matpath, imat, n, n, TYPE, kl, ku, anorm,
322 $ mode, cndnum, dist )
323*
324* Generate a matrix with ZLATMS.
325*
326 srnamt = 'ZLATMS'
327 CALL zlatms( n, n, dist, iseed, TYPE, rwork, mode,
328 $ cndnum, anorm, kl, ku, uplo, a, lda,
329 $ work, info )
330*
331* Check error code from ZLATMS and handle error.
332*
333 IF( info.NE.0 ) THEN
334 CALL alaerh( path, 'ZLATMS', info, 0, uplo, n, n,
335 $ -1, -1, -1, imat, nfail, nerrs, nout )
336*
337* Skip all tests for this generated matrix
338*
339 GO TO 250
340 END IF
341*
342* For matrix types 3-6, zero one or more rows and
343* columns of the matrix to test that INFO is returned
344* correctly.
345*
346 IF( zerot ) THEN
347 IF( imat.EQ.3 ) THEN
348 izero = 1
349 ELSE IF( imat.EQ.4 ) THEN
350 izero = n
351 ELSE
352 izero = n / 2 + 1
353 END IF
354*
355 IF( imat.LT.6 ) THEN
356*
357* Set row and column IZERO to zero.
358*
359 IF( iuplo.EQ.1 ) THEN
360 ioff = ( izero-1 )*lda
361 DO 20 i = 1, izero - 1
362 a( ioff+i ) = czero
363 20 CONTINUE
364 ioff = ioff + izero
365 DO 30 i = izero, n
366 a( ioff ) = czero
367 ioff = ioff + lda
368 30 CONTINUE
369 ELSE
370 ioff = izero
371 DO 40 i = 1, izero - 1
372 a( ioff ) = czero
373 ioff = ioff + lda
374 40 CONTINUE
375 ioff = ioff - izero
376 DO 50 i = izero, n
377 a( ioff+i ) = czero
378 50 CONTINUE
379 END IF
380 ELSE
381 IF( iuplo.EQ.1 ) THEN
382*
383* Set the first IZERO rows and columns to zero.
384*
385 ioff = 0
386 DO 70 j = 1, n
387 i2 = min( j, izero )
388 DO 60 i = 1, i2
389 a( ioff+i ) = czero
390 60 CONTINUE
391 ioff = ioff + lda
392 70 CONTINUE
393 ELSE
394*
395* Set the last IZERO rows and columns to zero.
396*
397 ioff = 0
398 DO 90 j = 1, n
399 i1 = max( j, izero )
400 DO 80 i = i1, n
401 a( ioff+i ) = czero
402 80 CONTINUE
403 ioff = ioff + lda
404 90 CONTINUE
405 END IF
406 END IF
407 ELSE
408 izero = 0
409 END IF
410*
411 ELSE
412*
413* For matrix kind IMAT = 11, generate special block
414* diagonal matrix to test alternate code
415* for the 2 x 2 blocks.
416*
417 CALL zlatsy( uplo, n, a, lda, iseed )
418*
419 END IF
420*
421* End generate test matrix A.
422*
423*
424* Do for each value of NB in NBVAL
425*
426 DO 240 inb = 1, nnb
427*
428* Set the optimal blocksize, which will be later
429* returned by ILAENV.
430*
431 nb = nbval( inb )
432 CALL xlaenv( 1, nb )
433*
434* Copy the test matrix A into matrix AFAC which
435* will be factorized in place. This is needed to
436* preserve the test matrix A for subsequent tests.
437*
438 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
439*
440* Compute the L*D*L**T or U*D*U**T factorization of the
441* matrix. IWORK stores details of the interchanges and
442* the block structure of D. AINV is a work array for
443* block factorization, LWORK is the length of AINV.
444*
445 lwork = max( 2, nb )*lda
446 srnamt = 'ZSYTRF_ROOK'
447 CALL zsytrf_rook( uplo, n, afac, lda, iwork, ainv,
448 $ lwork, info )
449*
450* Adjust the expected value of INFO to account for
451* pivoting.
452*
453 k = izero
454 IF( k.GT.0 ) THEN
455 100 CONTINUE
456 IF( iwork( k ).LT.0 ) THEN
457 IF( iwork( k ).NE.-k ) THEN
458 k = -iwork( k )
459 GO TO 100
460 END IF
461 ELSE IF( iwork( k ).NE.k ) THEN
462 k = iwork( k )
463 GO TO 100
464 END IF
465 END IF
466*
467* Check error code from ZSYTRF_ROOK and handle error.
468*
469 IF( info.NE.k)
470 $ CALL alaerh( path, 'ZSYTRF_ROOK', info, k,
471 $ uplo, n, n, -1, -1, nb, imat,
472 $ nfail, nerrs, nout )
473*
474* Set the condition estimate flag if the INFO is not 0.
475*
476 IF( info.NE.0 ) THEN
477 trfcon = .true.
478 ELSE
479 trfcon = .false.
480 END IF
481*
482*+ TEST 1
483* Reconstruct matrix from factors and compute residual.
484*
485 CALL zsyt01_rook( uplo, n, a, lda, afac, lda, iwork,
486 $ ainv, lda, rwork, result( 1 ) )
487 nt = 1
488*
489*+ TEST 2
490* Form the inverse and compute the residual,
491* if the factorization was competed without INFO > 0
492* (i.e. there is no zero rows and columns).
493* Do it only for the first block size.
494*
495 IF( inb.EQ.1 .AND. .NOT.trfcon ) THEN
496 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
497 srnamt = 'ZSYTRI_ROOK'
498 CALL zsytri_rook( uplo, n, ainv, lda, iwork, work,
499 $ info )
500*
501* Check error code from ZSYTRI_ROOK and handle error.
502*
503 IF( info.NE.0 )
504 $ CALL alaerh( path, 'ZSYTRI_ROOK', info, -1,
505 $ uplo, n, n, -1, -1, -1, imat,
506 $ nfail, nerrs, nout )
507*
508* Compute the residual for a symmetric matrix times
509* its inverse.
510*
511 CALL zsyt03( uplo, n, a, lda, ainv, lda, work, lda,
512 $ rwork, rcondc, result( 2 ) )
513 nt = 2
514 END IF
515*
516* Print information about the tests that did not pass
517* the threshold.
518*
519 DO 110 k = 1, nt
520 IF( result( k ).GE.thresh ) THEN
521 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
522 $ CALL alahd( nout, path )
523 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
524 $ result( k )
525 nfail = nfail + 1
526 END IF
527 110 CONTINUE
528 nrun = nrun + nt
529*
530*+ TEST 3
531* Compute largest element in U or L
532*
533 result( 3 ) = zero
534 dtemp = zero
535*
536 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) ) /
537 $ ( one-alpha )
538*
539 IF( iuplo.EQ.1 ) THEN
540*
541* Compute largest element in U
542*
543 k = n
544 120 CONTINUE
545 IF( k.LE.1 )
546 $ GO TO 130
547*
548 IF( iwork( k ).GT.zero ) THEN
549*
550* Get max absolute value from elements
551* in column k in in U
552*
553 dtemp = zlange( 'M', k-1, 1,
554 $ afac( ( k-1 )*lda+1 ), lda, rwork )
555 ELSE
556*
557* Get max absolute value from elements
558* in columns k and k-1 in U
559*
560 dtemp = zlange( 'M', k-2, 2,
561 $ afac( ( k-2 )*lda+1 ), lda, rwork )
562 k = k - 1
563*
564 END IF
565*
566* DTEMP should be bounded by CONST
567*
568 dtemp = dtemp - const + thresh
569 IF( dtemp.GT.result( 3 ) )
570 $ result( 3 ) = dtemp
571*
572 k = k - 1
573*
574 GO TO 120
575 130 CONTINUE
576*
577 ELSE
578*
579* Compute largest element in L
580*
581 k = 1
582 140 CONTINUE
583 IF( k.GE.n )
584 $ GO TO 150
585*
586 IF( iwork( k ).GT.zero ) THEN
587*
588* Get max absolute value from elements
589* in column k in in L
590*
591 dtemp = zlange( 'M', n-k, 1,
592 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
593 ELSE
594*
595* Get max absolute value from elements
596* in columns k and k+1 in L
597*
598 dtemp = zlange( 'M', n-k-1, 2,
599 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
600 k = k + 1
601*
602 END IF
603*
604* DTEMP should be bounded by CONST
605*
606 dtemp = dtemp - const + thresh
607 IF( dtemp.GT.result( 3 ) )
608 $ result( 3 ) = dtemp
609*
610 k = k + 1
611*
612 GO TO 140
613 150 CONTINUE
614 END IF
615*
616*
617*+ TEST 4
618* Compute largest 2-Norm (condition number)
619* of 2-by-2 diag blocks
620*
621 result( 4 ) = zero
622 dtemp = zero
623*
624 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) )*
625 $ ( ( one + alpha ) / ( one - alpha ) )
626*
627 IF( iuplo.EQ.1 ) THEN
628*
629* Loop backward for UPLO = 'U'
630*
631 k = n
632 160 CONTINUE
633 IF( k.LE.1 )
634 $ GO TO 170
635*
636 IF( iwork( k ).LT.zero ) THEN
637*
638* Get the two singular values
639* (real and non-negative) of a 2-by-2 block,
640* store them in RWORK array
641*
642 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
643 block( 1, 2 ) = afac( (k-1)*lda+k-1 )
644 block( 2, 1 ) = block( 1, 2 )
645 block( 2, 2 ) = afac( (k-1)*lda+k )
646*
647 CALL zgesvd( 'N', 'N', 2, 2, block, 2, rwork,
648 $ zdummy, 1, zdummy, 1,
649 $ work, 6, rwork( 3 ), info )
650*
651*
652 sing_max = rwork( 1 )
653 sing_min = rwork( 2 )
654*
655 dtemp = sing_max / sing_min
656*
657* DTEMP should be bounded by CONST
658*
659 dtemp = dtemp - const + thresh
660 IF( dtemp.GT.result( 4 ) )
661 $ result( 4 ) = dtemp
662 k = k - 1
663*
664 END IF
665*
666 k = k - 1
667*
668 GO TO 160
669 170 CONTINUE
670*
671 ELSE
672*
673* Loop forward for UPLO = 'L'
674*
675 k = 1
676 180 CONTINUE
677 IF( k.GE.n )
678 $ GO TO 190
679*
680 IF( iwork( k ).LT.zero ) THEN
681*
682* Get the two singular values
683* (real and non-negative) of a 2-by-2 block,
684* store them in RWORK array
685*
686 block( 1, 1 ) = afac( ( k-1 )*lda+k )
687 block( 2, 1 ) = afac( ( k-1 )*lda+k+1 )
688 block( 1, 2 ) = block( 2, 1 )
689 block( 2, 2 ) = afac( k*lda+k+1 )
690*
691 CALL zgesvd( 'N', 'N', 2, 2, block, 2, rwork,
692 $ zdummy, 1, zdummy, 1,
693 $ work, 6, rwork(3), info )
694*
695 sing_max = rwork( 1 )
696 sing_min = rwork( 2 )
697*
698 dtemp = sing_max / sing_min
699*
700* DTEMP should be bounded by CONST
701*
702 dtemp = dtemp - const + thresh
703 IF( dtemp.GT.result( 4 ) )
704 $ result( 4 ) = dtemp
705 k = k + 1
706*
707 END IF
708*
709 k = k + 1
710*
711 GO TO 180
712 190 CONTINUE
713 END IF
714*
715* Print information about the tests that did not pass
716* the threshold.
717*
718 DO 200 k = 3, 4
719 IF( result( k ).GE.thresh ) THEN
720 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
721 $ CALL alahd( nout, path )
722 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
723 $ result( k )
724 nfail = nfail + 1
725 END IF
726 200 CONTINUE
727 nrun = nrun + 2
728*
729* Skip the other tests if this is not the first block
730* size.
731*
732 IF( inb.GT.1 )
733 $ GO TO 240
734*
735* Do only the condition estimate if INFO is not 0.
736*
737 IF( trfcon ) THEN
738 rcondc = zero
739 GO TO 230
740 END IF
741*
742* Do for each value of NRHS in NSVAL.
743*
744 DO 220 irhs = 1, nns
745 nrhs = nsval( irhs )
746*
747*+ TEST 5 ( Using TRS_ROOK)
748* Solve and compute residual for A * X = B.
749*
750* Choose a set of NRHS random solution vectors
751* stored in XACT and set up the right hand side B
752*
753 srnamt = 'ZLARHS'
754 CALL zlarhs( matpath, xtype, uplo, ' ', n, n,
755 $ kl, ku, nrhs, a, lda, xact, lda,
756 $ b, lda, iseed, info )
757 CALL zlacpy( 'Full', n, nrhs, b, lda, x, lda )
758*
759 srnamt = 'ZSYTRS_ROOK'
760 CALL zsytrs_rook( uplo, n, nrhs, afac, lda, iwork,
761 $ x, lda, info )
762*
763* Check error code from ZSYTRS_ROOK and handle error.
764*
765 IF( info.NE.0 )
766 $ CALL alaerh( path, 'ZSYTRS_ROOK', info, 0,
767 $ uplo, n, n, -1, -1, nrhs, imat,
768 $ nfail, nerrs, nout )
769*
770 CALL zlacpy( 'Full', n, nrhs, b, lda, work, lda )
771*
772* Compute the residual for the solution
773*
774 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
775 $ lda, rwork, result( 5 ) )
776*
777*+ TEST 6
778* Check solution from generated exact solution.
779*
780 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
781 $ result( 6 ) )
782*
783* Print information about the tests that did not pass
784* the threshold.
785*
786 DO 210 k = 5, 6
787 IF( result( k ).GE.thresh ) THEN
788 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
789 $ CALL alahd( nout, path )
790 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
791 $ imat, k, result( k )
792 nfail = nfail + 1
793 END IF
794 210 CONTINUE
795 nrun = nrun + 2
796*
797* End do for each value of NRHS in NSVAL.
798*
799 220 CONTINUE
800*
801*+ TEST 7
802* Get an estimate of RCOND = 1/CNDNUM.
803*
804 230 CONTINUE
805 anorm = zlansy( '1', uplo, n, a, lda, rwork )
806 srnamt = 'ZSYCON_ROOK'
807 CALL zsycon_rook( uplo, n, afac, lda, iwork, anorm,
808 $ rcond, work, info )
809*
810* Check error code from ZSYCON_ROOK and handle error.
811*
812 IF( info.NE.0 )
813 $ CALL alaerh( path, 'ZSYCON_ROOK', info, 0,
814 $ uplo, n, n, -1, -1, -1, imat,
815 $ nfail, nerrs, nout )
816*
817* Compute the test ratio to compare values of RCOND
818*
819 result( 7 ) = dget06( rcond, rcondc )
820*
821* Print information about the tests that did not pass
822* the threshold.
823*
824 IF( result( 7 ).GE.thresh ) THEN
825 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
826 $ CALL alahd( nout, path )
827 WRITE( nout, fmt = 9997 )uplo, n, imat, 7,
828 $ result( 7 )
829 nfail = nfail + 1
830 END IF
831 nrun = nrun + 1
832 240 CONTINUE
833*
834 250 CONTINUE
835 260 CONTINUE
836 270 CONTINUE
837*
838* Print a summary of the results.
839*
840 CALL alasum( path, nout, nfail, nrun, nerrs )
841*
842 9999 FORMAT( ' UPLO = ''', a1, ''', N =', i5, ', NB =', i4, ', type ',
843 $ i2, ', test ', i2, ', ratio =', g12.5 )
844 9998 FORMAT( ' UPLO = ''', a1, ''', N =', i5, ', NRHS=', i3, ', type ',
845 $ i2, ', test(', i2, ') =', g12.5 )
846 9997 FORMAT( ' UPLO = ''', a1, ''', N =', i5, ',', 10x, ' type ', i2,
847 $ ', test(', i2, ') =', g12.5 )
848 RETURN
849*
850* End of ZCHKSY_ROOK
851*
852 END
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
Definition alasum.f:73
subroutine xlaenv(ispec, nvalue)
XLAENV
Definition xlaenv.f:81
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
Definition zlarhs.f:208
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
Definition alaerh.f:147
subroutine alahd(iounit, path)
ALAHD
Definition alahd.f:107
subroutine zgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)
ZGESVD computes the singular value decomposition (SVD) for GE matrices
Definition zgesvd.f:214
subroutine zsycon_rook(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
ZSYCON_ROOK
subroutine zsytrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRF_ROOK
subroutine zsytri_rook(uplo, n, a, lda, ipiv, work, info)
ZSYTRI_ROOK
subroutine zsytrs_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
ZSYTRS_ROOK
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
Definition zlacpy.f:103
subroutine zchksy_rook(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZCHKSY_ROOK
subroutine zerrsy(path, nunit)
ZERRSY
Definition zerrsy.f:55
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
Definition zget04.f:102
subroutine zlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
ZLATB4
Definition zlatb4.f:121
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS
Definition zlatms.f:332
subroutine zlatsy(uplo, n, x, ldx, iseed)
ZLATSY
Definition zlatsy.f:89
subroutine zsyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01_ROOK
subroutine zsyt02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZSYT02
Definition zsyt02.f:127
subroutine zsyt03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
ZSYT03
Definition zsyt03.f:126