4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PZGEMM ',
'PZSYMM ',
'PZHEMM ',
7 $
'PZSYRK ',
'PZHERK ',
'PZSYR2K',
8 $
'PZHER2K',
'PZTRMM ',
'PZTRSM ',
9 $
'PZGEADD',
'PZTRADD'/
128 INTEGER maxtests, maxgrids, gapmul, zplxsz, totmem,
129 $ memsiz, nsubs, dblesz
130 COMPLEX*16 one, padval, zero, rogue
131 parameter( maxtests = 20, maxgrids = 20, gapmul = 10,
132 $ zplxsz = 16, totmem = 2000000,
133 $ memsiz = totmem / zplxsz, dblesz = 8,
134 $ padval = ( -9923.0d+0, -9923.0d+0 ),
135 $ zero = ( 0.0d+0, 0.0d+0 ),
136 $ rogue = ( -1.0d+10, 1.0d+10 ),
137 $ one = ( 1.0d+0, 0.0d+0 ), nsubs = 11 )
138 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
139 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
141 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
142 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
143 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
144 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
147 LOGICAL errflg, sof, tee
148 CHARACTER*1 adiagdo, aform, cform, diag, side, transa,
150 INTEGER csrca, csrcb, csrcc, i, ia, iam, iaseed, ib,
151 $ ibseed, ic, icseed, ictxt, igap, imba, imbb,
152 $ imbc, imida, imidb, imidc, inba, inbb, inbc,
153 $ ipa, ipb, ipc, ipg, ipmata, ipmatb, ipmatc,
154 $ iposta, ipostb, ipostc, iprea, ipreb, iprec,
155 $ ipw, iverb, j, ja, jb, jc, k, l, lda, ldb, ldc,
156 $ m, ma, mb, mba, mbb, mbc, mc, memreqd, mpa,
157 $ mpb, mpc, mycol, myrow, n, na, nb, nba, nbb,
158 $ nbc, nc, ncola, ncolb, ncolc, ngrids, nout,
159 $ npcol, nprocs, nprow, nqa, nqb, nqc, nrowa,
160 $ nrowb, nrowc, ntests, offda, offdc, rsrca,
161 $ rsrcb, rsrcc, tskip, tstcnt
163 COMPLEX*16 alpha, beta, scale
166 LOGICAL bcheck( nsubs ), ccheck( nsubs ),
168 CHARACTER*1 diagval( maxtests ), sideval( maxtests ),
169 $ trnaval( maxtests ), trnbval( maxtests ),
170 $ uploval( maxtests )
172 INTEGER cscaval( maxtests ), cscbval( maxtests ),
173 $ csccval( maxtests ), desca( dlen_ ),
174 $ descar( dlen_ ), descb( dlen_ ),
175 $ descbr( dlen_ ), descc( dlen_ ),
176 $ desccr( dlen_ ), iaval( maxtests ),
177 $ ibval( maxtests ), icval( maxtests ),
178 $ ierr( 6 ), imbaval( maxtests ),
179 $ imbbval( maxtests ), imbcval( maxtests ),
180 $ inbaval( maxtests ), inbbval( maxtests ),
181 $ inbcval( maxtests ), javal( maxtests ),
182 $ jbval( maxtests ), jcval( maxtests )
183 INTEGER kfail( nsubs ), kpass( nsubs ), kskip( nsubs ),
184 $ ktests( nsubs ), kval( maxtests ),
185 $ maval( maxtests ), mbaval( maxtests ),
186 $ mbbval( maxtests ), mbcval( maxtests ),
187 $ mbval( maxtests ), mcval( maxtests ),
188 $ mval( maxtests ), naval( maxtests ),
189 $ nbaval( maxtests ), nbbval( maxtests ),
190 $ nbcval( maxtests ), nbval( maxtests ),
191 $ ncval( maxtests ), nval( maxtests ),
192 $ pval( maxtests ), qval( maxtests ),
193 $ rscaval( maxtests ), rscbval( maxtests ),
194 $ rsccval( maxtests )
195 COMPLEX*16 mem( memsiz )
198 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
199 $ blacs_gridinfo, blacs_gridinit, blacs_pinfo,
204 $ pzgemm, pzhemm, pzher2k, pzherk,
pzipset,
206 $ pzsyr2k, pzsyrk, pztradd, pztrmm, pztrsm
214 INTRINSIC abs, dble, dcmplx,
max, mod, real
217 CHARACTER*7 snames( nsubs )
220 COMMON /snamec/snames
221 COMMON /infoc/info, nblog
222 COMMON /pberrorc/nout, abrtflg
225 DATA bcheck/.true., .true., .true., .false.,
226 $ .false., .true., .true., .true., .true.,
228 DATA ccheck/.true., .true., .true., .true., .true.,
229 $ .true., .true., .false., .false., .true.,
267 CALL blacs_pinfo( iam, nprocs )
269 $ trnaval, trnbval, uploval, mval, nval,
270 $ kval, maval, naval, imbaval, mbaval,
271 $ inbaval, nbaval, rscaval, cscaval, iaval,
272 $ javal, mbval, nbval, imbbval, mbbval,
273 $ inbbval, nbbval, rscbval, cscbval, ibval,
274 $ jbval, mcval, ncval, imbcval, mbcval,
275 $ inbcval, nbcval, rsccval, csccval, icval,
276 $ jcval, maxtests, ngrids, pval, maxgrids,
277 $ qval, maxgrids, nblog, ltest, sof, tee, iam,
278 $ igap, iverb, nprocs, thresh, alpha, beta,
282 WRITE( nout, fmt = 9976 )
283 WRITE( nout, fmt = * )
301 IF( nprow.LT.1 )
THEN
303 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
305 ELSE IF( npcol.LT.1 )
THEN
307 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
309 ELSE IF( nprow*npcol.GT.nprocs )
THEN
311 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
315 IF( ierr( 1 ).GT.0 )
THEN
317 $
WRITE( nout, fmt = 9997 )
'GRID'
324 CALL blacs_get( -1, 0, ictxt )
325 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
326 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
331 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
342 transa = trnaval( j )
343 transb = trnbval( j )
387 WRITE( nout, fmt = * )
388 WRITE( nout, fmt = 9996 ) tstcnt, nprow, npcol
389 WRITE( nout, fmt = * )
391 WRITE( nout, fmt = 9995 )
392 WRITE( nout, fmt = 9994 )
393 WRITE( nout, fmt = 9995 )
394 WRITE( nout, fmt = 9993 ) m, n, k, side, uplo, transa,
397 WRITE( nout, fmt = 9995 )
398 WRITE( nout, fmt = 9992 )
399 WRITE( nout, fmt = 9995 )
400 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
401 $ mba, nba, rsrca, csrca
403 WRITE( nout, fmt = 9995 )
404 WRITE( nout, fmt = 9990 )
405 WRITE( nout, fmt = 9995 )
406 WRITE( nout, fmt = 9991 ) ib, jb, mb, nb, imbb, inbb,
407 $ mbb, nbb, rsrcb, csrcb
409 WRITE( nout, fmt = 9995 )
410 WRITE( nout, fmt = 9989 )
411 WRITE( nout, fmt = 9995 )
412 WRITE( nout, fmt = 9991 ) ic, jc, mc, nc, imbc, inbc,
413 $ mbc, nbc, rsrcc, csrcc
415 WRITE( nout, fmt = 9995 )
421 IF( .NOT.
lsame( side,
'L' ).AND.
422 $ .NOT.
lsame( side,
'R' ) )
THEN
424 $
WRITE( nout, fmt = 9997 )
'SIDE'
429 IF( .NOT.
lsame( uplo,
'U' ).AND.
430 $ .NOT.
lsame( uplo,
'L' ) )
THEN
432 $
WRITE( nout, fmt = 9997 )
'UPLO'
437 IF( .NOT.
lsame( transa,
'N' ).AND.
438 $ .NOT.
lsame( transa,
'T' ).AND.
439 $ .NOT.
lsame( transa,
'C' ) )
THEN
441 $
WRITE( nout, fmt = 9997 )
'TRANSA'
446 IF( .NOT.
lsame( transb,
'N' ).AND.
447 $ .NOT.
lsame( transb,
'T' ).AND.
448 $ .NOT.
lsame( transb,
'C' ) )
THEN
450 $
WRITE( nout, fmt = 9997 )
'TRANSB'
455 IF( .NOT.
lsame( diag ,
'U' ).AND.
456 $ .NOT.
lsame( diag ,
'N' ) )
THEN
458 $
WRITE( nout, fmt = 9997 )
'DIAG'
466 $ block_cyclic_2d_inb, ma, na, imba, inba,
467 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
468 $ imida, iposta, igap, gapmul, ierr( 1 ) )
471 $ block_cyclic_2d_inb, mb, nb, imbb, inbb,
472 $ mbb, nbb, rsrcb, csrcb, mpb, nqb, ipreb,
473 $ imidb, ipostb, igap, gapmul, ierr( 2 ) )
476 $ block_cyclic_2d_inb, mc, nc, imbc, inbc,
477 $ mbc, nbc, rsrcc, csrcc, mpc, nqc, iprec,
478 $ imidc, ipostc, igap, gapmul, ierr( 3 ) )
480 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
481 $ ierr( 3 ).GT.0 )
THEN
494 ipb = ipa + desca( lld_ )*nqa + iposta + ipreb
495 ipc = ipb + descb( lld_ )*nqb + ipostb + iprec
496 ipmata = ipc + descc( lld_ )*nqc + ipostc
497 ipmatb = ipmata + ma*na
498 ipmatc = ipmatb + mb*nb
499 ipg = ipmatc +
max( mb*nb, mc*nc )
507 $
max( imbb, mbb ) ),
508 $
max( imbc, mbc ) ) +
max( m,
max( n, k ) )
510 $ real( dblesz ), real( zplxsz ) ) - 1
512 IF( memreqd.GT.memsiz )
THEN
514 $
WRITE( nout, fmt = 9987 ) memreqd*zplxsz
520 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
522 IF( ierr( 1 ).GT.0 )
THEN
524 $
WRITE( nout, fmt = 9988 )
535 IF( .NOT.ltest( l ) )
539 WRITE( nout, fmt = * )
540 WRITE( nout, fmt = 9986 ) snames( l )
551 IF(
lsame( transa,
'N' ) )
THEN
558 IF(
lsame( transb,
'N' ) )
THEN
566 ELSE IF( l.EQ.2 .OR. l.EQ.3 )
THEN
574 IF(
lsame( side,
'L' ) )
THEN
582 ELSE IF( l.EQ.4 .OR. l.EQ.5 )
THEN
588 IF(
lsame( transa,
'N' ) )
THEN
598 ELSE IF( l.EQ.6 .OR. l.EQ.7 )
THEN
604 IF(
lsame( transa,
'N' ) )
THEN
616 ELSE IF( l.EQ.8 .OR. l.EQ.9 )
THEN
619 IF(
lsame( side,
'L' ) )
THEN
629 ELSE IF( l.EQ.10 .OR. l.EQ.11 )
THEN
633 IF(
lsame( transa,
'N' ) )
THEN
649 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
651 CALL pmdimchk( ictxt, nout, nrowb, ncolb,
'B', ib, jb,
653 CALL pmdimchk( ictxt, nout, nrowc, ncolc,
'C', ic, jc,
656 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
657 $ ierr( 3 ).NE.0 )
THEN
658 kskip( l ) = kskip( l ) + 1
665 IF( l.EQ.4 .OR. l.EQ.6 )
THEN
666 IF( .NOT.
lsame( transa,
'N' ).AND.
667 $ .NOT.
lsame( transa,
'T' ) )
THEN
669 $
WRITE( nout, fmt = 9975 )
'TRANSA'
670 kskip( l ) = kskip( l ) + 1
673 ELSE IF( l.EQ.5 .OR. l.EQ.7 )
THEN
674 IF( .NOT.
lsame( transa,
'N' ).AND.
675 $ .NOT.
lsame( transa,
'C' ) )
THEN
677 $
WRITE( nout, fmt = 9975 )
'TRANSA'
678 kskip( l ) = kskip( l ) + 1
695 ELSE IF( l.EQ.3 )
THEN
705 ELSE IF( l.EQ.4 .OR. l.EQ.6 )
THEN
715 ELSE IF( l.EQ.5 .OR. l.EQ.7 )
THEN
725 ELSE IF( ( l.EQ.9 ).AND.(
lsame( diag,
'N' ) ) )
THEN
747 CALL pzlagen( .false., aform, adiagdo, offda, ma, na,
748 $ 1, 1, desca, iaseed, mem( ipa ),
752 $
CALL pzlagen( .false.,
'None',
'No diag', 0, mb, nb,
753 $ 1, 1, descb, ibseed, mem( ipb ),
757 $
CALL pzlagen( .false., cform,
'No diag', offdc, mc,
758 $ nc, 1, 1, descc, icseed, mem( ipc ),
763 CALL pb_descset2( descar, ma, na, imba, inba, mba, nba,
764 $ -1, -1, ictxt,
max( 1, ma ) )
765 CALL pzlagen( .false., aform, adiagdo, offda, ma, na,
766 $ 1, 1, descar, iaseed, mem( ipmata ),
769 IF( bcheck( l ) )
THEN
771 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
772 CALL pzlagen( .false.,
'None',
'No diag', 0, mb, nb,
773 $ 1, 1, descbr, ibseed, mem( ipmatb ),
777 IF( ccheck( l ) )
THEN
780 $ nbc, -1, -1, ictxt,
max( 1, mc ) )
781 CALL pzlagen( .false., cform,
'No diag', offdc, mc,
782 $ nc, 1, 1, desccr, icseed, mem( ipmatc ),
790 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
791 CALL pzlagen( .false.,
'None',
'No diag', 0, mb, nb,
792 $ 1, 1, desccr, ibseed, mem( ipmatc ),
799 IF( ( ( l.EQ.2 ).OR. ( l.EQ.3 ) ).AND.
800 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
804 IF(
lsame( uplo,
'L' ) )
THEN
808 CALL pzlaset(
'Upper', nrowa-1, ncola-1, rogue,
809 $ rogue, mem( ipa ), ia, ja+1, desca )
811 ELSE IF(
lsame( uplo,
'U' ) )
THEN
815 CALL pzlaset(
'Lower', nrowa-1, ncola-1, rogue,
816 $ rogue, mem( ipa ), ia+1, ja, desca )
820 ELSE IF( ( ( l.EQ.4 ).OR.( l.EQ.5 ).OR.( l.EQ.6 ).OR.
822 $ (
max( nrowc, ncolc ).GT.1 ) )
THEN
826 IF(
lsame( uplo,
'L' ) )
THEN
830 IF(
max( nrowc, ncolc ).GT.1 )
THEN
831 CALL pzlaset(
'Upper', nrowc-1, ncolc-1, rogue,
832 $ rogue, mem( ipc ), ic, jc+1,
834 CALL pb_zlaset(
'Upper', nrowc-1, ncolc-1, 0,
836 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
839 ELSE IF(
lsame( uplo,
'U' ) )
THEN
843 IF(
max( nrowc, ncolc ).GT.1 )
THEN
844 CALL pzlaset(
'Lower', nrowc-1, ncolc-1, rogue,
845 $ rogue, mem( ipc ), ic+1, jc,
847 CALL pb_zlaset(
'Lower', nrowc-1, ncolc-1, 0,
849 $ mem( ipmatc+ic+(jc-1)*ldc ),
855 ELSE IF( l.EQ.8 .OR. l.EQ.9 )
THEN
857 IF(
lsame( uplo,
'L' ) )
THEN
861 IF(
lsame( diag,
'N' ) )
THEN
863 IF(
max( nrowa, ncola ).GT.1 )
THEN
864 CALL pzlaset(
'Upper', nrowa-1, ncola-1,
865 $ rogue, rogue, mem( ipa ), ia,
867 CALL pb_zlaset(
'Upper', nrowa-1, ncola-1, 0,
869 $ mem( ipmata+ia-1+ja*lda ),
875 CALL pzlaset(
'Upper', nrowa, ncola, rogue, one,
876 $ mem( ipa ), ia, ja, desca )
877 CALL pb_zlaset(
'Upper', nrowa, ncola, 0, zero,
879 $ mem( ipmata+ia-1+(ja-1)*lda ),
882 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
884 $ dcmplx( dble(
max( nrowa, ncola ) ) )
885 CALL pzlascal(
'Lower', nrowa-1, ncola-1,
886 $ scale, mem( ipa ), ia+1, ja,
890 $ mem( ipmata+ia+(ja-1)*lda ),
895 ELSE IF(
lsame( uplo,
'U' ) )
THEN
899 IF(
lsame( diag,
'N' ) )
THEN
901 IF(
max( nrowa, ncola ).GT.1 )
THEN
902 CALL pzlaset(
'Lower', nrowa-1, ncola-1,
903 $ rogue, rogue, mem( ipa ), ia+1,
905 CALL pb_zlaset(
'Lower', nrowa-1, ncola-1, 0,
907 $ mem( ipmata+ia+(ja-1)*lda ),
913 CALL pzlaset(
'Lower', nrowa, ncola, rogue, one,
914 $ mem( ipa ), ia, ja, desca )
915 CALL pb_zlaset(
'Lower', nrowa, ncola, 0, zero,
917 $ mem( ipmata+ia-1+(ja-1)*lda ),
920 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
922 $ dcmplx( dble(
max( nrowa, ncola ) ) )
923 CALL pzlascal(
'Upper', nrowa-1, ncola-1,
924 $ scale, mem( ipa ), ia, ja+1,
928 $ mem( ipmata+ia-1+ja*lda ), lda )
935 ELSE IF( l.EQ.11 )
THEN
937 IF(
lsame( uplo,
'L' ) )
THEN
941 IF(
max( nrowc, ncolc ).GT.1 )
THEN
942 CALL pzlaset(
'Upper', nrowc-1, ncolc-1,
943 $ rogue, rogue, mem( ipc ), ic,
945 CALL pb_zlaset(
'Upper', nrowc-1, ncolc-1, 0,
947 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
950 ELSE IF(
lsame( uplo,
'U' ) )
THEN
954 IF(
max( nrowc, ncolc ).GT.1 )
THEN
955 CALL pzlaset(
'Lower', nrowc-1, ncolc-1,
956 $ rogue, rogue, mem( ipc ), ic+1,
958 CALL pb_zlaset(
'Lower', nrowc-1, ncolc-1, 0,
960 $ mem( ipmatc+ic+(jc-1)*ldc ),
970 CALL pb_zfillpad( ictxt, mpa, nqa, mem( ipa-iprea ),
971 $ desca( lld_ ), iprea, iposta, padval )
973 IF( bcheck( l ) )
THEN
974 CALL pb_zfillpad( ictxt, mpb, nqb, mem( ipb-ipreb ),
975 $ descb( lld_ ), ipreb, ipostb,
979 IF( ccheck( l ) )
THEN
980 CALL pb_zfillpad( ictxt, mpc, nqc, mem( ipc-iprec ),
981 $ descc( lld_ ), iprec, ipostc,
988 CALL pzchkarg3( ictxt, nout, snames( l ), side, uplo,
989 $ transa, transb, diag, m, n, k, alpha, ia,
990 $ ja, desca, ib, jb, descb, beta, ic, jc,
995 IF( iverb.EQ.2 )
THEN
996 CALL pb_pzlaprnt( nrowa, ncola, mem( ipa ), ia, ja,
998 $
'PARALLEL_INITIAL_A', nout,
1000 ELSE IF( iverb.GE.3 )
THEN
1001 CALL pb_pzlaprnt( ma, na, mem( ipa ), 1, 1, desca,
1002 $ 0, 0,
'PARALLEL_INITIAL_A', nout,
1006 IF( bcheck( l ) )
THEN
1007 IF( iverb.EQ.2 )
THEN
1008 CALL pb_pzlaprnt( nrowb, ncolb, mem( ipb ), ib, jb,
1010 $
'PARALLEL_INITIAL_B', nout,
1012 ELSE IF( iverb.GE.3 )
THEN
1013 CALL pb_pzlaprnt( mb, nb, mem( ipb ), 1, 1, descb,
1014 $ 0, 0,
'PARALLEL_INITIAL_B', nout,
1019 IF( ccheck( l ) )
THEN
1020 IF( iverb.EQ.2 )
THEN
1021 CALL pb_pzlaprnt( nrowc, ncolc, mem( ipc ), ic, jc,
1023 $
'PARALLEL_INITIAL_C', nout,
1025 ELSE IF( iverb.GE.3 )
THEN
1026 CALL pb_pzlaprnt( mc, nc, mem( ipc ), 1, 1, descc,
1027 $ 0, 0,
'PARALLEL_INITIAL_C', nout,
1039 CALL pzgemm( transa, transb, m, n, k, alpha,
1040 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1041 $ ib, jb, descb, beta, mem( ipc ), ic, jc,
1044 ELSE IF( l.EQ.2 )
THEN
1048 CALL pzsymm( side, uplo, m, n, alpha, mem( ipa ), ia,
1049 $ ja, desca, mem( ipb ), ib, jb, descb,
1050 $ beta, mem( ipc ), ic, jc, descc )
1052 ELSE IF( l.EQ.3 )
THEN
1056 CALL pzipset(
'Bignum', nrowa, mem( ipa ), ia, ja,
1059 CALL pzhemm( side, uplo, m, n, alpha, mem( ipa ), ia,
1060 $ ja, desca, mem( ipb ), ib, jb, descb,
1061 $ beta, mem( ipc ), ic, jc, descc )
1063 CALL pzipset(
'Zero', nrowa, mem( ipa ), ia, ja,
1066 ELSE IF( l.EQ.4 )
THEN
1070 CALL pzsyrk( uplo, transa, n, k, alpha, mem( ipa ),
1071 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1074 ELSE IF( l.EQ.5 )
THEN
1078 IF( ( ( dcmplx( dble( alpha ) ).NE.zero ).AND.
1080 $ ( dcmplx( dble( beta ) ).NE.one ) )
1081 $
CALL pzipset(
'Bignum', n, mem( ipc ), ic, jc,
1084 CALL pzherk( uplo, transa, n, k, dble( alpha ),
1085 $ mem( ipa ), ia, ja, desca, dble( beta ),
1086 $ mem( ipc ), ic, jc, descc )
1088 ELSE IF( l.EQ.6 )
THEN
1092 CALL pzsyr2k( uplo, transa, n, k, alpha, mem( ipa ),
1093 $ ia, ja, desca, mem( ipb ), ib, jb,
1094 $ descb, beta, mem( ipc ), ic, jc,
1097 ELSE IF( l.EQ.7 )
THEN
1101 IF( ( ( alpha.NE.zero ).AND.( k.NE.0 ) ).OR.
1102 $ ( dcmplx( dble( beta ) ).NE.one ) )
1103 $
CALL pzipset(
'Bignum', n, mem( ipc ), ic, jc,
1106 CALL pzher2k( uplo, transa, n, k, alpha, mem( ipa ),
1107 $ ia, ja, desca, mem( ipb ), ib, jb,
1108 $ descb, dble( beta ), mem( ipc ), ic, jc,
1111 ELSE IF( l.EQ.8 )
THEN
1115 CALL pztrmm( side, uplo, transa, diag, m, n, alpha,
1116 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1119 ELSE IF( l.EQ.9 )
THEN
1123 CALL pztrsm( side, uplo, transa, diag, m, n, alpha,
1124 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1128 ELSE IF( l.EQ.10 )
THEN
1132 CALL pzgeadd( transa, m, n, alpha, mem( ipa ), ia, ja,
1133 $ desca, beta, mem( ipc ), ic, jc, descc )
1135 ELSE IF( l.EQ.11 )
THEN
1139 CALL pztradd( uplo, transa, m, n, alpha, mem( ipa ),
1140 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1147 IF( info.NE.0 )
THEN
1148 kskip( l ) = kskip( l ) + 1
1150 $
WRITE( nout, fmt = 9974 ) info
1157 $ mem( ipa-iprea ), desca( lld_ ),
1158 $ iprea, iposta, padval )
1160 IF( bcheck( l ) )
THEN
1162 $ mem( ipb-ipreb ), descb( lld_ ),
1163 $ ipreb, ipostb, padval )
1166 IF( ccheck( l ) )
THEN
1168 $ mem( ipc-iprec ), descc( lld_ ),
1169 $ iprec, ipostc, padval )
1175 $ transb, diag, m, n, k, alpha,
1176 $ mem( ipmata ), mem( ipa ), ia, ja,
1177 $ desca, mem( ipmatb ), mem( ipb ),
1178 $ ib, jb, descb, beta, mem( ipmatc ),
1179 $ mem( ipc ), ic, jc, descc, thresh,
1180 $ rogue, mem( ipg ), mem( ipw ), info )
1181 IF( mod( info, 2 ).EQ.1 )
THEN
1183 ELSE IF( mod( info / 2, 2 ).EQ.1 )
THEN
1185 ELSE IF( mod( info / 4, 2 ).EQ.1 )
THEN
1187 ELSE IF( info.NE.0 )
THEN
1196 CALL pzchkarg3( ictxt, nout, snames( l ), side, uplo,
1197 $ transa, transb, diag, m, n, k, alpha, ia,
1198 $ ja, desca, ib, jb, descb, beta, ic, jc,
1203 CALL pzchkmout( nrowa, ncola, mem( ipmata ),
1204 $ mem( ipa ), ia, ja, desca, ierr( 4 ) )
1205 IF( ierr( 4 ).NE.0 )
THEN
1207 $
WRITE( nout, fmt = 9983 )
'PARALLEL_A',
1211 IF( bcheck( l ) )
THEN
1212 CALL pzchkmout( nrowb, ncolb, mem( ipmatb ),
1213 $ mem( ipb ), ib, jb, descb, ierr( 5 ) )
1214 IF( ierr( 5 ).NE.0 )
THEN
1216 $
WRITE( nout, fmt = 9983 )
'PARALLEL_B',
1221 IF( ccheck( l ) )
THEN
1222 CALL pzchkmout( nrowc, ncolc, mem( ipmatc ),
1223 $ mem( ipc ), ic, jc, descc, ierr( 6 ) )
1224 IF( ierr( 6 ).NE.0 )
THEN
1226 $
WRITE( nout, fmt = 9983 )
'PARALLEL_C',
1233 IF( info.NE.0 .OR. ierr( 1 ).NE.0 .OR.
1234 $ ierr( 2 ).NE.0 .OR. ierr( 3 ).NE.0 .OR.
1235 $ ierr( 4 ).NE.0 .OR. ierr( 5 ).NE.0 .OR.
1236 $ ierr( 6 ).NE.0 )
THEN
1237 kfail( l ) = kfail( l ) + 1
1240 $
WRITE( nout, fmt = 9985 ) snames( l )
1242 kpass( l ) = kpass( l ) + 1
1244 $
WRITE( nout, fmt = 9984 ) snames( l )
1249 IF( iverb.GE.1 .AND. errflg )
THEN
1250 IF( ierr( 4 ).NE.0 .OR. iverb.GE.3 )
THEN
1251 CALL pzmprnt( ictxt, nout, ma, na, mem( ipmata ),
1252 $ lda, 0, 0,
'SERIAL_A' )
1253 CALL pb_pzlaprnt( ma, na, mem( ipa ), 1, 1, desca,
1254 $ 0, 0,
'PARALLEL_A', nout,
1256 ELSE IF( ierr( 1 ).NE.0 )
THEN
1257 IF( ( nrowa.GT.0 ).AND.( ncola.GT.0 ) )
1258 $
CALL pzmprnt( ictxt, nout, nrowa, ncola,
1259 $ mem( ipmata+ia-1+(ja-1)*lda ),
1260 $ lda, 0, 0,
'SERIAL_A' )
1261 CALL pb_pzlaprnt( nrowa, ncola, mem( ipa ), ia, ja,
1262 $ desca, 0, 0,
'PARALLEL_A', nout,
1265 IF( bcheck( l ) )
THEN
1266 IF( ierr( 5 ).NE.0 .OR. iverb.GE.3 )
THEN
1267 CALL pzmprnt( ictxt, nout, mb, nb,
1268 $ mem( ipmatb ), ldb, 0, 0,
1271 $ descb, 0, 0,
'PARALLEL_B',
1272 $ nout, mem( ipmatb ) )
1273 ELSE IF( ierr( 2 ).NE.0 )
THEN
1274 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1275 $
CALL pzmprnt( ictxt, nout, nrowb, ncolb,
1276 $ mem( ipmatb+ib-1+(jb-1)*ldb ),
1277 $ ldb, 0, 0,
'SERIAL_B' )
1279 $ jb, descb, 0, 0,
'PARALLEL_B',
1280 $ nout, mem( ipmatb ) )
1283 IF( ccheck( l ) )
THEN
1284 IF( ierr( 6 ).NE.0 .OR. iverb.GE.3 )
THEN
1285 CALL pzmprnt( ictxt, nout, mc, nc,
1286 $ mem( ipmatc ), ldc, 0, 0,
1289 $ descc, 0, 0,
'PARALLEL_C',
1290 $ nout, mem( ipmatc ) )
1291 ELSE IF( ierr( 3 ).NE.0 )
THEN
1292 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1293 $
CALL pzmprnt( ictxt, nout, nrowc, ncolc,
1294 $ mem( ipmatc+ic-1+(jc-1)*ldc ),
1295 $ ldc, 0, 0,
'SERIAL_C' )
1297 $ jc, descc, 0, 0,
'PARALLEL_C',
1298 $ nout, mem( ipmatc ) )
1305 IF( sof.AND.errflg )
1310 40
IF( iam.EQ.0 )
THEN
1311 WRITE( nout, fmt = * )
1312 WRITE( nout, fmt = 9982 ) j
1317 CALL blacs_gridexit( ictxt )
1328 IF( ltest( i ) )
THEN
1329 kskip( i ) = kskip( i ) + tskip
1330 ktests( i ) = kskip( i ) + kfail( i ) + kpass( i )
1337 WRITE( nout, fmt = * )
1338 WRITE( nout, fmt = 9978 )
1339 WRITE( nout, fmt = * )
1340 WRITE( nout, fmt = 9980 )
1341 WRITE( nout, fmt = 9979 )
1344 WRITE( nout, fmt = 9981 )
'|', snames( i ), ktests( i ),
1345 $ kpass( i ), kfail( i ), kskip( i )
1347 WRITE( nout, fmt = * )
1348 WRITE( nout, fmt = 9977 )
1349 WRITE( nout, fmt = * )
1353 CALL blacs_exit( 0 )
1355 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
1356 $
' should be at least 1' )
1357 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
1358 $
'. It can be at most', i4 )
1359 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
1360 9996
FORMAT( 2x,
'Test number ', i4 ,
' started on a ', i6,
' x ',
1361 $ i6,
' process grid.' )
1362 9995
FORMAT( 2x,
' ------------------------------------------------',
1363 $
'-------------------' )
1364 9994
FORMAT( 2x,
' M N K SIDE UPLO TRANSA ',
1366 9993
FORMAT( 5x,i6,1x,i6,1x,i6,6x,a1,5x,a1,7x,a1,7x,a1,5x,a1 )
1367 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
1368 $
' MBA NBA RSRCA CSRCA' )
1369 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
1371 9990
FORMAT( 2x,
' IB JB MB NB IMBB INBB',
1372 $
' MBB NBB RSRCB CSRCB' )
1373 9989
FORMAT( 2x,
' IC JC MC NC IMBC INBC',
1374 $
' MBC NBC RSRCC CSRCC' )
1375 9988
FORMAT(
'Not enough memory for this test: going on to',
1376 $
' next test case.' )
1377 9987
FORMAT(
'Not enough memory. Need: ', i12 )
1378 9986
FORMAT( 2x,
' Tested Subroutine: ', a )
1379 9985
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1380 $
' FAILED ',
' *****' )
1381 9984
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1382 $
' PASSED ',
' *****' )
1383 9983
FORMAT( 2x,
' ***** ERROR ***** Matrix operand ', a,
1384 $
' modified by ', a,
' *****' )
1385 9982
FORMAT( 2x,
'Test number ', i4,
' completed.' )
1386 9981
FORMAT( 2x,a1,2x,a7,8x,i4,6x,i4,5x,i4,4x,i4 )
1387 9980
FORMAT( 2x,
' SUBROUTINE TOTAL TESTS PASSED FAILED ',
1389 9979
FORMAT( 2x,
' ---------- ----------- ------ ------ ',
1391 9978
FORMAT( 2x,
'Testing Summary')
1392 9977
FORMAT( 2x,
'End of Tests.' )
1393 9976
FORMAT( 2x,
'Tests started.' )
1394 9975
FORMAT( 2x,
' ***** ', a,
' has an incorrect value: ',
1396 9974
FORMAT( 2x,
' ***** Operation not supported, error code: ',
1404 SUBROUTINE pzbla3tstinfo( SUMMRY, NOUT, NMAT, DIAGVAL, SIDEVAL,
1405 $ TRNAVAL, TRNBVAL, UPLOVAL, MVAL,
1406 $ NVAL, KVAL, MAVAL, NAVAL, IMBAVAL,
1407 $ MBAVAL, INBAVAL, NBAVAL, RSCAVAL,
1408 $ CSCAVAL, IAVAL, JAVAL, MBVAL, NBVAL,
1409 $ IMBBVAL, MBBVAL, INBBVAL, NBBVAL,
1410 $ RSCBVAL, CSCBVAL, IBVAL, JBVAL,
1411 $ MCVAL, NCVAL, IMBCVAL, MBCVAL,
1412 $ INBCVAL, NBCVAL, RSCCVAL, CSCCVAL,
1413 $ ICVAL, JCVAL, LDVAL, NGRIDS, PVAL,
1414 $ LDPVAL, QVAL, LDQVAL, NBLOG, LTEST, SOF,
1415 $ TEE, IAM, IGAP, IVERB, NPROCS, THRESH,
1416 $ ALPHA, BETA, WORK )
1425 INTEGER IAM, IGAP, IVERB, LDPVAL, LDQVAL, LDVAL, NBLOG,
1426 $ NGRIDS, NMAT, NOUT, NPROCS
1428 COMPLEX*16 ALPHA, BETA
1431 CHARACTER*( * ) SUMMRY
1432 CHARACTER*1 DIAGVAL( LDVAL ), SIDEVAL( LDVAL ),
1433 $ TRNAVAL( LDVAL ), TRNBVAL( LDVAL ),
1436 INTEGER CSCAVAL( LDVAL ), CSCBVAL( LDVAL ),
1437 $ csccval( ldval ), iaval( ldval ),
1438 $ ibval( ldval ), icval( ldval ),
1439 $ imbaval( ldval ), imbbval( ldval ),
1440 $ imbcval( ldval ), inbaval( ldval ),
1441 $ inbbval( ldval ), inbcval( ldval ),
1442 $ javal( ldval ), jbval( ldval ), jcval( ldval ),
1443 $ kval( ldval ), maval( ldval ), mbaval( ldval ),
1444 $ mbbval( ldval ), mbcval( ldval ),
1445 $ mbval( ldval ), mcval( ldval ), mval( ldval ),
1446 $ naval( ldval ), nbaval( ldval ),
1447 $ nbbval( ldval ), nbcval( ldval ),
1448 $ nbval( ldval ), ncval( ldval ), nval( ldval ),
1449 $ pval( ldpval ), qval( ldqval ),
1450 $ rscaval( ldval ), rscbval( ldval ),
1451 $ rsccval( ldval ), work( * )
1743 PARAMETER ( NIN = 11, nsubs = 11 )
1748 DOUBLE PRECISION EPS
1752 CHARACTER*79 USRINFO
1755 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1756 $ blacs_gridinit, blacs_setup,
icopy, igebr2d,
1757 $ igebs2d, sgebr2d, sgebs2d, zgebr2d, zgebs2d
1760 DOUBLE PRECISION PDLAMCH
1764 INTRINSIC char, ichar,
max,
min
1767 CHARACTER*7 SNAMES( NSUBS )
1768 COMMON /SNAMEC/SNAMES
1779 OPEN( nin, file=
'PZBLAS3TST.dat', status=
'OLD' )
1780 READ( nin, fmt = * ) summry
1785 READ( nin, fmt = 9999 ) usrinfo
1789 READ( nin, fmt = * ) summry
1790 READ( nin, fmt = * ) nout
1791 IF( nout.NE.0 .AND. nout.NE.6 )
1792 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1798 READ( nin, fmt = * ) sof
1802 READ( nin, fmt = * ) tee
1806 READ( nin, fmt = * ) iverb
1807 IF( iverb.LT.0 .OR. iverb.GT.3 )
1812 READ( nin, fmt = * ) igap
1818 READ( nin, fmt = * ) thresh
1824 READ( nin, fmt = * ) nblog
1830 READ( nin, fmt = * ) ngrids
1831 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1832 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1834 ELSE IF( ngrids.GT.ldqval )
THEN
1835 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1841 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1842 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1846 READ( nin, fmt = * ) alpha
1847 READ( nin, fmt = * ) beta
1851 READ( nin, fmt = * ) nmat
1852 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1853 WRITE( nout, fmt = 9998 )
'Tests', ldval
1859 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1860 READ( nin, fmt = * ) ( sideval( i ), i = 1, nmat )
1861 READ( nin, fmt = * ) ( trnaval( i ), i = 1, nmat )
1862 READ( nin, fmt = * ) ( trnbval( i ), i = 1, nmat )
1863 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1864 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1865 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1866 READ( nin, fmt = * ) ( kval( i ), i = 1, nmat )
1867 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1868 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1869 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1870 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1871 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1872 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1873 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1874 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1875 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1876 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1877 READ( nin, fmt = * ) ( mbval( i ), i = 1, nmat )
1878 READ( nin, fmt = * ) ( nbval( i ), i = 1, nmat )
1879 READ( nin, fmt = * ) ( imbbval( i ), i = 1, nmat )
1880 READ( nin, fmt = * ) ( inbbval( i ), i = 1, nmat )
1881 READ( nin, fmt = * ) ( mbbval( i ), i = 1, nmat )
1882 READ( nin, fmt = * ) ( nbbval( i ), i = 1, nmat )
1883 READ( nin, fmt = * ) ( rscbval( i ), i = 1, nmat )
1884 READ( nin, fmt = * ) ( cscbval( i ), i = 1, nmat )
1885 READ( nin, fmt = * ) ( ibval( i ), i = 1, nmat )
1886 READ( nin, fmt = * ) ( jbval( i ), i = 1, nmat )
1887 READ( nin, fmt = * ) ( mcval( i ), i = 1, nmat )
1888 READ( nin, fmt = * ) ( ncval( i ), i = 1, nmat )
1889 READ( nin, fmt = * ) ( imbcval( i ), i = 1, nmat )
1890 READ( nin, fmt = * ) ( inbcval( i ), i = 1, nmat )
1891 READ( nin, fmt = * ) ( mbcval( i ), i = 1, nmat )
1892 READ( nin, fmt = * ) ( nbcval( i ), i = 1, nmat )
1893 READ( nin, fmt = * ) ( rsccval( i ), i = 1, nmat )
1894 READ( nin, fmt = * ) ( csccval( i ), i = 1, nmat )
1895 READ( nin, fmt = * ) ( icval( i ), i = 1, nmat )
1896 READ( nin, fmt = * ) ( jcval( i ), i = 1, nmat )
1902 ltest( i ) = .false.
1905 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1907 IF( snamet.EQ.snames( i ) )
1911 WRITE( nout, fmt = 9995 )snamet
1927 IF( nprocs.LT.1 )
THEN
1930 nprocs =
max( nprocs, pval( i )*qval( i ) )
1932 CALL blacs_setup( iam, nprocs )
1938 CALL blacs_get( -1, 0, ictxt )
1939 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1947 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, thresh, 1 )
1948 CALL zgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1949 CALL zgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1954 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1974 work( i ) = ichar( diagval( j ) )
1975 work( i+1 ) = ichar( sideval( j ) )
1976 work( i+2 ) = ichar( trnaval( j ) )
1977 work( i+3 ) = ichar( trnbval( j ) )
1978 work( i+4 ) = ichar( uploval( j ) )
1981 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1983 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1985 CALL icopy( nmat, mval, 1, work( i ), 1 )
1987 CALL icopy( nmat, nval, 1, work( i ), 1 )
1989 CALL icopy( nmat, kval, 1, work( i ), 1 )
1991 CALL icopy( nmat, maval, 1, work( i ), 1 )
1993 CALL icopy( nmat, naval, 1, work( i ), 1 )
1995 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1997 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1999 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
2001 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
2003 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
2005 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
2007 CALL icopy( nmat, iaval, 1, work( i ), 1 )
2009 CALL icopy( nmat, javal, 1, work( i ), 1 )
2011 CALL icopy( nmat, mbval, 1, work( i ), 1 )
2013 CALL icopy( nmat, nbval, 1, work( i ), 1 )
2015 CALL icopy( nmat, imbbval, 1, work( i ), 1 )
2017 CALL icopy( nmat, inbbval, 1, work( i ), 1 )
2019 CALL icopy( nmat, mbbval, 1, work( i ), 1 )
2021 CALL icopy( nmat, nbbval, 1, work( i ), 1 )
2023 CALL icopy( nmat, rscbval, 1, work( i ), 1 )
2025 CALL icopy( nmat, cscbval, 1, work( i ), 1 )
2027 CALL icopy( nmat, ibval, 1, work( i ), 1 )
2029 CALL icopy( nmat, jbval, 1, work( i ), 1 )
2031 CALL icopy( nmat, mcval, 1, work( i ), 1 )
2033 CALL icopy( nmat, ncval, 1, work( i ), 1 )
2035 CALL icopy( nmat, imbcval, 1, work( i ), 1 )
2037 CALL icopy( nmat, inbcval, 1, work( i ), 1 )
2039 CALL icopy( nmat, mbcval, 1, work( i ), 1 )
2041 CALL icopy( nmat, nbcval, 1, work( i ), 1 )
2043 CALL icopy( nmat, rsccval, 1, work( i ), 1 )
2045 CALL icopy( nmat, csccval, 1, work( i ), 1 )
2047 CALL icopy( nmat, icval, 1, work( i ), 1 )
2049 CALL icopy( nmat, jcval, 1, work( i ), 1 )
2053 IF( ltest( j ) )
THEN
2061 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
2065 WRITE( nout, fmt = 9999 )
'Level 3 PBLAS testing program.'
2066 WRITE( nout, fmt = 9999 ) usrinfo
2067 WRITE( nout, fmt = * )
2068 WRITE( nout, fmt = 9999 )
2069 $
'Tests of the complex double precision '//
2071 WRITE( nout, fmt = * )
2072 WRITE( nout, fmt = 9993 ) nmat
2073 WRITE( nout, fmt = 9979 ) nblog
2074 WRITE( nout, fmt = 9992 ) ngrids
2075 WRITE( nout, fmt = 9990 )
2076 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
2078 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 6,
2079 $
min( 10, ngrids ) )
2081 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 11,
2082 $
min( 15, ngrids ) )
2084 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 16, ngrids )
2085 WRITE( nout, fmt = 9990 )
2086 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
2088 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 6,
2089 $
min( 10, ngrids ) )
2091 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 11,
2092 $
min( 15, ngrids ) )
2094 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 16, ngrids )
2095 WRITE( nout, fmt = 9988 ) sof
2096 WRITE( nout, fmt = 9987 ) tee
2097 WRITE( nout, fmt = 9983 ) igap
2098 WRITE( nout, fmt = 9986 ) iverb
2099 WRITE( nout, fmt = 9980 ) thresh
2100 WRITE( nout, fmt = 9982 ) alpha
2101 WRITE( nout, fmt = 9981 ) beta
2102 IF( ltest( 1 ) )
THEN
2103 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... Yes'
2105 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... No '
2108 IF( ltest( i ) )
THEN
2109 WRITE( nout, fmt = 9984 ) snames( i ),
' ... Yes'
2111 WRITE( nout, fmt = 9984 ) snames( i ),
' ... No '
2114 WRITE( nout, fmt = 9994 ) eps
2115 WRITE( nout, fmt = * )
2122 $
CALL blacs_setup( iam, nprocs )
2127 CALL blacs_get( -1, 0, ictxt )
2128 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2134 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, thresh, 1, 0, 0 )
2135 CALL zgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
2136 CALL zgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
2138 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
2143 i = 2*ngrids + 38*nmat + nsubs + 4
2144 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
2147 IF( work( i ).EQ.1 )
THEN
2153 IF( work( i ).EQ.1 )
THEN
2164 diagval( j ) = char( work( i ) )
2165 sideval( j ) = char( work( i+1 ) )
2166 trnaval( j ) = char( work( i+2 ) )
2167 trnbval( j ) = char( work( i+3 ) )
2168 uploval( j ) = char( work( i+4 ) )
2171 CALL icopy( ngrids, work( i ), 1, pval, 1 )
2173 CALL icopy( ngrids, work( i ), 1, qval, 1 )
2175 CALL icopy( nmat, work( i ), 1, mval, 1 )
2177 CALL icopy( nmat, work( i ), 1, nval, 1 )
2179 CALL icopy( nmat, work( i ), 1, kval, 1 )
2181 CALL icopy( nmat, work( i ), 1, maval, 1 )
2183 CALL icopy( nmat, work( i ), 1, naval, 1 )
2185 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
2187 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
2189 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
2191 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
2193 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
2195 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
2197 CALL icopy( nmat, work( i ), 1, iaval, 1 )
2199 CALL icopy( nmat, work( i ), 1, javal, 1 )
2201 CALL icopy( nmat, work( i ), 1, mbval, 1 )
2203 CALL icopy( nmat, work( i ), 1, nbval, 1 )
2205 CALL icopy( nmat, work( i ), 1, imbbval, 1 )
2207 CALL icopy( nmat, work( i ), 1, inbbval, 1 )
2209 CALL icopy( nmat, work( i ), 1, mbbval, 1 )
2211 CALL icopy( nmat, work( i ), 1, nbbval, 1 )
2213 CALL icopy( nmat, work( i ), 1, rscbval, 1 )
2215 CALL icopy( nmat, work( i ), 1, cscbval, 1 )
2217 CALL icopy( nmat, work( i ), 1, ibval, 1 )
2219 CALL icopy( nmat, work( i ), 1, jbval, 1 )
2221 CALL icopy( nmat, work( i ), 1, mcval, 1 )
2223 CALL icopy( nmat, work( i ), 1, ncval, 1 )
2225 CALL icopy( nmat, work( i ), 1, imbcval, 1 )
2227 CALL icopy( nmat, work( i ), 1, inbcval, 1 )
2229 CALL icopy( nmat, work( i ), 1, mbcval, 1 )
2231 CALL icopy( nmat, work( i ), 1, nbcval, 1 )
2233 CALL icopy( nmat, work( i ), 1, rsccval, 1 )
2235 CALL icopy( nmat, work( i ), 1, csccval, 1 )
2237 CALL icopy( nmat, work( i ), 1, icval, 1 )
2239 CALL icopy( nmat, work( i ), 1, jcval, 1 )
2243 IF( work( i ).EQ.1 )
THEN
2246 ltest( j ) = .false.
2253 CALL blacs_gridexit( ictxt )
2257 120
WRITE( nout, fmt = 9997 )
2259 IF( nout.NE.6 .AND. nout.NE.0 )
2261 CALL blacs_abort( ictxt, 1 )
2266 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
2268 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
2269 9996
FORMAT( a7, l2 )
2270 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
2271 $ /
' ******* TESTS ABANDONED *******' )
2272 9994
FORMAT( 2x,
'Relative machine precision (eps) is taken to be ',
2274 9993
FORMAT( 2x,
'Number of Tests : ', i6 )
2275 9992
FORMAT( 2x,
'Number of process grids : ', i6 )
2276 9991
FORMAT( 2x,
' : ', 5i6 )
2277 9990
FORMAT( 2x, a1,
' : ', 5i6 )
2278 9988
FORMAT( 2x,
'Stop on failure flag : ', l6 )
2279 9987
FORMAT( 2x,
'Test for error exits flag : ', l6 )
2280 9986
FORMAT( 2x,
'Verbosity level : ', i6 )
2281 9985
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
2282 9984
FORMAT( 2x,
' ', a, a8 )
2283 9983
FORMAT( 2x,
'Leading dimension gap : ', i6 )
2284 9982
FORMAT( 2x,
'Alpha : (', g16.6,
2286 9981
FORMAT( 2x,
'Beta : (', g16.6,
2288 9980
FORMAT( 2x,
'Threshold value : ', g16.6 )
2289 9979
FORMAT( 2x,
'Logical block size : ', i6 )
2302 INTEGER INOUT, NPROCS
2376 PARAMETER ( NSUBS = 11 )
2380 INTEGER I, ICTXT, MYCOL, MYROW, NPCOL, NPROW
2383 INTEGER SCODE( NSUBS )
2386 EXTERNAL BLACS_GET, BLACS_GRIDEXIT, BLACS_GRIDINFO,
2387 $ blacs_gridinit,
pzdimee, pzgeadd, pzgemm,
2389 $ pzsymm, pzsyr2k, pzsyrk, pztradd, pztrmm,
2395 CHARACTER*7 SNAMES( NSUBS )
2396 COMMON /SNAMEC/SNAMES
2397 COMMON /PBERRORC/NOUT, ABRTFLG
2400 DATA scode/31, 32, 32, 33, 34, 35, 36, 38, 38, 39,
2408 CALL blacs_get( -1, 0, ictxt )
2409 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2410 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2423 IF( ltest( i ) )
THEN
2424 CALL pzoptee( ictxt, nout, pzgemm, scode( i ), snames( i ) )
2425 CALL pzdimee( ictxt, nout, pzgemm, scode( i ), snames( i ) )
2426 CALL pzmatee( ictxt, nout, pzgemm, scode( i ), snames( i ) )
2432 IF( ltest( i ) )
THEN
2433 CALL pzoptee( ictxt, nout, pzsymm, scode( i ), snames( i ) )
2434 CALL pzdimee( ictxt, nout, pzsymm, scode( i ), snames( i ) )
2435 CALL pzmatee( ictxt, nout, pzsymm, scode( i ), snames( i ) )
2441 IF( ltest( i ) )
THEN
2442 CALL pzoptee( ictxt, nout, pzhemm, scode( i ), snames( i ) )
2443 CALL pzdimee( ictxt, nout, pzhemm, scode( i ), snames( i ) )
2444 CALL pzmatee( ictxt, nout, pzhemm, scode( i ), snames( i ) )
2450 IF( ltest( i ) )
THEN
2451 CALL pzoptee( ictxt, nout, pzsyrk, scode( i ), snames( i ) )
2452 CALL pzdimee( ictxt, nout, pzsyrk, scode( i ), snames( i ) )
2453 CALL pzmatee( ictxt, nout, pzsyrk, scode( i ), snames( i ) )
2459 IF( ltest( i ) )
THEN
2460 CALL pzoptee( ictxt, nout, pzherk, scode( i ), snames( i ) )
2461 CALL pzdimee( ictxt, nout, pzherk, scode( i ), snames( i ) )
2462 CALL pzmatee( ictxt, nout, pzherk, scode( i ), snames( i ) )
2468 IF( ltest( i ) )
THEN
2469 CALL pzoptee( ictxt, nout, pzsyr2k, scode( i ), snames( i ) )
2470 CALL pzdimee( ictxt, nout, pzsyr2k, scode( i ), snames( i ) )
2471 CALL pzmatee( ictxt, nout, pzsyr2k, scode( i ), snames( i ) )
2477 IF( ltest( i ) )
THEN
2478 CALL pzoptee( ictxt, nout, pzher2k, scode( i ), snames( i ) )
2479 CALL pzdimee( ictxt, nout, pzher2k, scode( i ), snames( i ) )
2480 CALL pzmatee( ictxt, nout, pzher2k, scode( i ), snames( i ) )
2486 IF( ltest( i ) )
THEN
2487 CALL pzoptee( ictxt, nout, pztrmm, scode( i ), snames( i ) )
2488 CALL pzdimee( ictxt, nout, pztrmm, scode( i ), snames( i ) )
2489 CALL pzmatee( ictxt, nout, pztrmm, scode( i ), snames( i ) )
2495 IF( ltest( i ) )
THEN
2496 CALL pzoptee( ictxt, nout, pztrsm, scode( i ), snames( i ) )
2497 CALL pzdimee( ictxt, nout, pztrsm, scode( i ), snames( i ) )
2498 CALL pzmatee( ictxt, nout, pztrsm, scode( i ), snames( i ) )
2504 IF( ltest( i ) )
THEN
2505 CALL pzoptee( ictxt, nout, pzgeadd, scode( i ), snames( i ) )
2506 CALL pzdimee( ictxt, nout, pzgeadd, scode( i ), snames( i ) )
2507 CALL pzmatee( ictxt, nout, pzgeadd, scode( i ), snames( i ) )
2513 IF( ltest( i ) )
THEN
2514 CALL pzoptee( ictxt, nout, pztradd, scode( i ), snames( i ) )
2515 CALL pzdimee( ictxt, nout, pztradd, scode( i ), snames( i ) )
2516 CALL pzmatee( ictxt, nout, pztradd, scode( i ), snames( i ) )
2519 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
2520 $
WRITE( nout, fmt = 9999 )
2522 CALL blacs_gridexit( ictxt )
2528 9999
FORMAT( 2x,
'Error-exit tests completed.' )
2535 SUBROUTINE pzchkarg3( ICTXT, NOUT, SNAME, SIDE, UPLO, TRANSA,
2536 $ TRANSB, DIAG, M, N, K, ALPHA, IA, JA,
2537 $ DESCA, IB, JB, DESCB, BETA, IC, JC, DESCC,
2546 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2547 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2549 COMPLEX*16 ALPHA, BETA
2553 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2669 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2670 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2672 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2673 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2674 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2675 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2678 CHARACTER*1 DIAGREF, SIDEREF, TRANSAREF, TRANSBREF, UPLOREF
2679 INTEGER I, IAREF, IBREF, ICREF, JAREF, JBREF, JCREF,
2680 $ KREF, MREF, MYCOL, MYROW, NPCOL, NPROW, NREF
2681 COMPLEX*16 ALPHAREF, BETAREF
2684 CHARACTER*15 ARGNAME
2685 INTEGER DESCAREF( DLEN_ ), DESCBREF( DLEN_ ),
2689 EXTERNAL blacs_gridinfo, igsum2d
2702 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2706 IF( info.EQ.0 )
THEN
2720 descaref( i ) = desca( i )
2725 descbref( i ) = descb( i )
2731 desccref( i ) = descc( i )
2739 IF( .NOT. lsame( diag, diagref ) )
THEN
2740 WRITE( argname, fmt =
'(A)' )
'DIAG'
2741 ELSE IF( .NOT. lsame( side, sideref ) )
THEN
2742 WRITE( argname, fmt =
'(A)' )
'SIDE'
2743 ELSE IF( .NOT. lsame( transa, transaref ) )
THEN
2744 WRITE( argname, fmt =
'(A)' )
'TRANSA'
2745 ELSE IF( .NOT. lsame( transb, transbref ) )
THEN
2746 WRITE( argname, fmt =
'(A)' )
'TRANSB'
2747 ELSE IF( .NOT. lsame( uplo, uploref ) )
THEN
2748 WRITE( argname, fmt =
'(A)' )
'UPLO'
2749 ELSE IF( m.NE.mref )
THEN
2750 WRITE( argname, fmt =
'(A)' )
'M'
2751 ELSE IF( n.NE.nref )
THEN
2752 WRITE( argname, fmt =
'(A)' )
'N'
2753 ELSE IF( k.NE.kref )
THEN
2754 WRITE( argname, fmt =
'(A)' )
'K'
2755 ELSE IF( alpha.NE.alpharef )
THEN
2756 WRITE( argname, fmt =
'(A)' )
'ALPHA'
2757 ELSE IF( ia.NE.iaref )
THEN
2758 WRITE( argname, fmt =
'(A)' )
'IA'
2759 ELSE IF( ja.NE.jaref )
THEN
2760 WRITE( argname, fmt =
'(A)' )
'JA'
2761 ELSE IF( desca( dtype_ ).NE.descaref( dtype_ ) )
THEN
2762 WRITE( argname, fmt =
'(A)' )
'DESCA( DTYPE_ )'
2763 ELSE IF( desca( m_ ).NE.descaref( m_ ) )
THEN
2764 WRITE( argname, fmt =
'(A)' )
'DESCA( M_ )'
2765 ELSE IF( desca( n_ ).NE.descaref( n_ ) )
THEN
2766 WRITE( argname, fmt =
'(A)' )
'DESCA( N_ )'
2767 ELSE IF( desca( imb_ ).NE.descaref( imb_ ) )
THEN
2768 WRITE( argname, fmt =
'(A)' )
'DESCA( IMB_ )'
2769 ELSE IF( desca( inb_ ).NE.descaref( inb_ ) )
THEN
2770 WRITE( argname, fmt =
'(A)' )
'DESCA( INB_ )'
2771 ELSE IF( desca( mb_ ).NE.descaref( mb_ ) )
THEN
2772 WRITE( argname, fmt =
'(A)' )
'DESCA( MB_ )'
2773 ELSE IF( desca( nb_ ).NE.descaref( nb_ ) )
THEN
2774 WRITE( argname, fmt =
'(A)' )
'DESCA( NB_ )'
2775 ELSE IF( desca( rsrc_ ).NE.descaref( rsrc_ ) )
THEN
2776 WRITE( argname, fmt =
'(A)' )
'DESCA( RSRC_ )'
2777 ELSE IF( desca( csrc_ ).NE.descaref( csrc_ ) )
THEN
2778 WRITE( argname, fmt =
'(A)' )
'DESCA( CSRC_ )'
2779 ELSE IF( desca( ctxt_ ).NE.descaref( ctxt_ ) )
THEN
2780 WRITE( argname, fmt =
'(A)' )
'DESCA( CTXT_ )'
2781 ELSE IF( desca( lld_ ).NE.descaref( lld_ ) )
THEN
2782 WRITE( argname, fmt =
'(A)' )
'DESCA( LLD_ )'
2783 ELSE IF( ib.NE.ibref )
THEN
2784 WRITE( argname, fmt =
'(A)' )
'IB'
2785 ELSE IF( jb.NE.jbref )
THEN
2786 WRITE( argname, fmt =
'(A)' )
'JB'
2787 ELSE IF( descb( dtype_ ).NE.descbref( dtype_ ) )
THEN
2788 WRITE( argname, fmt =
'(A)' )
'DESCB( DTYPE_ )'
2789 ELSE IF( descb( m_ ).NE.descbref( m_ ) )
THEN
2790 WRITE( argname, fmt =
'(A)' )
'DESCB( M_ )'
2791 ELSE IF( descb( n_ ).NE.descbref( n_ ) )
THEN
2792 WRITE( argname, fmt =
'(A)' )
'DESCB( N_ )'
2793 ELSE IF( descb( imb_ ).NE.descbref( imb_ ) )
THEN
2794 WRITE( argname, fmt =
'(A)' )
'DESCB( IMB_ )'
2795 ELSE IF( descb( inb_ ).NE.descbref( inb_ ) )
THEN
2796 WRITE( argname, fmt =
'(A)' )
'DESCB( INB_ )'
2797 ELSE IF( descb( mb_ ).NE.descbref( mb_ ) )
THEN
2798 WRITE( argname, fmt =
'(A)' )
'DESCB( MB_ )'
2799 ELSE IF( descb( nb_ ).NE.descbref( nb_ ) )
THEN
2800 WRITE( argname, fmt =
'(A)' )
'DESCB( NB_ )'
2801 ELSE IF( descb( rsrc_ ).NE.descbref( rsrc_ ) )
THEN
2802 WRITE( argname, fmt =
'(A)' )
'DESCB( RSRC_ )'
2803 ELSE IF( descb( csrc_ ).NE.descbref( csrc_ ) )
THEN
2804 WRITE( argname, fmt =
'(A)' )
'DESCB( CSRC_ )'
2805 ELSE IF( descb( ctxt_ ).NE.descbref( ctxt_ ) )
THEN
2806 WRITE( argname, fmt =
'(A)' )
'DESCB( CTXT_ )'
2807 ELSE IF( descb( lld_ ).NE.descbref( lld_ ) )
THEN
2808 WRITE( argname, fmt =
'(A)' )
'DESCB( LLD_ )'
2809 ELSE IF( beta.NE.betaref )
THEN
2810 WRITE( argname, fmt =
'(A)' )
'BETA'
2811 ELSE IF( ic.NE.icref )
THEN
2812 WRITE( argname, fmt =
'(A)' )
'IC'
2813 ELSE IF( jc.NE.jcref )
THEN
2814 WRITE( argname, fmt =
'(A)' )
'JC'
2815 ELSE IF( descc( dtype_ ).NE.desccref( dtype_ ) )
THEN
2816 WRITE( argname, fmt =
'(A)' )
'DESCC( DTYPE_ )'
2817 ELSE IF( descc( m_ ).NE.desccref( m_ ) )
THEN
2818 WRITE( argname, fmt =
'(A)' )
'DESCC( M_ )'
2819 ELSE IF( descc( n_ ).NE.desccref( n_ ) )
THEN
2820 WRITE( argname, fmt =
'(A)' )
'DESCC( N_ )'
2821 ELSE IF( descc( imb_ ).NE.desccref( imb_ ) )
THEN
2822 WRITE( argname, fmt =
'(A)' )
'DESCC( IMB_ )'
2823 ELSE IF( descc( inb_ ).NE.desccref( inb_ ) )
THEN
2824 WRITE( argname, fmt =
'(A)' )
'DESCC( INB_ )'
2825 ELSE IF( descc( mb_ ).NE.desccref( mb_ ) )
THEN
2826 WRITE( argname, fmt =
'(A)' )
'DESCC( MB_ )'
2827 ELSE IF( descc( nb_ ).NE.desccref( nb_ ) )
THEN
2828 WRITE( argname, fmt =
'(A)' )
'DESCC( NB_ )'
2829 ELSE IF( descc( rsrc_ ).NE.desccref( rsrc_ ) )
THEN
2830 WRITE( argname, fmt =
'(A)' )
'DESCC( RSRC_ )'
2831 ELSE IF( descc( csrc_ ).NE.desccref( csrc_ ) )
THEN
2832 WRITE( argname, fmt =
'(A)' )
'DESCC( CSRC_ )'
2833 ELSE IF( descc( ctxt_ ).NE.desccref( ctxt_ ) )
THEN
2834 WRITE( argname, fmt =
'(A)' )
'DESCC( CTXT_ )'
2835 ELSE IF( descc( lld_ ).NE.desccref( lld_ ) )
THEN
2836 WRITE( argname, fmt =
'(A)' )
'DESCC( LLD_ )'
2841 CALL igsum2d( ictxt,
'All',
' ', 1, 1, info, 1, -1, 0 )
2843 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2845 IF( info.NE.0 )
THEN
2846 WRITE( nout, fmt = 9999 ) argname, sname
2848 WRITE( nout, fmt = 9998 ) sname
2855 9999
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2856 $
' FAILED changed ', a,
' *****' )
2857 9998
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2865 SUBROUTINE pzblas3tstchk( ICTXT, NOUT, NROUT, SIDE, UPLO, TRANSA,
2866 $ TRANSB, DIAG, M, N, K, ALPHA, A, PA, IA,
2867 $ JA, DESCA, B, PB, IB, JB, DESCB, BETA,
2868 $ C, PC, IC, JC, DESCC, THRESH, ROGUE,
2869 $ WORK, RWORK, INFO )
2877 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2878 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2881 COMPLEX*16 ALPHA, BETA, ROGUE
2884 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2885 DOUBLE PRECISION RWORK( * )
2886 COMPLEX*16 A( * ), B( * ), C( * ), PA( * ), PB( * ),
2887 $ PC( * ), WORK( * )
3113 DOUBLE PRECISION RZERO
3114 PARAMETER ( RZERO = 0.0d+0 )
3115 COMPLEX*16 ONE, ZERO
3116 PARAMETER ( ONE = ( 1.0d+0, 0.0d+0 ),
3117 $ zero = ( 0.0d+0, 0.0d+0 ) )
3118 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
3119 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
3121 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
3122 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
3123 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
3124 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
3127 INTEGER I, MYCOL, MYROW, NPCOL, NPROW
3128 DOUBLE PRECISION ERR
3129 COMPLEX*16 ALPHA1, BETA1
3143 INTRINSIC dble, dcmplx
3151 IF( ( m.LE.0 ).OR.( n.LE.0 ) )
3156 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
3162 IF( nrout.EQ.1 )
THEN
3168 CALL pzmmch( ictxt, transa, transb, m, n, k, alpha, a, ia, ja,
3169 $ desca, b, ib, jb, descb, beta, c, pc, ic, jc,
3170 $ descc, work, rwork, err, ierr( 3 ) )
3172 IF( ierr( 3 ).NE.0 )
THEN
3173 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3174 $
WRITE( nout, fmt = 9998 )
3175 ELSE IF( err.GT.dble( thresh ) )
THEN
3176 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3177 $
WRITE( nout, fmt = 9997 ) err
3182 IF( lsame( transa,
'N' ) )
THEN
3183 CALL pzchkmin( err, m, k, a, pa, ia, ja, desca, ierr( 1 ) )
3185 CALL pzchkmin( err, k, m, a, pa, ia, ja, desca, ierr( 1 ) )
3187 IF( lsame( transb,
'N' ) )
THEN
3188 CALL pzchkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3190 CALL pzchkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3193 ELSE IF( nrout.EQ.2 )
THEN
3199 IF( lsame( side,
'L' ) )
THEN
3200 CALL pzmmch( ictxt,
'No transpose',
'No transpose', m, n, m,
3201 $ alpha, a, ia, ja, desca, b, ib, jb, descb,
3202 $ beta, c, pc, ic, jc, descc, work, rwork, err,
3205 CALL pzmmch( ictxt,
'No transpose',
'No transpose', m, n, n,
3206 $ alpha, b, ib, jb, descb, a, ia, ja, desca,
3207 $ beta, c, pc, ic, jc, descc, work, rwork, err,
3211 IF( ierr( 3 ).NE.0 )
THEN
3212 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3213 $
WRITE( nout, fmt = 9998 )
3214 ELSE IF( err.GT.dble( thresh ) )
THEN
3215 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3216 $
WRITE( nout, fmt = 9997 ) err
3221 IF( lsame( uplo,
'L' ) )
THEN
3222 IF( lsame( side,
'L' ) )
THEN
3223 CALL pb_zlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3224 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3226 CALL pb_zlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3227 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3230 IF( lsame( side,
'L' ) )
THEN
3231 CALL pb_zlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3232 $ a( ia+1+(ja-1)*desca( m_ ) ),
3235 CALL pb_zlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3236 $ a( ia+1+(ja-1)*desca( m_ ) ),
3241 IF( lsame( side,
'L' ) )
THEN
3242 CALL pzchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3244 CALL pzchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3246 CALL pzchkmin( err, m, n, b, pb, ib, jb, descb, ierr( 2 ) )
3248 ELSE IF( nrout.EQ.3 )
THEN
3254 IF( lsame( side,
'L' ) )
THEN
3255 CALL pzmmch( ictxt,
'No transpose',
'No transpose', m, n, m,
3256 $ alpha, a, ia, ja, desca, b, ib, jb, descb,
3257 $ beta, c, pc, ic, jc, descc, work, rwork, err,
3260 CALL pzmmch( ictxt,
'No transpose',
'No transpose', m, n, n,
3261 $ alpha, b, ib, jb, descb, a, ia, ja, desca,
3262 $ beta, c, pc, ic, jc, descc, work, rwork, err,
3266 IF( ierr( 3 ).NE.0 )
THEN
3267 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3268 $
WRITE( nout, fmt = 9998 )
3269 ELSE IF( err.GT.dble( thresh ) )
THEN
3270 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3271 $
WRITE( nout, fmt = 9997 ) err
3276 IF( lsame( uplo,
'L' ) )
THEN
3277 IF( lsame( side,
'L' ) )
THEN
3278 CALL pb_zlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3279 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3281 CALL pb_zlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3282 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3285 IF( lsame( side,
'L' ) )
THEN
3286 CALL pb_zlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3287 $ a( ia+1+(ja-1)*desca( m_ ) ),
3290 CALL pb_zlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3291 $ a( ia+1+(ja-1)*desca( m_ ) ),
3296 IF( lsame( side,
'L' ) )
THEN
3297 CALL pzchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3299 CALL pzchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3301 CALL pzchkmin( err, m, n, b, pb, ib, jb, descb, ierr( 2 ) )
3303 ELSE IF( nrout.EQ.4 )
THEN
3309 IF( lsame( transa,
'N' ) )
THEN
3310 CALL pzmmch1( ictxt, uplo,
'No transpose', n, k, alpha, a,
3311 $ ia, ja, desca, beta, c, pc, ic, jc, descc,
3312 $ work, rwork, err, ierr( 3 ) )
3314 CALL pzmmch1( ictxt, uplo,
'Transpose', n, k, alpha, a, ia,
3315 $ ja, desca, beta, c, pc, ic, jc, descc, work,
3316 $ rwork, err, ierr( 3 ) )
3319 IF( ierr( 3 ).NE.0 )
THEN
3320 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3321 $
WRITE( nout, fmt = 9998 )
3322 ELSE IF( err.GT.dble( thresh ) )
THEN
3323 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3324 $
WRITE( nout, fmt = 9997 ) err
3329 IF( lsame( transa,
'N' ) )
THEN
3330 CALL pzchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3332 CALL pzchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3335 ELSE IF( nrout.EQ.5 )
THEN
3341 beta1 = dcmplx( dble( beta ), rzero )
3342 alpha1 = dcmplx( dble( alpha ), rzero )
3343 IF( lsame( transa,
'N' ) )
THEN
3344 CALL pzmmch1( ictxt, uplo,
'Hermitian', n, k, alpha1, a, ia,
3345 $ ja, desca, beta1, c, pc, ic, jc, descc, work,
3346 $ rwork, err, ierr( 3 ) )
3348 CALL pzmmch1( ictxt, uplo,
'Conjugate transpose', n, k,
3349 $ alpha1, a, ia, ja, desca, beta1, c, pc, ic,
3350 $ jc, descc, work, rwork, err, ierr( 3 ) )
3353 IF( ierr( 3 ).NE.0 )
THEN
3354 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3355 $
WRITE( nout, fmt = 9998 )
3356 ELSE IF( err.GT.dble( thresh ) )
THEN
3357 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3358 $
WRITE( nout, fmt = 9997 ) err
3363 IF( lsame( transa,
'N' ) )
THEN
3364 CALL pzchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3366 CALL pzchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3369 ELSE IF( nrout.EQ.6 )
THEN
3375 IF( lsame( transa,
'N' ) )
THEN
3376 CALL pzmmch2( ictxt, uplo,
'No transpose', n, k, alpha, a,
3377 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3378 $ ic, jc, descc, work, rwork, err, ierr( 3 ) )
3380 CALL pzmmch2( ictxt, uplo,
'Transpose', n, k, alpha, a,
3381 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3382 $ ic, jc, descc, work, rwork, err,
3386 IF( ierr( 3 ).NE.0 )
THEN
3387 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3388 $
WRITE( nout, fmt = 9998 )
3389 ELSE IF( err.GT.dble( thresh ) )
THEN
3390 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3391 $
WRITE( nout, fmt = 9997 ) err
3396 IF( lsame( transa,
'N' ) )
THEN
3397 CALL pzchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3398 CALL pzchkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3400 CALL pzchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3401 CALL pzchkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3404 ELSE IF( nrout.EQ.7 )
THEN
3410 beta1 = dcmplx( dble( beta ), rzero )
3411 IF( lsame( transa,
'N' ) )
THEN
3412 CALL pzmmch2( ictxt, uplo,
'Hermitian', n, k, alpha, a, ia,
3413 $ ja, desca, b, ib, jb, descb, beta1, c, pc, ic,
3414 $ jc, descc, work, rwork, err, ierr( 3 ) )
3416 CALL pzmmch2( ictxt, uplo,
'Conjugate transpose', n, k,
3417 $ alpha, a, ia, ja, desca, b, ib, jb, descb,
3418 $ beta1, c, pc, ic, jc, descc, work, rwork, err,
3422 IF( ierr( 3 ).NE.0 )
THEN
3423 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3424 $
WRITE( nout, fmt = 9998 )
3425 ELSE IF( err.GT.dble( thresh ) )
THEN
3426 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3427 $
WRITE( nout, fmt = 9997 ) err
3432 IF( lsame( transa,
'N' ) )
THEN
3433 CALL pzchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3434 CALL pzchkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3436 CALL pzchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3437 CALL pzchkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3440 ELSE IF( nrout.EQ.8 )
THEN
3446 IF( lsame( side,
'L' ) )
THEN
3447 CALL pzmmch( ictxt, transa,
'No transpose', m, n, m,
3448 $ alpha, a, ia, ja, desca, c, ib, jb, descb,
3449 $ zero, b, pb, ib, jb, descb, work, rwork, err,
3452 CALL pzmmch( ictxt,
'No transpose', transa, m, n, n,
3453 $ alpha, c, ib, jb, descb, a, ia, ja, desca,
3454 $ zero, b, pb, ib, jb, descb, work, rwork, err,
3458 IF( ierr( 2 ).NE.0 )
THEN
3459 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3460 $
WRITE( nout, fmt = 9998 )
3461 ELSE IF( err.GT.dble( thresh ) )
THEN
3462 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3463 $
WRITE( nout, fmt = 9997 ) err
3468 IF( lsame( side,
'L' ) )
THEN
3469 IF( lsame( uplo,
'L' ) )
THEN
3470 IF( lsame( diag,
'N' ) )
THEN
3471 CALL pb_zlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3472 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3474 CALL pb_zlaset(
'Upper', m, m, 0, rogue, one,
3475 $ a( ia+(ja-1)*desca( m_ ) ),
3479 IF( lsame( diag,
'N' ) )
THEN
3480 CALL pb_zlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3481 $ a( ia+1+(ja-1)*desca( m_ ) ),
3484 CALL pb_zlaset(
'Lower', m, m, 0, rogue, one,
3485 $ a( ia+(ja-1)*desca( m_ ) ),
3489 CALL pzchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3491 IF( lsame( uplo,
'L' ) )
THEN
3492 IF( lsame( diag,
'N' ) )
THEN
3493 CALL pb_zlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3494 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3496 CALL pb_zlaset(
'Upper', n, n, 0, rogue, one,
3497 $ a( ia+(ja-1)*desca( m_ ) ),
3501 IF( lsame( diag,
'N' ) )
THEN
3502 CALL pb_zlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3503 $ a( ia+1+(ja-1)*desca( m_ ) ),
3506 CALL pb_zlaset(
'Lower', n, n, 0, rogue, one,
3507 $ a( ia+(ja-1)*desca( m_ ) ),
3511 CALL pzchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3514 ELSE IF( nrout.EQ.9 )
THEN
3520 CALL ztrsm( side, uplo, transa, diag, m, n, alpha,
3521 $ a( ia+(ja-1)*desca( m_ ) ), desca( m_ ),
3522 $ b( ib+(jb-1)*descb( m_ ) ), descb( m_ ) )
3523 CALL pztrmm( side, uplo, transa, diag, m, n, alpha, pa, ia, ja,
3524 $ desca, pb, ib, jb, descb )
3525 IF( lsame( side,
'L' ) )
THEN
3526 CALL pzmmch( ictxt, transa,
'No transpose', m, n, m, alpha,
3527 $ a, ia, ja, desca, b, ib, jb, descb, zero, c,
3528 $ pb, ib, jb, descb, work, rwork, err,
3531 CALL pzmmch( ictxt,
'No transpose', transa, m, n, n, alpha,
3532 $ b, ib, jb, descb, a, ia, ja, desca, zero, c,
3533 $ pb, ib, jb, descb, work, rwork, err,
3537 IF( ierr( 2 ).NE.0 )
THEN
3538 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3539 $
WRITE( nout, fmt = 9998 )
3540 ELSE IF( err.GT.dble( thresh ) )
THEN
3541 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3542 $
WRITE( nout, fmt = 9997 ) err
3547 IF( lsame( side,
'L' ) )
THEN
3548 IF( lsame( uplo,
'L' ) )
THEN
3549 IF( lsame( diag,
'N' ) )
THEN
3550 CALL pb_zlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3551 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3553 CALL pb_zlaset(
'Upper', m, m, 0, rogue, one,
3554 $ a( ia+(ja-1)*desca( m_ ) ),
3558 IF( lsame( diag,
'N' ) )
THEN
3559 CALL pb_zlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3560 $ a( ia+1+(ja-1)*desca( m_ ) ),
3563 CALL pb_zlaset(
'Lower', m, m, 0, rogue, one,
3564 $ a( ia+(ja-1)*desca( m_ ) ),
3568 CALL pzchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3570 IF( lsame( uplo,
'L' ) )
THEN
3571 IF( lsame( diag,
'N' ) )
THEN
3572 CALL pb_zlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3573 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3575 CALL pb_zlaset(
'Upper', n, n, 0, rogue, one,
3576 $ a( ia+(ja-1)*desca( m_ ) ),
3580 IF( lsame( diag,
'N' ) )
THEN
3581 CALL pb_zlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3582 $ a( ia+1+(ja-1)*desca( m_ ) ),
3585 CALL pb_zlaset(
'Lower', n, n, 0, rogue, one,
3586 $ a( ia+(ja-1)*desca( m_ ) ),
3590 CALL pzchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3592 ELSE IF( nrout.EQ.10 )
THEN
3598 CALL pzmmch3(
'All', transa, m, n, alpha, a, ia, ja, desca,
3599 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3603 IF( lsame( transa,
'N' ) )
THEN
3604 CALL pzchkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3606 CALL pzchkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3609 ELSE IF( nrout.EQ.11 )
THEN
3615 CALL pzmmch3( uplo, transa, m, n, alpha, a, ia, ja, desca,
3616 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3620 IF( lsame( transa,
'N' ) )
THEN
3621 CALL pzchkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3623 CALL pzchkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3628 IF( ierr( 1 ).NE.0 )
THEN
3630 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3631 $
WRITE( nout, fmt = 9999 )
'A'
3634 IF( ierr( 2 ).NE.0 )
THEN
3636 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3637 $
WRITE( nout, fmt = 9999 )
'B'
3640 IF( ierr( 3 ).NE.0 )
THEN
3642 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3643 $
WRITE( nout, fmt = 9999 )
'C'
3646 9999
FORMAT( 2x,
' ***** ERROR: Matrix operand ', a,
3647 $
' is incorrect.' )
3648 9998
FORMAT( 2x,
' ***** FATAL ERROR - Computed result is less ',
3649 $
'than half accurate *****' )
3650 9997
FORMAT( 2x,
' ***** Test completed with maximum test ratio: ',
3651 $ f11.5,
' SUSPECT *****' )