8
9
10
11
12
13
14
15 CHARACTER SUBTESTS, UPLO
16 INTEGER IBTYPE, INFO, IPOSTPAD, IPREPAD, LDA, LIWORK,
17 $ LRWORK, LWORK, MATTYPE, N, NOUT, ORDER
18 REAL ABSTOL, THRESH
19
20
21 INTEGER DESCA( * ), ICLUSTR( * ), IFAIL( * ),
22 $ ISEED( 4 ), IWORK( * )
23 REAL GAP( * ), RWORK( * ), WIN( * ), WNEW( * )
24 COMPLEX A( LDA, * ), B( LDA, * ), COPYA( LDA, * ),
25 $ COPYB( LDA, * ), WORK( * ), Z( LDA, * )
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
219 $ MB_, NB_, RSRC_, CSRC_, LLD_
220 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
221 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
222 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
223 REAL ZERO, ONE, TEN, HALF
224 parameter( zero = 0.0e+0, one = 1.0e+0, ten = 10.0e+0,
225 $ half = 0.5e+0 )
226 COMPLEX PADVAL
227 parameter( padval = ( 19.25e+0, 1.1e+1 ) )
228 COMPLEX CZERO
229 parameter( czero = ( 0.0e+0, 0.0e+0 ) )
230 COMPLEX CONE
231 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
232 INTEGER MAXTYP
233 parameter( maxtyp = 22 )
234
235
236
237 LOGICAL WKNOWN
238 CHARACTER JOBZ, RANGE
239 CHARACTER*14 PASSED
240 INTEGER CONTEXT, I, IAM, IINFO, IL, IMODE, IN, INDD,
241 $ INDRWORK, INDWORK, ISIZEHEEVX, ISIZESUBTST,
242 $ ISIZETST, ITYPE, IU, J, LHEEVXSIZE, LLRWORK,
243 $ LLWORK, MAXSIZE, MYCOL, MYROW, NB, NGEN, NLOC,
244 $ NNODES, NP, NPCOL, NPROW, NQ, RES, RSIZECHK,
245 $ RSIZEHEEVX, RSIZEQTQ, RSIZESUBTST, RSIZETST,
246 $ SIZEHEEVX, SIZEMQRLEFT, SIZEMQRRIGHT, SIZEQRF,
247 $ SIZESUBTST, SIZETMS, SIZETST, VALSIZE, VECSIZE
248 REAL ANINV, ANORM, COND, MAXQTQNRM, MAXTSTNRM, OVFL,
249 $ QTQNRM, RTOVFL, RTUNFL, TEMP1, TSTNRM, ULP,
250 $ ULPINV, UNFL, VL, VU
251
252
253 INTEGER ISEEDIN( 4 ), KMAGN( MAXTYP ), KMODE( MAXTYP ),
254 $ KTYPE( MAXTYP )
255 DOUBLE PRECISION CTIME( 10 ), WTIME( 10 )
256
257
258 LOGICAL LSAME
259 INTEGER NUMROC
260 REAL PSLAMCH, SLARAN
262
263
264 EXTERNAL blacs_gridinfo, blacs_pinfo,
clatms, igamx2d,
269
270
271 INTRINSIC abs, int,
max,
min, mod, real, sqrt
272
273
274 DATA ktype / 1, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8,
275 $ 8, 8, 9, 9, 9, 9, 9, 10, 11 /
276 DATA kmagn / 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
277 $ 2, 3, 1, 1, 1, 2, 3, 1, 1 /
278 DATA kmode / 0, 0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
279 $ 0, 0, 4, 3, 1, 4, 4, 3, 0 /
280
281
282
283 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
284 $ rsrc_.LT.0 )RETURN
285
286 info = 0
287 passed = 'PASSED '
288 context = desca( ctxt_ )
289 nb = desca( nb_ )
290
291 CALL blacs_pinfo( iam, nnodes )
292 CALL blacs_gridinfo( context, nprow, npcol, myrow, mycol )
293
294
295
296
297
298 CALL pclasizegsep( desca, iprepad, ipostpad, sizemqrleft,
299 $ sizemqrright, sizeqrf, sizetms, rsizeqtq,
300 $ rsizechk, sizeheevx, rsizeheevx, isizeheevx,
301 $ sizesubtst, rsizesubtst, isizesubtst, sizetst,
302 $ rsizetst, isizetst )
303
304 IF( lrwork.LT.rsizetst ) THEN
305 info = 3
306 END IF
307
308 CALL igamx2d( context, 'a', ' ', 1, 1, info, 1, 1, 1, -1, -1, 0 )
309
310 IF( info.EQ.0 ) THEN
311
312 indd = 1
313 indrwork = indd + n
314 indwork = 1
315 llwork = lwork - indwork + 1
316 llrwork = lrwork - indrwork + 1
317
319 ulpinv = one / ulp
320 unfl =
pslamch( context,
'Safe min' )
321 ovfl = one / unfl
322 CALL slabad( unfl, ovfl )
323 rtunfl = sqrt( unfl )
324 rtovfl = sqrt( ovfl )
325 aninv = one / real(
max( 1, n ) )
326
327
328
329 IF( myrow.EQ.0 .AND. mycol.EQ.0 ) THEN
330 CALL igebs2d( context, 'a', ' ', 4, 1, iseed, 4 )
331 ELSE
332 CALL igebr2d( context, 'a', ' ', 4, 1, iseed, 4, 0, 0 )
333 END IF
334 iseedin( 1 ) = iseed( 1 )
335 iseedin( 2 ) = iseed( 2 )
336 iseedin( 3 ) = iseed( 3 )
337 iseedin( 4 ) = iseed( 4 )
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356 itype = ktype( mattype )
357 imode = kmode( mattype )
358
359
360
361 GO TO ( 10, 20, 30 )kmagn( mattype )
362
363 10 CONTINUE
364 anorm = one
365 GO TO 40
366
367 20 CONTINUE
368 anorm = ( rtovfl*ulp )*aninv
369 GO TO 40
370
371 30 CONTINUE
372 anorm = rtunfl*n*ulpinv
373 GO TO 40
374
375 40 CONTINUE
376 IF( mattype.LE.15 ) THEN
377 cond = ulpinv
378 ELSE
379 cond = ulpinv*aninv / ten
380 END IF
381
382
383
384
385
386
387 IF( itype.EQ.1 ) THEN
388
389
390
391 DO 50 i = 1, n
392 rwork( indd+i-1 ) = zero
393 50 CONTINUE
394 CALL pclaset(
'All', n, n, czero, czero, copya, 1, 1,
395 $ desca )
396 wknown = .true.
397
398 ELSE IF( itype.EQ.2 ) THEN
399
400
401
402 DO 60 i = 1, n
403 rwork( indd+i-1 ) = one
404 60 CONTINUE
405 CALL pclaset(
'All', n, n, czero, cone, copya, 1, 1, desca )
406 wknown = .true.
407
408 ELSE IF( itype.EQ.4 ) THEN
409
410
411
412 CALL pcfillpad( desca( ctxt_ ), sizetms, 1, work( indwork ),
413 $ sizetms, iprepad, ipostpad, padval+1.0e+0 )
414
415 CALL pclatms( n, n,
'S', iseed,
'S', rwork( indd ), imode,
416 $ cond, anorm, 0, 0, 'N', copya, 1, 1, desca,
417 $ order, work( indwork+iprepad ), sizetms,
418 $ iinfo )
419 wknown = .true.
420
421 CALL pcchekpad( desca( ctxt_ ),
'PCLATMS1-WORK', sizetms, 1,
422 $ work( indwork ), sizetms, iprepad, ipostpad,
423 $ padval+1.0e+0 )
424
425 ELSE IF( itype.EQ.5 ) THEN
426
427
428
429 CALL pcfillpad( desca( ctxt_ ), sizetms, 1, work( indwork ),
430 $ sizetms, iprepad, ipostpad, padval+2.0e+0 )
431
432 CALL pclatms( n, n,
'S', iseed,
'S', rwork( indd ), imode,
433 $ cond, anorm, n, n, 'N', copya, 1, 1, desca,
434 $ order, work( indwork+iprepad ), sizetms,
435 $ iinfo )
436
437 CALL pcchekpad( desca( ctxt_ ),
'PCLATMS2-WORK', sizetms, 1,
438 $ work( indwork ), sizetms, iprepad, ipostpad,
439 $ padval+2.0e+0 )
440
441 wknown = .true.
442
443 ELSE IF( itype.EQ.8 ) THEN
444
445
446
447 np =
numroc( n, desca( mb_ ), myrow, 0, nprow )
448 nq =
numroc( n, desca( nb_ ), mycol, 0, npcol )
449 CALL pcmatgen( desca( ctxt_ ),
'H',
'N', n, n, desca( mb_ ),
450 $ desca( nb_ ), copya, desca( lld_ ),
451 $ desca( rsrc_ ), desca( csrc_ ), iseed( 1 ),
452 $ 0, np, 0, nq, myrow, mycol, nprow, npcol )
453 info = 0
454 wknown = .false.
455
456 ELSE IF( itype.EQ.9 ) THEN
457
458
459
460
461 CALL pcfillpad( desca( ctxt_ ), sizetms, 1, work( indwork ),
462 $ sizetms, iprepad, ipostpad, padval+3.0e+0 )
463
464 CALL pclatms( n, n,
'S', iseed,
'S', rwork( indd ), imode,
465 $ cond, anorm, n, n, 'N', copya, 1, 1, desca,
466 $ order, work( indwork+iprepad ), sizetms,
467 $ iinfo )
468
469 wknown = .true.
470
471 CALL pcchekpad( desca( ctxt_ ),
'PCLATMS3-WORK', sizetms, 1,
472 $ work( indwork ), sizetms, iprepad, ipostpad,
473 $ padval+3.0e+0 )
474
475 ELSE IF( itype.EQ.10 ) THEN
476
477
478
479
480 CALL pclaset(
'All', n, n, czero, czero, copya, 1, 1,
481 $ desca )
482 np =
numroc( n, desca( mb_ ), 0, 0, nprow )
483 nq =
numroc( n, desca( nb_ ), 0, 0, npcol )
485 ngen = 0
486 70 CONTINUE
487
488 IF( ngen.LT.n ) THEN
489 in =
min( 1+int(
slaran( iseed )*real( nloc ) ), n-ngen )
490
491 CALL clatms( in, in,
'S', iseed,
'P', rwork( indd ),
492 $ imode, cond, anorm, 1, 1, 'N', a, lda,
493 $ work( indwork ), iinfo )
494
495 DO 80 i = 2, in
496 temp1 = abs( a( i-1, i ) ) /
497 $ sqrt( abs( a( i-1, i-1 )*a( i, i ) ) )
498 IF( temp1.GT.half ) THEN
499 a( i-1, i ) = half*sqrt( abs( a( i-1, i-1 )*a( i,
500 $ i ) ) )
501 a( i, i-1 ) = a( i-1, i )
502 END IF
503 80 CONTINUE
504 CALL pcelset( copya, ngen+1, ngen+1, desca, a( 1, 1 ) )
505 DO 90 i = 2, in
506 CALL pcelset( copya, ngen+i, ngen+i, desca,
507 $ a( i, i ) )
508 CALL pcelset( copya, ngen+i-1, ngen+i, desca,
509 $ a( i-1, i ) )
510 CALL pcelset( copya, ngen+i, ngen+i-1, desca,
511 $ a( i, i-1 ) )
512 90 CONTINUE
513 ngen = ngen + in
514 GO TO 70
515 END IF
516 wknown = .false.
517
518 ELSE IF( itype.EQ.11 ) THEN
519
520
521
522 ngen = 0
523 j = 1
524 temp1 = zero
525 100 CONTINUE
526 IF( ngen.LT.n ) THEN
527 in =
min( j, n-ngen )
528 DO 110 i = 0, in - 1
529 rwork( indd+ngen+i ) = temp1
530 110 CONTINUE
531 temp1 = temp1 + one
532 j = 2*j
533 ngen = ngen + in
534 GO TO 100
535 END IF
536
537
538 CALL pcfillpad( desca( ctxt_ ), sizetms, 1, work( indwork ),
539 $ sizetms, iprepad, ipostpad, padval+4.0e+0 )
540
541 CALL pclatms( n, n,
'S', iseed,
'S', rwork( indd ), imode,
542 $ cond, anorm, 0, 0, 'N', copya, 1, 1, desca,
543 $ order, work( indwork+iprepad ), sizetms,
544 $ iinfo )
545
546 CALL pcchekpad( desca( ctxt_ ),
'PCLATMS4-WORK', sizetms, 1,
547 $ work( indwork ), sizetms, iprepad, ipostpad,
548 $ padval+4.0e+0 )
549
550
551
552
553 wknown = .true.
554
555 ELSE
556 iinfo = 1
557 END IF
558
559 IF( wknown )
560 $ CALL slasrt( 'I', n, rwork( indd ), iinfo )
561
562
563
564 CALL pcfillpad( desca( ctxt_ ), sizetms, 1, work( indwork ),
565 $ sizetms, iprepad, ipostpad, padval+3.3e+0 )
566
567 anorm = one
568
569
570
571 iseed( 4 ) = mod( iseed( 4 )+257, 4096 )
572 iseed( 3 ) = mod( iseed( 3 )+192, 4096 )
573 iseed( 2 ) = mod( iseed( 2 )+35, 4096 )
574 iseed( 1 ) = mod( iseed( 1 )+128, 4096 )
575 CALL pclatms( n, n,
'S', iseed,
'P', rwork( indd ), 3, ten,
576 $ anorm, n, n, 'N', copyb, 1, 1, desca, order,
577 $ work( indwork+iprepad ), sizetms, iinfo )
578
579 CALL pcchekpad( desca( ctxt_ ),
'PCLATMS5-WORK', sizetms, 1,
580 $ work( indwork ), sizetms, iprepad, ipostpad,
581 $ padval+3.3e+0 )
582
583
584
585
586 il = -1
587 iu = -2
588 vl = one
589 vu = -one
590
592 $ iseed, rwork( indd ), maxsize, vecsize,
593 $ valsize )
594
595 lheevxsize =
min( maxsize, lrwork )
596 wknown = .false.
597
598 CALL pcgsepsubtst( wknown, ibtype,
'v',
'a', uplo, n, vl, vu,
599 $ il, iu, thresh, abstol, a, copya, b, copyb,
600 $ z, 1, 1, desca, rwork( indd ), win, ifail,
601 $ iclustr, gap, iprepad, ipostpad,
602 $ work( indwork ), llwork, rwork( indrwork ),
603 $ llrwork, lheevxsize, iwork, isizeheevx, res,
604 $ tstnrm, qtqnrm, nout )
605
606
607
608 maxtstnrm = tstnrm
609 maxqtqnrm = qtqnrm
610
611 IF( thresh.LE.zero ) THEN
612 passed = 'SKIPPED '
613 info = 2
614 ELSE IF( res.NE.0 ) THEN
615 passed = 'FAILED '
616 info = 1
617 END IF
618 END IF
619
620 IF( thresh.GT.zero .AND.
lsame( subtests,
'Y' ) )
THEN
621
622
623
624 IF( info.EQ.0 ) THEN
625
626 jobz = 'V'
627 range = 'A'
629 $ iseed, win( 1+iprepad ), maxsize,
630 $ vecsize, valsize )
631
632 lheevxsize = vecsize
633
634 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
635 $ vu, il, iu, thresh, abstol, a, copya, b,
636 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
637 $ wnew, ifail, iclustr, gap, iprepad,
638 $ ipostpad, work( indwork ), llwork, rwork,
639 $ lrwork, lheevxsize, iwork, isizeheevx,
640 $ res, tstnrm, qtqnrm, nout )
641
642 IF( res.NE.0 ) THEN
643 passed = 'FAILED stest 1'
644 maxtstnrm =
max( tstnrm, maxtstnrm )
645 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
646 info = 1
647 END IF
648 END IF
649
650
651
652 IF( info.EQ.0 ) THEN
653 jobz = 'V'
654 range = 'A'
656 $ iseed, win( 1+iprepad ), maxsize,
657 $ vecsize, valsize )
658
659 lheevxsize = vecsize + int(
slaran( iseed )*
660 $ real( maxsize-vecsize ) )
661
662 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
663 $ vu, il, iu, thresh, abstol, a, copya, b,
664 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
665 $ wnew, ifail, iclustr, gap, iprepad,
666 $ ipostpad, work( indwork ), llwork, rwork,
667 $ lrwork, lheevxsize, iwork, isizeheevx,
668 $ res, tstnrm, qtqnrm, nout )
669
670 IF( res.NE.0 ) THEN
671 passed = 'FAILED stest 2'
672 maxtstnrm =
max( tstnrm, maxtstnrm )
673 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
674 info = 1
675 END IF
676 END IF
677
678
679
680 IF( info.EQ.0 ) THEN
681
682 jobz = 'N'
683 range = 'A'
685 $ iseed, win( 1+iprepad ), maxsize,
686 $ vecsize, valsize )
687
688 lheevxsize = valsize
689 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
690 $ vu, il, iu, thresh, abstol, a, copya, b,
691 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
692 $ wnew, ifail, iclustr, gap, iprepad,
693 $ ipostpad, work( indwork ), llwork, rwork,
694 $ lrwork, lheevxsize, iwork, isizeheevx,
695 $ res, tstnrm, qtqnrm, nout )
696
697 IF( res.NE.0 ) THEN
698 maxtstnrm =
max( tstnrm, maxtstnrm )
699 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
700 passed = 'FAILED stest 3'
701 info = 1
702 END IF
703 END IF
704
705
706
707 IF( info.EQ.0 ) THEN
708
709 il = -1
710 iu = -1
711 jobz = 'N'
712 range = 'I'
713
714
715
717 $ iseed, win( 1+iprepad ), maxsize,
718 $ vecsize, valsize )
719
720 lheevxsize = valsize
721
722 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
723 $ vu, il, iu, thresh, abstol, a, copya, b,
724 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
725 $ wnew, ifail, iclustr, gap, iprepad,
726 $ ipostpad, work( indwork ), llwork, rwork,
727 $ lrwork, lheevxsize, iwork, isizeheevx,
728 $ res, tstnrm, qtqnrm, nout )
729
730 IF( res.NE.0 ) THEN
731 maxtstnrm =
max( tstnrm, maxtstnrm )
732 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
733 passed = 'FAILED stest 4'
734 info = 1
735 END IF
736 END IF
737
738
739
740 IF( info.EQ.0 ) THEN
741
742 il = -1
743 iu = -1
744 jobz = 'V'
745 range = 'I'
746
747
748
750 $ iseed, win( 1+iprepad ), maxsize,
751 $ vecsize, valsize )
752
753 lheevxsize = maxsize
754
755 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
756 $ vu, il, iu, thresh, abstol, a, copya, b,
757 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
758 $ wnew, ifail, iclustr, gap, iprepad,
759 $ ipostpad, work( indwork ), llwork, rwork,
760 $ lrwork, lheevxsize, iwork, isizeheevx,
761 $ res, tstnrm, qtqnrm, nout )
762
763 IF( res.NE.0 ) THEN
764 maxtstnrm =
max( tstnrm, maxtstnrm )
765 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
766 passed = 'FAILED stest 5'
767 info = 1
768 END IF
769 END IF
770
771
772
773 IF( info.EQ.0 ) THEN
774 il = -1
775 iu = -1
776 jobz = 'V'
777 range = 'I'
778
779
780
782 $ iseed, win( 1+iprepad ), maxsize,
783 $ vecsize, valsize )
784
785 lheevxsize = vecsize
786
787 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
788 $ vu, il, iu, thresh, abstol, a, copya, b,
789 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
790 $ wnew, ifail, iclustr, gap, iprepad,
791 $ ipostpad, work( indwork ), llwork, rwork,
792 $ lrwork, lheevxsize, iwork, isizeheevx,
793 $ res, tstnrm, qtqnrm, nout )
794
795 IF( res.NE.0 ) THEN
796 maxtstnrm =
max( tstnrm, maxtstnrm )
797 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
798 passed = 'FAILED stest 6'
799 info = 1
800 END IF
801 END IF
802
803
804
805 IF( info.EQ.0 ) THEN
806 il = -1
807 iu = -1
808 jobz = 'V'
809 range = 'I'
810
811
812
814 $ iseed, win( 1+iprepad ), maxsize,
815 $ vecsize, valsize )
816 lheevxsize = vecsize + int(
slaran( iseed )*
817 $ real( maxsize-vecsize ) )
818
819 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
820 $ vu, il, iu, thresh, abstol, a, copya, b,
821 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
822 $ wnew, ifail, iclustr, gap, iprepad,
823 $ ipostpad, work( indwork ), llwork, rwork,
824 $ lrwork, lheevxsize, iwork, isizeheevx,
825 $ res, tstnrm, qtqnrm, nout )
826
827 IF( res.NE.0 ) THEN
828 maxtstnrm =
max( tstnrm, maxtstnrm )
829 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
830 passed = 'FAILED stest 7'
831 info = 1
832 END IF
833 END IF
834
835
836
837 IF( info.EQ.0 ) THEN
838 vl = one
839 vu = -one
840 jobz = 'N'
841 range = 'V'
842
843
844
846 $ iseed, win( 1+iprepad ), maxsize,
847 $ vecsize, valsize )
848
849 lheevxsize = valsize
850
851 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
852 $ vu, il, iu, thresh, abstol, a, copya, b,
853 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
854 $ wnew, ifail, iclustr, gap, iprepad,
855 $ ipostpad, work( indwork ), llwork, rwork,
856 $ lrwork, lheevxsize, iwork, isizeheevx,
857 $ res, tstnrm, qtqnrm, nout )
858
859 IF( res.NE.0 ) THEN
860 maxtstnrm =
max( tstnrm, maxtstnrm )
861 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
862 passed = 'FAILED stest 8'
863 info = 1
864 END IF
865 END IF
866
867
868
869 IF( info.EQ.0 ) THEN
870 vl = one
871 vu = -one
872 jobz = 'V'
873 range = 'V'
874
875
876
878 $ iseed, win( 1+iprepad ), maxsize,
879 $ vecsize, valsize )
880
881 lheevxsize = maxsize
882
883 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
884 $ vu, il, iu, thresh, abstol, a, copya, b,
885 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
886 $ wnew, ifail, iclustr, gap, iprepad,
887 $ ipostpad, work( indwork ), llwork, rwork,
888 $ lrwork, lheevxsize, iwork, isizeheevx,
889 $ res, tstnrm, qtqnrm, nout )
890
891 IF( res.NE.0 ) THEN
892 maxtstnrm =
max( tstnrm, maxtstnrm )
893 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
894 passed = 'FAILED stest 9'
895 info = 1
896 END IF
897 END IF
898
899
900
901
902 IF( info.EQ.0 ) THEN
903 vl = one
904 vu = -one
905 jobz = 'V'
906 range = 'V'
907
908
909
911 $ iseed, win( 1+iprepad ), maxsize,
912 $ vecsize, valsize )
913
914 lheevxsize = vecsize
915
916 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
917 $ vu, il, iu, thresh, abstol, a, copya, b,
918 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
919 $ wnew, ifail, iclustr, gap, iprepad,
920 $ ipostpad, work( indwork ), llwork, rwork,
921 $ lrwork, lheevxsize, iwork, isizeheevx,
922 $ res, tstnrm, qtqnrm, nout )
923
924 IF( res.NE.0 ) THEN
925 maxtstnrm =
max( tstnrm, maxtstnrm )
926 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
927 passed = 'FAILED stest10'
928 info = 1
929 END IF
930 END IF
931
932
933
934
935
936 IF( info.EQ.0 ) THEN
937 vl = one
938 vu = -one
939 jobz = 'V'
940 range = 'V'
941
942
943
945 $ iseed, win( 1+iprepad ), maxsize,
946 $ vecsize, valsize )
947
948
949 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
950 $ vu, il, iu, thresh, abstol, a, copya, b,
951 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
952 $ wnew, ifail, iclustr, gap, iprepad,
953 $ ipostpad, work( indwork ), llwork, rwork,
954 $ lrwork, lheevxsize, iwork, isizeheevx,
955 $ res, tstnrm, qtqnrm, nout )
956
957 IF( res.NE.0 ) THEN
958 maxtstnrm =
max( tstnrm, maxtstnrm )
959 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
960 passed = 'FAILED stest11'
961 info = 1
962 END IF
963 END IF
964
965
966
967
968 IF( info.EQ.0 ) THEN
969 vl = one
970 vu = -one
971 jobz = 'V'
972 range = 'V'
973
974
975
977 $ iseed, win( 1+iprepad ), maxsize,
978 $ vecsize, valsize )
979
980 lheevxsize = valsize
981
982 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
983 $ vu, il, iu, thresh, abstol, a, copya, b,
984 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
985 $ wnew, ifail, iclustr, gap, iprepad,
986 $ ipostpad, work( indwork ), llwork, rwork,
987 $ lrwork, lheevxsize, iwork, isizeheevx,
988 $ res, tstnrm, qtqnrm, nout )
989
990 IF( res.NE.0 ) THEN
991 maxtstnrm =
max( tstnrm, maxtstnrm )
992 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
993 passed = 'FAILED stest12'
994 info = 1
995 END IF
996 END IF
997
998
999
1000
1001
1002 IF( info.EQ.0 ) THEN
1003 vl = one
1004 vu = -one
1005 jobz = 'V'
1006 range = 'V'
1007
1008
1009
1010 CALL pclasizeheevx( .true., range, n, desca, vl, vu, il, iu,
1011 $ iseed, win( 1+iprepad ), maxsize,
1012 $ vecsize, valsize )
1013
1014
1015 CALL pcgsepsubtst( .true., ibtype, jobz, range, uplo, n, vl,
1016 $ vu, il, iu, thresh, abstol, a, copya, b,
1017 $ copyb, z, 1, 1, desca, win( 1+iprepad ),
1018 $ wnew, ifail, iclustr, gap, iprepad,
1019 $ ipostpad, work( indwork ), llwork, rwork,
1020 $ lrwork, lheevxsize, iwork, isizeheevx,
1021 $ res, tstnrm, qtqnrm, nout )
1022
1023 IF( res.NE.0 ) THEN
1024 maxtstnrm =
max( tstnrm, maxtstnrm )
1025 maxqtqnrm =
max( qtqnrm, maxqtqnrm )
1026 passed = 'FAILED stest13'
1027 info = 1
1028 END IF
1029 END IF
1030 END IF
1031
1032
1033
1034 CALL igamx2d( context, 'All', ' ', 1, 1, info, 1, -1, -1, -1, -1,
1035 $ -1 )
1036
1037 IF( info.EQ.1 ) THEN
1038 IF( iam.EQ.0 ) THEN
1039 WRITE( nout, fmt = 9994 )'C '
1040 WRITE( nout, fmt = 9993 )iseedin( 1 )
1041 WRITE( nout, fmt = 9992 )iseedin( 2 )
1042 WRITE( nout, fmt = 9991 )iseedin( 3 )
1043 WRITE( nout, fmt = 9990 )iseedin( 4 )
1044 IF(
lsame( uplo,
'L' ) )
THEN
1045 WRITE( nout, fmt = 9994 )' UPLO= ''L'' '
1046 ELSE
1047 WRITE( nout, fmt = 9994 )' UPLO= ''U'' '
1048 END IF
1049 IF(
lsame( subtests,
'Y' ) )
THEN
1050 WRITE( nout, fmt = 9994 )' SUBTESTS= ''Y'' '
1051 ELSE
1052 WRITE( nout, fmt = 9994 )' SUBTESTS= ''N'' '
1053 END IF
1054 WRITE( nout, fmt = 9989 )n
1055 WRITE( nout, fmt = 9988 )nprow
1056 WRITE( nout, fmt = 9987 )npcol
1057 WRITE( nout, fmt = 9986 )nb
1058 WRITE( nout, fmt = 9985 )mattype
1059 WRITE( nout, fmt = 9984 )ibtype
1060 WRITE( nout, fmt = 9982 )abstol
1061 WRITE( nout, fmt = 9981 )thresh
1062 WRITE( nout, fmt = 9994 )'C '
1063 END IF
1064 END IF
1065
1066 CALL slcombine( context,
'All',
'>',
'W', 6, 1, wtime )
1067 CALL slcombine( context,
'All',
'>',
'C', 6, 1, ctime )
1068 IF( iam.EQ.0 ) THEN
1069 IF( info.EQ.0 .OR. info.EQ.1 ) THEN
1070 IF( wtime( 1 ).GE.0.0 ) THEN
1071 WRITE( nout, fmt = 9999 )n, nb, nprow, npcol, mattype,
1072 $ ibtype, subtests, wtime( 1 ), ctime( 1 ), maxtstnrm,
1073 $ passed
1074 ELSE
1075 WRITE( nout, fmt = 9998 )n, nb, nprow, npcol, mattype,
1076 $ ibtype, subtests, ctime( 1 ), maxtstnrm, passed
1077 END IF
1078 ELSE IF( info.EQ.2 ) THEN
1079 IF( wtime( 1 ).GE.0.0 ) THEN
1080 WRITE( nout, fmt = 9997 )n, nb, nprow, npcol, mattype,
1081 $ ibtype, subtests, wtime( 1 ), ctime( 1 )
1082 ELSE
1083 WRITE( nout, fmt = 9996 )n, nb, nprow, npcol, mattype,
1084 $ ibtype, subtests, ctime( 1 )
1085 END IF
1086 ELSE IF( info.EQ.3 ) THEN
1087 WRITE( nout, fmt = 9995 )n, nb, nprow, npcol, mattype,
1088 $ ibtype, subtests
1089 END IF
1090 END IF
1091
1092 120 CONTINUE
1093
1094 RETURN
1095 9999 FORMAT( 1x, i5, 1x, i3, 1x, i3, 1x, i3, 1x, i3, 3x, i3, 4x, a1,
1096 $ 1x, f8.2, 1x, f8.2, 1x, g9.2, 1x, a14 )
1097 9998 FORMAT( 1x, i5, 1x, i3, 1x, i3, 1x, i3, 1x, i3, 3x, i3, 4x, a1,
1098 $ 1x, 8x, 1x, f8.2, 1x, g9.2, a14 )
1099 9997 FORMAT( 1x, i5, 1x, i3, 1x, i3, 1x, i3, 1x, i3, 3x, i3, 4x, a1,
1100 $ 1x, f8.2, 1x, f8.2, 11x, 'Bypassed' )
1101 9996 FORMAT( 1x, i5, 1x, i3, 1x, i3, 1x, i3, 1x, i3, 3x, i3, 4x, a1,
1102 $ 1x, 8x, 1x, f8.2, 11x, 'Bypassed' )
1103 9995 FORMAT( 1x, i5, 1x, i3, 1x, i3, 1x, i3, 1x, i3, 3x, i3, 4x, a1,
1104 $ 22x, 'Bad MEMORY parameters' )
1105 9994 FORMAT( a )
1106 9993 FORMAT( ' ISEED( 1 ) =', i8 )
1107 9992 FORMAT( ' ISEED( 2 ) =', i8 )
1108 9991 FORMAT( ' ISEED( 3 ) =', i8 )
1109 9990 FORMAT( ' ISEED( 4 ) =', i8 )
1110 9989 FORMAT( ' N=', i8 )
1111 9988 FORMAT( ' NPROW=', i8 )
1112 9987 FORMAT( ' NPCOL=', i8 )
1113 9986 FORMAT( ' NB=', i8 )
1114 9985 FORMAT( ' MATTYPE=', i8 )
1115 9984 FORMAT( ' IBTYPE=', i8 )
1116 9983 FORMAT( ' SUBTESTS=', a1 )
1117 9982 FORMAT( ' ABSTOL=', d16.6 )
1118 9981 FORMAT( ' THRESH=', d16.6 )
1119 9980 FORMAT( ' Increase TOTMEM in PCGSEPDRIVER' )
1120
1121
1122
subroutine pcmatgen(ictxt, aform, diag, m, n, mb, nb, a, lda, iarow, iacol, iseed, iroff, irnum, icoff, icnum, myrow, mycol, nprow, npcol)
subroutine clatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
integer function numroc(n, nb, iproc, isrcproc, nprocs)
subroutine pclaset(uplo, m, n, alpha, beta, a, ia, ja, desca)
real function pslamch(ictxt, cmach)
subroutine pcchekpad(ictxt, mess, m, n, a, lda, ipre, ipost, chkval)
subroutine pcelset(a, ia, ja, desca, alpha)
subroutine pcfillpad(ictxt, m, n, a, lda, ipre, ipost, chkval)
subroutine pcgsepsubtst(wknown, ibtype, jobz, range, uplo, n, vl, vu, il, iu, thresh, abstol, a, copya, b, copyb, z, ia, ja, desca, win, wnew, ifail, iclustr, gap, iprepad, ipostpad, work, lwork, rwork, lrwork, lwork1, iwork, liwork, result, tstnrm, qtqnrm, nout)
subroutine pclasizegsep(desca, iprepad, ipostpad, sizemqrleft, sizemqrright, sizeqrf, sizetms, rsizeqtq, rsizechk, sizeheevx, rsizeheevx, isizeheevx, sizesubtst, rsizesubtst, isizesubtst, sizetst, rsizetst, isizetst)
subroutine pclasizeheevx(wknown, range, n, desca, vl, vu, il, iu, iseed, win, maxsize, vecsize, valsize)
subroutine pclatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, ia, ja, desca, order, work, lwork, info)
real function slaran(iseed)
subroutine slcombine(ictxt, scope, op, timetype, n, ibeg, times)