4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PDGEMM ',
'PDSYMM ',
'PDSYRK ',
7 $
'PDSYR2K',
'PDTRMM ',
'PDTRSM ',
8 $
'PDGEADD',
'PDTRADD'/
122 INTEGER maxtests, maxgrids, gapmul, dblesz, totmem,
124 DOUBLE PRECISION one, padval, zero, rogue
125 parameter( maxtests = 20, maxgrids = 20, gapmul = 10,
126 $ dblesz = 8, totmem = 2000000,
127 $ memsiz = totmem / dblesz, zero = 0.0d+0,
128 $ one = 1.0d+0, padval = -9923.0d+0,
129 $ nsubs = 8, rogue = -1.0d+10 )
130 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
131 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
133 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
134 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
135 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
136 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
139 LOGICAL errflg, sof, tee
140 CHARACTER*1 adiagdo, aform, cform, diag, side, transa,
142 INTEGER csrca, csrcb, csrcc, i, ia, iam, iaseed, ib,
143 $ ibseed, ic, icseed, ictxt, igap, imba, imbb,
144 $ imbc, imida, imidb, imidc, inba, inbb, inbc,
145 $ ipa, ipb, ipc, ipg, ipmata, ipmatb, ipmatc,
146 $ iposta, ipostb, ipostc, iprea, ipreb, iprec,
147 $ ipw, iverb, j, ja, jb, jc, k, l, lda, ldb, ldc,
148 $ m, ma, mb, mba, mbb, mbc, mc, memreqd, mpa,
149 $ mpb, mpc, mycol, myrow, n, na, nb, nba, nbb,
150 $ nbc, nc, ncola, ncolb, ncolc, ngrids, nout,
151 $ npcol, nprocs, nprow, nqa, nqb, nqc, nrowa,
152 $ nrowb, nrowc, ntests, offda, offdc, rsrca,
153 $ rsrcb, rsrcc, tskip, tstcnt
155 DOUBLE PRECISION alpha, beta, scale
158 LOGICAL bcheck( nsubs ), ccheck( nsubs ),
160 CHARACTER*1 diagval( maxtests ), sideval( maxtests ),
161 $ trnaval( maxtests ), trnbval( maxtests ),
162 $ uploval( maxtests )
164 INTEGER cscaval( maxtests ), cscbval( maxtests ),
165 $ csccval( maxtests ), desca( dlen_ ),
166 $ descar( dlen_ ), descb( dlen_ ),
167 $ descbr( dlen_ ), descc( dlen_ ),
168 $ desccr( dlen_ ), iaval( maxtests ),
169 $ ibval( maxtests ), icval( maxtests ),
170 $ ierr( 6 ), imbaval( maxtests ),
171 $ imbbval( maxtests ), imbcval( maxtests ),
172 $ inbaval( maxtests ), inbbval( maxtests ),
173 $ inbcval( maxtests ), javal( maxtests ),
174 $ jbval( maxtests ), jcval( maxtests )
175 INTEGER kfail( nsubs ), kpass( nsubs ), kskip( nsubs ),
176 $ ktests( nsubs ), kval( maxtests ),
177 $ maval( maxtests ), mbaval( maxtests ),
178 $ mbbval( maxtests ), mbcval( maxtests ),
179 $ mbval( maxtests ), mcval( maxtests ),
180 $ mval( maxtests ), naval( maxtests ),
181 $ nbaval( maxtests ), nbbval( maxtests ),
182 $ nbcval( maxtests ), nbval( maxtests ),
183 $ ncval( maxtests ), nval( maxtests ),
184 $ pval( maxtests ), qval( maxtests ),
185 $ rscaval( maxtests ), rscbval( maxtests ),
186 $ rsccval( maxtests )
187 DOUBLE PRECISION mem( memsiz )
190 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
191 $ blacs_gridinfo, blacs_gridinit, blacs_pinfo,
197 $ pdsyrk, pdtradd, pdtrmm, pdtrsm,
pmdescchk,
205 INTRINSIC abs, dble,
max, mod
208 CHARACTER*7 snames( nsubs )
211 COMMON /snamec/snames
212 COMMON /infoc/info, nblog
213 COMMON /pberrorc/nout, abrtflg
216 DATA bcheck/.true., .true., .false., .true., .true.,
217 $ .true., .false., .false./
218 DATA ccheck/.true., .true., .true., .true., .false.,
219 $ .false., .true., .true./
256 CALL blacs_pinfo( iam, nprocs )
258 $ trnaval, trnbval, uploval, mval, nval,
259 $ kval, maval, naval, imbaval, mbaval,
260 $ inbaval, nbaval, rscaval, cscaval, iaval,
261 $ javal, mbval, nbval, imbbval, mbbval,
262 $ inbbval, nbbval, rscbval, cscbval, ibval,
263 $ jbval, mcval, ncval, imbcval, mbcval,
264 $ inbcval, nbcval, rsccval, csccval, icval,
265 $ jcval, maxtests, ngrids, pval, maxgrids,
266 $ qval, maxgrids, nblog, ltest, sof, tee, iam,
267 $ igap, iverb, nprocs, thresh, alpha, beta,
271 WRITE( nout, fmt = 9976 )
272 WRITE( nout, fmt = * )
290 IF( nprow.LT.1 )
THEN
292 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
294 ELSE IF( npcol.LT.1 )
THEN
296 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
298 ELSE IF( nprow*npcol.GT.nprocs )
THEN
300 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
304 IF( ierr( 1 ).GT.0 )
THEN
306 $
WRITE( nout, fmt = 9997 )
'GRID'
313 CALL blacs_get( -1, 0, ictxt )
314 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
315 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
320 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
331 transa = trnaval( j )
332 transb = trnbval( j )
376 WRITE( nout, fmt = * )
377 WRITE( nout, fmt = 9996 ) tstcnt, nprow, npcol
378 WRITE( nout, fmt = * )
380 WRITE( nout, fmt = 9995 )
381 WRITE( nout, fmt = 9994 )
382 WRITE( nout, fmt = 9995 )
383 WRITE( nout, fmt = 9993 ) m, n, k, side, uplo, transa,
386 WRITE( nout, fmt = 9995 )
387 WRITE( nout, fmt = 9992 )
388 WRITE( nout, fmt = 9995 )
389 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
390 $ mba, nba, rsrca, csrca
392 WRITE( nout, fmt = 9995 )
393 WRITE( nout, fmt = 9990 )
394 WRITE( nout, fmt = 9995 )
395 WRITE( nout, fmt = 9991 ) ib, jb, mb, nb, imbb, inbb,
396 $ mbb, nbb, rsrcb, csrcb
398 WRITE( nout, fmt = 9995 )
399 WRITE( nout, fmt = 9989 )
400 WRITE( nout, fmt = 9995 )
401 WRITE( nout, fmt = 9991 ) ic, jc, mc, nc, imbc, inbc,
402 $ mbc, nbc, rsrcc, csrcc
404 WRITE( nout, fmt = 9995 )
410 IF( .NOT.
lsame( side,
'L' ).AND.
411 $ .NOT.
lsame( side,
'R' ) )
THEN
413 $
WRITE( nout, fmt = 9997 )
'SIDE'
418 IF( .NOT.
lsame( uplo,
'U' ).AND.
419 $ .NOT.
lsame( uplo,
'L' ) )
THEN
421 $
WRITE( nout, fmt = 9997 )
'UPLO'
426 IF( .NOT.
lsame( transa,
'N' ).AND.
427 $ .NOT.
lsame( transa,
'T' ).AND.
428 $ .NOT.
lsame( transa,
'C' ) )
THEN
430 $
WRITE( nout, fmt = 9997 )
'TRANSA'
435 IF( .NOT.
lsame( transb,
'N' ).AND.
436 $ .NOT.
lsame( transb,
'T' ).AND.
437 $ .NOT.
lsame( transb,
'C' ) )
THEN
439 $
WRITE( nout, fmt = 9997 )
'TRANSB'
444 IF( .NOT.
lsame( diag ,
'U' ).AND.
445 $ .NOT.
lsame( diag ,
'N' ) )
THEN
447 $
WRITE( nout, fmt = 9997 )
'DIAG'
455 $ block_cyclic_2d_inb, ma, na, imba, inba,
456 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
457 $ imida, iposta, igap, gapmul, ierr( 1 ) )
460 $ block_cyclic_2d_inb, mb, nb, imbb, inbb,
461 $ mbb, nbb, rsrcb, csrcb, mpb, nqb, ipreb,
462 $ imidb, ipostb, igap, gapmul, ierr( 2 ) )
465 $ block_cyclic_2d_inb, mc, nc, imbc, inbc,
466 $ mbc, nbc, rsrcc, csrcc, mpc, nqc, iprec,
467 $ imidc, ipostc, igap, gapmul, ierr( 3 ) )
469 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
470 $ ierr( 3 ).GT.0 )
THEN
483 ipb = ipa + desca( lld_ )*nqa + iposta + ipreb
484 ipc = ipb + descb( lld_ )*nqb + ipostb + iprec
485 ipmata = ipc + descc( lld_ )*nqc + ipostc
486 ipmatb = ipmata + ma*na
487 ipmatc = ipmatb + mb*nb
488 ipg = ipmatc +
max( mb*nb, mc*nc )
495 ipw = ipg + 2*
max( m,
max( n, k ) )
496 memreqd = ipw - 1 +
max(
max(
max( imba, mba ),
497 $
max( imbb, mbb ) ),
500 IF( memreqd.GT.memsiz )
THEN
502 $
WRITE( nout, fmt = 9987 ) memreqd*dblesz
508 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
510 IF( ierr( 1 ).GT.0 )
THEN
512 $
WRITE( nout, fmt = 9988 )
523 IF( .NOT.ltest( l ) )
527 WRITE( nout, fmt = * )
528 WRITE( nout, fmt = 9986 ) snames( l )
539 IF(
lsame( transa,
'N' ) )
THEN
546 IF(
lsame( transb,
'N' ) )
THEN
554 ELSE IF( l.EQ.2 )
THEN
562 IF(
lsame( side,
'L' ) )
THEN
570 ELSE IF( l.EQ.3 )
THEN
576 IF(
lsame( transa,
'N' ) )
THEN
586 ELSE IF( l.EQ.4 )
THEN
592 IF(
lsame( transa,
'N' ) )
THEN
604 ELSE IF( l.EQ.5 .OR. l.EQ.6 )
THEN
607 IF(
lsame( side,
'L' ) )
THEN
617 ELSE IF( l.EQ.7 .OR. l.EQ.8 )
THEN
621 IF(
lsame( transa,
'N' ) )
THEN
637 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
639 CALL pmdimchk( ictxt, nout, nrowb, ncolb,
'B', ib, jb,
641 CALL pmdimchk( ictxt, nout, nrowc, ncolc,
'C', ic, jc,
644 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
645 $ ierr( 3 ).NE.0 )
THEN
646 kskip( l ) = kskip( l ) + 1
662 ELSE IF( l.EQ.3 .OR. l.EQ.4 )
THEN
672 ELSE IF( ( l.EQ.6 ).AND.(
lsame( diag,
'N' ) ) )
THEN
694 CALL pdlagen( .false., aform, adiagdo, offda, ma, na,
695 $ 1, 1, desca, iaseed, mem( ipa ),
699 $
CALL pdlagen( .false.,
'None',
'No diag', 0, mb, nb,
700 $ 1, 1, descb, ibseed, mem( ipb ),
704 $
CALL pdlagen( .false., cform,
'No diag', offdc, mc,
705 $ nc, 1, 1, descc, icseed, mem( ipc ),
710 CALL pb_descset2( descar, ma, na, imba, inba, mba, nba,
711 $ -1, -1, ictxt,
max( 1, ma ) )
712 CALL pdlagen( .false., aform, adiagdo, offda, ma, na,
713 $ 1, 1, descar, iaseed, mem( ipmata ),
716 IF( bcheck( l ) )
THEN
718 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
719 CALL pdlagen( .false.,
'None',
'No diag', 0, mb, nb,
720 $ 1, 1, descbr, ibseed, mem( ipmatb ),
724 IF( ccheck( l ) )
THEN
727 $ nbc, -1, -1, ictxt,
max( 1, mc ) )
728 CALL pdlagen( .false., cform,
'No diag', offdc, mc,
729 $ nc, 1, 1, desccr, icseed, mem( ipmatc ),
737 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
738 CALL pdlagen( .false.,
'None',
'No diag', 0, mb, nb,
739 $ 1, 1, desccr, ibseed, mem( ipmatc ),
746 IF( ( l.EQ.2 ).AND.(
max( nrowa, ncola ).GT.1 ) )
THEN
750 IF(
lsame( uplo,
'L' ) )
THEN
754 CALL pdlaset(
'Upper', nrowa-1, ncola-1, rogue,
755 $ rogue, mem( ipa ), ia, ja+1, desca )
757 ELSE IF(
lsame( uplo,
'U' ) )
THEN
761 CALL pdlaset(
'Lower', nrowa-1, ncola-1, rogue,
762 $ rogue, mem( ipa ), ia+1, ja, desca )
766 ELSE IF( ( ( l.EQ.3 ).OR.( l.EQ.4 ) ).AND.
767 $ (
max( nrowc, ncolc ).GT.1 ) )
THEN
771 IF(
lsame( uplo,
'L' ) )
THEN
775 IF(
max( nrowc, ncolc ).GT.1 )
THEN
776 CALL pdlaset(
'Upper', nrowc-1, ncolc-1, rogue,
777 $ rogue, mem( ipc ), ic, jc+1,
779 CALL pb_dlaset(
'Upper', nrowc-1, ncolc-1, 0,
781 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
784 ELSE IF(
lsame( uplo,
'U' ) )
THEN
788 IF(
max( nrowc, ncolc ).GT.1 )
THEN
789 CALL pdlaset(
'Lower', nrowc-1, ncolc-1, rogue,
790 $ rogue, mem( ipc ), ic+1, jc,
792 CALL pb_dlaset(
'Lower', nrowc-1, ncolc-1, 0,
794 $ mem( ipmatc+ic+(jc-1)*ldc ),
800 ELSE IF( l.EQ.5 .OR. l.EQ.6 )
THEN
802 IF(
lsame( uplo,
'L' ) )
THEN
806 IF(
lsame( diag,
'N' ) )
THEN
808 IF(
max( nrowa, ncola ).GT.1 )
THEN
809 CALL pdlaset(
'Upper', nrowa-1, ncola-1,
810 $ rogue, rogue, mem( ipa ), ia,
812 CALL pb_dlaset(
'Upper', nrowa-1, ncola-1, 0,
814 $ mem( ipmata+ia-1+ja*lda ),
820 CALL pdlaset(
'Upper', nrowa, ncola, rogue, one,
821 $ mem( ipa ), ia, ja, desca )
822 CALL pb_dlaset(
'Upper', nrowa, ncola, 0, zero,
824 $ mem( ipmata+ia-1+(ja-1)*lda ),
827 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
828 scale = one / dble(
max( nrowa, ncola ) )
829 CALL pdlascal(
'Lower', nrowa-1, ncola-1,
830 $ scale, mem( ipa ), ia+1, ja,
834 $ mem( ipmata+ia+(ja-1)*lda ),
839 ELSE IF(
lsame( uplo,
'U' ) )
THEN
843 IF(
lsame( diag,
'N' ) )
THEN
845 IF(
max( nrowa, ncola ).GT.1 )
THEN
846 CALL pdlaset(
'Lower', nrowa-1, ncola-1,
847 $ rogue, rogue, mem( ipa ), ia+1,
849 CALL pb_dlaset(
'Lower', nrowa-1, ncola-1, 0,
851 $ mem( ipmata+ia+(ja-1)*lda ),
857 CALL pdlaset(
'Lower', nrowa, ncola, rogue, one,
858 $ mem( ipa ), ia, ja, desca )
859 CALL pb_dlaset(
'Lower', nrowa, ncola, 0, zero,
861 $ mem( ipmata+ia-1+(ja-1)*lda ),
864 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
865 scale = one / dble(
max( nrowa, ncola ) )
866 CALL pdlascal(
'Upper', nrowa-1, ncola-1,
867 $ scale, mem( ipa ), ia, ja+1,
871 $ mem( ipmata+ia-1+ja*lda ), lda )
878 ELSE IF( l.EQ.8 )
THEN
880 IF(
lsame( uplo,
'L' ) )
THEN
884 IF(
max( nrowc, ncolc ).GT.1 )
THEN
885 CALL pdlaset(
'Upper', nrowc-1, ncolc-1,
886 $ rogue, rogue, mem( ipc ), ic,
888 CALL pb_dlaset(
'Upper', nrowc-1, ncolc-1, 0,
890 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
893 ELSE IF(
lsame( uplo,
'U' ) )
THEN
897 IF(
max( nrowc, ncolc ).GT.1 )
THEN
898 CALL pdlaset(
'Lower', nrowc-1, ncolc-1,
899 $ rogue, rogue, mem( ipc ), ic+1,
901 CALL pb_dlaset(
'Lower', nrowc-1, ncolc-1, 0,
903 $ mem( ipmatc+ic+(jc-1)*ldc ),
913 CALL pb_dfillpad( ictxt, mpa, nqa, mem( ipa-iprea ),
914 $ desca( lld_ ), iprea, iposta, padval )
916 IF( bcheck( l ) )
THEN
917 CALL pb_dfillpad( ictxt, mpb, nqb, mem( ipb-ipreb ),
918 $ descb( lld_ ), ipreb, ipostb,
922 IF( ccheck( l ) )
THEN
923 CALL pb_dfillpad( ictxt, mpc, nqc, mem( ipc-iprec ),
924 $ descc( lld_ ), iprec, ipostc,
931 CALL pdchkarg3( ictxt, nout, snames( l ), side, uplo,
932 $ transa, transb, diag, m, n, k, alpha, ia,
933 $ ja, desca, ib, jb, descb, beta, ic, jc,
938 IF( iverb.EQ.2 )
THEN
939 CALL pb_pdlaprnt( nrowa, ncola, mem( ipa ), ia, ja,
941 $
'PARALLEL_INITIAL_A', nout,
943 ELSE IF( iverb.GE.3 )
THEN
945 $ 0, 0,
'PARALLEL_INITIAL_A', nout,
949 IF( bcheck( l ) )
THEN
950 IF( iverb.EQ.2 )
THEN
951 CALL pb_pdlaprnt( nrowb, ncolb, mem( ipb ), ib, jb,
953 $
'PARALLEL_INITIAL_B', nout,
955 ELSE IF( iverb.GE.3 )
THEN
957 $ 0, 0,
'PARALLEL_INITIAL_B', nout,
962 IF( ccheck( l ) )
THEN
963 IF( iverb.EQ.2 )
THEN
964 CALL pb_pdlaprnt( nrowc, ncolc, mem( ipc ), ic, jc,
966 $
'PARALLEL_INITIAL_C', nout,
968 ELSE IF( iverb.GE.3 )
THEN
970 $ 0, 0,
'PARALLEL_INITIAL_C', nout,
982 CALL pdgemm( transa, transb, m, n, k, alpha,
983 $ mem( ipa ), ia, ja, desca, mem( ipb ),
984 $ ib, jb, descb, beta, mem( ipc ), ic, jc,
987 ELSE IF( l.EQ.2 )
THEN
991 CALL pdsymm( side, uplo, m, n, alpha, mem( ipa ), ia,
992 $ ja, desca, mem( ipb ), ib, jb, descb,
993 $ beta, mem( ipc ), ic, jc, descc )
995 ELSE IF( l.EQ.3 )
THEN
999 CALL pdsyrk( uplo, transa, n, k, alpha, mem( ipa ),
1000 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1003 ELSE IF( l.EQ.4 )
THEN
1007 CALL pdsyr2k( uplo, transa, n, k, alpha, mem( ipa ),
1008 $ ia, ja, desca, mem( ipb ), ib, jb,
1009 $ descb, beta, mem( ipc ), ic, jc,
1012 ELSE IF( l.EQ.5 )
THEN
1016 CALL pdtrmm( side, uplo, transa, diag, m, n, alpha,
1017 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1020 ELSE IF( l.EQ.6 )
THEN
1024 CALL pdtrsm( side, uplo, transa, diag, m, n, alpha,
1025 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1029 ELSE IF( l.EQ.7 )
THEN
1033 CALL pdgeadd( transa, m, n, alpha, mem( ipa ), ia, ja,
1034 $ desca, beta, mem( ipc ), ic, jc, descc )
1036 ELSE IF( l.EQ.8 )
THEN
1040 CALL pdtradd( uplo, transa, m, n, alpha, mem( ipa ),
1041 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1048 IF( info.NE.0 )
THEN
1049 kskip( l ) = kskip( l ) + 1
1051 $
WRITE( nout, fmt = 9974 ) info
1058 $ mem( ipa-iprea ), desca( lld_ ),
1059 $ iprea, iposta, padval )
1061 IF( bcheck( l ) )
THEN
1063 $ mem( ipb-ipreb ), descb( lld_ ),
1064 $ ipreb, ipostb, padval )
1067 IF( ccheck( l ) )
THEN
1069 $ mem( ipc-iprec ), descc( lld_ ),
1070 $ iprec, ipostc, padval )
1076 $ transb, diag, m, n, k, alpha,
1077 $ mem( ipmata ), mem( ipa ), ia, ja,
1078 $ desca, mem( ipmatb ), mem( ipb ),
1079 $ ib, jb, descb, beta, mem( ipmatc ),
1080 $ mem( ipc ), ic, jc, descc, thresh,
1081 $ rogue, mem( ipg ), info )
1082 IF( mod( info, 2 ).EQ.1 )
THEN
1084 ELSE IF( mod( info / 2, 2 ).EQ.1 )
THEN
1086 ELSE IF( mod( info / 4, 2 ).EQ.1 )
THEN
1088 ELSE IF( info.NE.0 )
THEN
1097 CALL pdchkarg3( ictxt, nout, snames( l ), side, uplo,
1098 $ transa, transb, diag, m, n, k, alpha, ia,
1099 $ ja, desca, ib, jb, descb, beta, ic, jc,
1104 CALL pdchkmout( nrowa, ncola, mem( ipmata ),
1105 $ mem( ipa ), ia, ja, desca, ierr( 4 ) )
1106 IF( ierr( 4 ).NE.0 )
THEN
1108 $
WRITE( nout, fmt = 9983 )
'PARALLEL_A',
1112 IF( bcheck( l ) )
THEN
1113 CALL pdchkmout( nrowb, ncolb, mem( ipmatb ),
1114 $ mem( ipb ), ib, jb, descb, ierr( 5 ) )
1115 IF( ierr( 5 ).NE.0 )
THEN
1117 $
WRITE( nout, fmt = 9983 )
'PARALLEL_B',
1122 IF( ccheck( l ) )
THEN
1123 CALL pdchkmout( nrowc, ncolc, mem( ipmatc ),
1124 $ mem( ipc ), ic, jc, descc, ierr( 6 ) )
1125 IF( ierr( 6 ).NE.0 )
THEN
1127 $
WRITE( nout, fmt = 9983 )
'PARALLEL_C',
1134 IF( info.NE.0 .OR. ierr( 1 ).NE.0 .OR.
1135 $ ierr( 2 ).NE.0 .OR. ierr( 3 ).NE.0 .OR.
1136 $ ierr( 4 ).NE.0 .OR. ierr( 5 ).NE.0 .OR.
1137 $ ierr( 6 ).NE.0 )
THEN
1138 kfail( l ) = kfail( l ) + 1
1141 $
WRITE( nout, fmt = 9985 ) snames( l )
1143 kpass( l ) = kpass( l ) + 1
1145 $
WRITE( nout, fmt = 9984 ) snames( l )
1150 IF( iverb.GE.1 .AND. errflg )
THEN
1151 IF( ierr( 4 ).NE.0 .OR. iverb.GE.3 )
THEN
1152 CALL pdmprnt( ictxt, nout, ma, na, mem( ipmata ),
1153 $ lda, 0, 0,
'SERIAL_A' )
1154 CALL pb_pdlaprnt( ma, na, mem( ipa ), 1, 1, desca,
1155 $ 0, 0,
'PARALLEL_A', nout,
1157 ELSE IF( ierr( 1 ).NE.0 )
THEN
1158 IF( ( nrowa.GT.0 ).AND.( ncola.GT.0 ) )
1159 $
CALL pdmprnt( ictxt, nout, nrowa, ncola,
1160 $ mem( ipmata+ia-1+(ja-1)*lda ),
1161 $ lda, 0, 0,
'SERIAL_A' )
1162 CALL pb_pdlaprnt( nrowa, ncola, mem( ipa ), ia, ja,
1163 $ desca, 0, 0,
'PARALLEL_A', nout,
1166 IF( bcheck( l ) )
THEN
1167 IF( ierr( 5 ).NE.0 .OR. iverb.GE.3 )
THEN
1168 CALL pdmprnt( ictxt, nout, mb, nb,
1169 $ mem( ipmatb ), ldb, 0, 0,
1172 $ descb, 0, 0,
'PARALLEL_B',
1173 $ nout, mem( ipmatb ) )
1174 ELSE IF( ierr( 2 ).NE.0 )
THEN
1175 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1176 $
CALL pdmprnt( ictxt, nout, nrowb, ncolb,
1177 $ mem( ipmatb+ib-1+(jb-1)*ldb ),
1178 $ ldb, 0, 0,
'SERIAL_B' )
1180 $ jb, descb, 0, 0,
'PARALLEL_B',
1181 $ nout, mem( ipmatb ) )
1184 IF( ccheck( l ) )
THEN
1185 IF( ierr( 6 ).NE.0 .OR. iverb.GE.3 )
THEN
1186 CALL pdmprnt( ictxt, nout, mc, nc,
1187 $ mem( ipmatc ), ldc, 0, 0,
1190 $ descc, 0, 0,
'PARALLEL_C',
1191 $ nout, mem( ipmatc ) )
1192 ELSE IF( ierr( 3 ).NE.0 )
THEN
1193 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1194 $
CALL pdmprnt( ictxt, nout, nrowc, ncolc,
1195 $ mem( ipmatc+ic-1+(jc-1)*ldc ),
1196 $ ldc, 0, 0,
'SERIAL_C' )
1198 $ jc, descc, 0, 0,
'PARALLEL_C',
1199 $ nout, mem( ipmatc ) )
1206 IF( sof.AND.errflg )
1211 40
IF( iam.EQ.0 )
THEN
1212 WRITE( nout, fmt = * )
1213 WRITE( nout, fmt = 9982 ) j
1218 CALL blacs_gridexit( ictxt )
1229 IF( ltest( i ) )
THEN
1230 kskip( i ) = kskip( i ) + tskip
1231 ktests( i ) = kskip( i ) + kfail( i ) + kpass( i )
1238 WRITE( nout, fmt = * )
1239 WRITE( nout, fmt = 9978 )
1240 WRITE( nout, fmt = * )
1241 WRITE( nout, fmt = 9980 )
1242 WRITE( nout, fmt = 9979 )
1245 WRITE( nout, fmt = 9981 )
'|', snames( i ), ktests( i ),
1246 $ kpass( i ), kfail( i ), kskip( i )
1248 WRITE( nout, fmt = * )
1249 WRITE( nout, fmt = 9977 )
1250 WRITE( nout, fmt = * )
1254 CALL blacs_exit( 0 )
1256 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
1257 $
' should be at least 1' )
1258 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
1259 $
'. It can be at most', i4 )
1260 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
1261 9996
FORMAT( 2x,
'Test number ', i4 ,
' started on a ', i6,
' x ',
1262 $ i6,
' process grid.' )
1263 9995
FORMAT( 2x,
' ------------------------------------------------',
1264 $
'-------------------' )
1265 9994
FORMAT( 2x,
' M N K SIDE UPLO TRANSA ',
1267 9993
FORMAT( 5x,i6,1x,i6,1x,i6,6x,a1,5x,a1,7x,a1,7x,a1,5x,a1 )
1268 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
1269 $
' MBA NBA RSRCA CSRCA' )
1270 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
1272 9990
FORMAT( 2x,
' IB JB MB NB IMBB INBB',
1273 $
' MBB NBB RSRCB CSRCB' )
1274 9989
FORMAT( 2x,
' IC JC MC NC IMBC INBC',
1275 $
' MBC NBC RSRCC CSRCC' )
1276 9988
FORMAT(
'Not enough memory for this test: going on to',
1277 $
' next test case.' )
1278 9987
FORMAT(
'Not enough memory. Need: ', i12 )
1279 9986
FORMAT( 2x,
' Tested Subroutine: ', a )
1280 9985
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1281 $
' FAILED ',
' *****' )
1282 9984
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1283 $
' PASSED ',
' *****' )
1284 9983
FORMAT( 2x,
' ***** ERROR ***** Matrix operand ', a,
1285 $
' modified by ', a,
' *****' )
1286 9982
FORMAT( 2x,
'Test number ', i4,
' completed.' )
1287 9981
FORMAT( 2x,a1,2x,a7,8x,i4,6x,i4,5x,i4,4x,i4 )
1288 9980
FORMAT( 2x,
' SUBROUTINE TOTAL TESTS PASSED FAILED ',
1290 9979
FORMAT( 2x,
' ---------- ----------- ------ ------ ',
1292 9978
FORMAT( 2x,
'Testing Summary')
1293 9977
FORMAT( 2x,
'End of Tests.' )
1294 9976
FORMAT( 2x,
'Tests started.' )
1295 9975
FORMAT( 2x,
' ***** ', a,
' has an incorrect value: ',
1297 9974
FORMAT( 2x,
' ***** Operation not supported, error code: ',
1305 SUBROUTINE pdbla3tstinfo( SUMMRY, NOUT, NMAT, DIAGVAL, SIDEVAL,
1306 $ TRNAVAL, TRNBVAL, UPLOVAL, MVAL,
1307 $ NVAL, KVAL, MAVAL, NAVAL, IMBAVAL,
1308 $ MBAVAL, INBAVAL, NBAVAL, RSCAVAL,
1309 $ CSCAVAL, IAVAL, JAVAL, MBVAL, NBVAL,
1310 $ IMBBVAL, MBBVAL, INBBVAL, NBBVAL,
1311 $ RSCBVAL, CSCBVAL, IBVAL, JBVAL,
1312 $ MCVAL, NCVAL, IMBCVAL, MBCVAL,
1313 $ INBCVAL, NBCVAL, RSCCVAL, CSCCVAL,
1314 $ ICVAL, JCVAL, LDVAL, NGRIDS, PVAL,
1315 $ LDPVAL, QVAL, LDQVAL, NBLOG, LTEST, SOF,
1316 $ TEE, IAM, IGAP, IVERB, NPROCS, THRESH,
1317 $ ALPHA, BETA, WORK )
1326 INTEGER IAM, IGAP, IVERB, LDPVAL, LDQVAL, LDVAL, NBLOG,
1327 $ NGRIDS, NMAT, NOUT, NPROCS
1329 DOUBLE PRECISION ALPHA, BETA
1332 CHARACTER*( * ) SUMMRY
1333 CHARACTER*1 DIAGVAL( LDVAL ), SIDEVAL( LDVAL ),
1334 $ TRNAVAL( LDVAL ), TRNBVAL( LDVAL ),
1337 INTEGER CSCAVAL( LDVAL ), CSCBVAL( LDVAL ),
1338 $ csccval( ldval ), iaval( ldval ),
1339 $ ibval( ldval ), icval( ldval ),
1340 $ imbaval( ldval ), imbbval( ldval ),
1341 $ imbcval( ldval ), inbaval( ldval ),
1342 $ inbbval( ldval ), inbcval( ldval ),
1343 $ javal( ldval ), jbval( ldval ), jcval( ldval ),
1344 $ kval( ldval ), maval( ldval ), mbaval( ldval ),
1345 $ mbbval( ldval ), mbcval( ldval ),
1346 $ mbval( ldval ), mcval( ldval ), mval( ldval ),
1347 $ naval( ldval ), nbaval( ldval ),
1348 $ nbbval( ldval ), nbcval( ldval ),
1349 $ nbval( ldval ), ncval( ldval ), nval( ldval ),
1350 $ pval( ldpval ), qval( ldqval ),
1351 $ rscaval( ldval ), rscbval( ldval ),
1352 $ rsccval( ldval ), work( * )
1644 PARAMETER ( NIN = 11, nsubs = 8 )
1649 DOUBLE PRECISION EPS
1653 CHARACTER*79 USRINFO
1656 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1657 $ blacs_gridinit, blacs_setup, dgebr2d, dgebs2d,
1658 $
icopy, igebr2d, igebs2d, sgebr2d, sgebs2d
1661 DOUBLE PRECISION PDLAMCH
1665 INTRINSIC char, ichar,
max,
min
1668 CHARACTER*7 SNAMES( NSUBS )
1669 COMMON /SNAMEC/SNAMES
1680 OPEN( nin, file=
'PDBLAS3TST.dat', status=
'OLD' )
1681 READ( nin, fmt = * ) summry
1686 READ( nin, fmt = 9999 ) usrinfo
1690 READ( nin, fmt = * ) summry
1691 READ( nin, fmt = * ) nout
1692 IF( nout.NE.0 .AND. nout.NE.6 )
1693 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1699 READ( nin, fmt = * ) sof
1703 READ( nin, fmt = * ) tee
1707 READ( nin, fmt = * ) iverb
1708 IF( iverb.LT.0 .OR. iverb.GT.3 )
1713 READ( nin, fmt = * ) igap
1719 READ( nin, fmt = * ) thresh
1725 READ( nin, fmt = * ) nblog
1731 READ( nin, fmt = * ) ngrids
1732 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1733 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1735 ELSE IF( ngrids.GT.ldqval )
THEN
1736 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1742 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1743 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1747 READ( nin, fmt = * ) alpha
1748 READ( nin, fmt = * ) beta
1752 READ( nin, fmt = * ) nmat
1753 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1754 WRITE( nout, fmt = 9998 )
'Tests', ldval
1760 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1761 READ( nin, fmt = * ) ( sideval( i ), i = 1, nmat )
1762 READ( nin, fmt = * ) ( trnaval( i ), i = 1, nmat )
1763 READ( nin, fmt = * ) ( trnbval( i ), i = 1, nmat )
1764 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1765 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1766 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1767 READ( nin, fmt = * ) ( kval( i ), i = 1, nmat )
1768 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1769 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1770 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1771 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1772 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1773 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1774 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1775 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1776 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1777 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1778 READ( nin, fmt = * ) ( mbval( i ), i = 1, nmat )
1779 READ( nin, fmt = * ) ( nbval( i ), i = 1, nmat )
1780 READ( nin, fmt = * ) ( imbbval( i ), i = 1, nmat )
1781 READ( nin, fmt = * ) ( inbbval( i ), i = 1, nmat )
1782 READ( nin, fmt = * ) ( mbbval( i ), i = 1, nmat )
1783 READ( nin, fmt = * ) ( nbbval( i ), i = 1, nmat )
1784 READ( nin, fmt = * ) ( rscbval( i ), i = 1, nmat )
1785 READ( nin, fmt = * ) ( cscbval( i ), i = 1, nmat )
1786 READ( nin, fmt = * ) ( ibval( i ), i = 1, nmat )
1787 READ( nin, fmt = * ) ( jbval( i ), i = 1, nmat )
1788 READ( nin, fmt = * ) ( mcval( i ), i = 1, nmat )
1789 READ( nin, fmt = * ) ( ncval( i ), i = 1, nmat )
1790 READ( nin, fmt = * ) ( imbcval( i ), i = 1, nmat )
1791 READ( nin, fmt = * ) ( inbcval( i ), i = 1, nmat )
1792 READ( nin, fmt = * ) ( mbcval( i ), i = 1, nmat )
1793 READ( nin, fmt = * ) ( nbcval( i ), i = 1, nmat )
1794 READ( nin, fmt = * ) ( rsccval( i ), i = 1, nmat )
1795 READ( nin, fmt = * ) ( csccval( i ), i = 1, nmat )
1796 READ( nin, fmt = * ) ( icval( i ), i = 1, nmat )
1797 READ( nin, fmt = * ) ( jcval( i ), i = 1, nmat )
1803 ltest( i ) = .false.
1806 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1808 IF( snamet.EQ.snames( i ) )
1812 WRITE( nout, fmt = 9995 )snamet
1828 IF( nprocs.LT.1 )
THEN
1831 nprocs =
max( nprocs, pval( i )*qval( i ) )
1833 CALL blacs_setup( iam, nprocs )
1839 CALL blacs_get( -1, 0, ictxt )
1840 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1848 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, thresh, 1 )
1849 CALL dgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1850 CALL dgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1855 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1875 work( i ) = ichar( diagval( j ) )
1876 work( i+1 ) = ichar( sideval( j ) )
1877 work( i+2 ) = ichar( trnaval( j ) )
1878 work( i+3 ) = ichar( trnbval( j ) )
1879 work( i+4 ) = ichar( uploval( j ) )
1882 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1884 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1886 CALL icopy( nmat, mval, 1, work( i ), 1 )
1888 CALL icopy( nmat, nval, 1, work( i ), 1 )
1890 CALL icopy( nmat, kval, 1, work( i ), 1 )
1892 CALL icopy( nmat, maval, 1, work( i ), 1 )
1894 CALL icopy( nmat, naval, 1, work( i ), 1 )
1896 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1898 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1900 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
1902 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
1904 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
1906 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
1908 CALL icopy( nmat, iaval, 1, work( i ), 1 )
1910 CALL icopy( nmat, javal, 1, work( i ), 1 )
1912 CALL icopy( nmat, mbval, 1, work( i ), 1 )
1914 CALL icopy( nmat, nbval, 1, work( i ), 1 )
1916 CALL icopy( nmat, imbbval, 1, work( i ), 1 )
1918 CALL icopy( nmat, inbbval, 1, work( i ), 1 )
1920 CALL icopy( nmat, mbbval, 1, work( i ), 1 )
1922 CALL icopy( nmat, nbbval, 1, work( i ), 1 )
1924 CALL icopy( nmat, rscbval, 1, work( i ), 1 )
1926 CALL icopy( nmat, cscbval, 1, work( i ), 1 )
1928 CALL icopy( nmat, ibval, 1, work( i ), 1 )
1930 CALL icopy( nmat, jbval, 1, work( i ), 1 )
1932 CALL icopy( nmat, mcval, 1, work( i ), 1 )
1934 CALL icopy( nmat, ncval, 1, work( i ), 1 )
1936 CALL icopy( nmat, imbcval, 1, work( i ), 1 )
1938 CALL icopy( nmat, inbcval, 1, work( i ), 1 )
1940 CALL icopy( nmat, mbcval, 1, work( i ), 1 )
1942 CALL icopy( nmat, nbcval, 1, work( i ), 1 )
1944 CALL icopy( nmat, rsccval, 1, work( i ), 1 )
1946 CALL icopy( nmat, csccval, 1, work( i ), 1 )
1948 CALL icopy( nmat, icval, 1, work( i ), 1 )
1950 CALL icopy( nmat, jcval, 1, work( i ), 1 )
1954 IF( ltest( j ) )
THEN
1962 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1966 WRITE( nout, fmt = 9999 )
'Level 3 PBLAS testing program.'
1967 WRITE( nout, fmt = 9999 ) usrinfo
1968 WRITE( nout, fmt = * )
1969 WRITE( nout, fmt = 9999 )
1970 $
'Tests of the real double precision '//
1972 WRITE( nout, fmt = * )
1973 WRITE( nout, fmt = 9993 ) nmat
1974 WRITE( nout, fmt = 9979 ) nblog
1975 WRITE( nout, fmt = 9992 ) ngrids
1976 WRITE( nout, fmt = 9990 )
1977 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1979 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 6,
1980 $
min( 10, ngrids ) )
1982 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 11,
1983 $
min( 15, ngrids ) )
1985 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 16, ngrids )
1986 WRITE( nout, fmt = 9990 )
1987 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1989 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 6,
1990 $
min( 10, ngrids ) )
1992 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 11,
1993 $
min( 15, ngrids ) )
1995 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 16, ngrids )
1996 WRITE( nout, fmt = 9988 ) sof
1997 WRITE( nout, fmt = 9987 ) tee
1998 WRITE( nout, fmt = 9983 ) igap
1999 WRITE( nout, fmt = 9986 ) iverb
2000 WRITE( nout, fmt = 9980 ) thresh
2001 WRITE( nout, fmt = 9982 ) alpha
2002 WRITE( nout, fmt = 9981 ) beta
2003 IF( ltest( 1 ) )
THEN
2004 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... Yes'
2006 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... No '
2009 IF( ltest( i ) )
THEN
2010 WRITE( nout, fmt = 9984 ) snames( i ),
' ... Yes'
2012 WRITE( nout, fmt = 9984 ) snames( i ),
' ... No '
2015 WRITE( nout, fmt = 9994 ) eps
2016 WRITE( nout, fmt = * )
2023 $
CALL blacs_setup( iam, nprocs )
2028 CALL blacs_get( -1, 0, ictxt )
2029 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2035 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, thresh, 1, 0, 0 )
2036 CALL dgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
2037 CALL dgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
2039 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
2044 i = 2*ngrids + 38*nmat + nsubs + 4
2045 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
2048 IF( work( i ).EQ.1 )
THEN
2054 IF( work( i ).EQ.1 )
THEN
2065 diagval( j ) = char( work( i ) )
2066 sideval( j ) = char( work( i+1 ) )
2067 trnaval( j ) = char( work( i+2 ) )
2068 trnbval( j ) = char( work( i+3 ) )
2069 uploval( j ) = char( work( i+4 ) )
2072 CALL icopy( ngrids, work( i ), 1, pval, 1 )
2074 CALL icopy( ngrids, work( i ), 1, qval, 1 )
2076 CALL icopy( nmat, work( i ), 1, mval, 1 )
2078 CALL icopy( nmat, work( i ), 1, nval, 1 )
2080 CALL icopy( nmat, work( i ), 1, kval, 1 )
2082 CALL icopy( nmat, work( i ), 1, maval, 1 )
2084 CALL icopy( nmat, work( i ), 1, naval, 1 )
2086 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
2088 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
2090 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
2092 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
2094 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
2096 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
2098 CALL icopy( nmat, work( i ), 1, iaval, 1 )
2100 CALL icopy( nmat, work( i ), 1, javal, 1 )
2102 CALL icopy( nmat, work( i ), 1, mbval, 1 )
2104 CALL icopy( nmat, work( i ), 1, nbval, 1 )
2106 CALL icopy( nmat, work( i ), 1, imbbval, 1 )
2108 CALL icopy( nmat, work( i ), 1, inbbval, 1 )
2110 CALL icopy( nmat, work( i ), 1, mbbval, 1 )
2112 CALL icopy( nmat, work( i ), 1, nbbval, 1 )
2114 CALL icopy( nmat, work( i ), 1, rscbval, 1 )
2116 CALL icopy( nmat, work( i ), 1, cscbval, 1 )
2118 CALL icopy( nmat, work( i ), 1, ibval, 1 )
2120 CALL icopy( nmat, work( i ), 1, jbval, 1 )
2122 CALL icopy( nmat, work( i ), 1, mcval, 1 )
2124 CALL icopy( nmat, work( i ), 1, ncval, 1 )
2126 CALL icopy( nmat, work( i ), 1, imbcval, 1 )
2128 CALL icopy( nmat, work( i ), 1, inbcval, 1 )
2130 CALL icopy( nmat, work( i ), 1, mbcval, 1 )
2132 CALL icopy( nmat, work( i ), 1, nbcval, 1 )
2134 CALL icopy( nmat, work( i ), 1, rsccval, 1 )
2136 CALL icopy( nmat, work( i ), 1, csccval, 1 )
2138 CALL icopy( nmat, work( i ), 1, icval, 1 )
2140 CALL icopy( nmat, work( i ), 1, jcval, 1 )
2144 IF( work( i ).EQ.1 )
THEN
2147 ltest( j ) = .false.
2154 CALL blacs_gridexit( ictxt )
2158 120
WRITE( nout, fmt = 9997 )
2160 IF( nout.NE.6 .AND. nout.NE.0 )
2162 CALL blacs_abort( ictxt, 1 )
2167 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
2169 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
2170 9996
FORMAT( a7, l2 )
2171 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
2172 $ /
' ******* TESTS ABANDONED *******' )
2173 9994
FORMAT( 2x,
'Relative machine precision (eps) is taken to be ',
2175 9993
FORMAT( 2x,
'Number of Tests : ', i6 )
2176 9992
FORMAT( 2x,
'Number of process grids : ', i6 )
2177 9991
FORMAT( 2x,
' : ', 5i6 )
2178 9990
FORMAT( 2x, a1,
' : ', 5i6 )
2179 9988
FORMAT( 2x,
'Stop on failure flag : ', l6 )
2180 9987
FORMAT( 2x,
'Test for error exits flag : ', l6 )
2181 9986
FORMAT( 2x,
'Verbosity level : ', i6 )
2182 9985
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
2183 9984
FORMAT( 2x,
' ', a, a8 )
2184 9983
FORMAT( 2x,
'Leading dimension gap : ', i6 )
2185 9982
FORMAT( 2x,
'Alpha : ', g16.6 )
2186 9981
FORMAT( 2x,
'Beta : ', g16.6 )
2187 9980
FORMAT( 2x,
'Threshold value : ', g16.6 )
2188 9979
FORMAT( 2x,
'Logical block size : ', i6 )
2201 INTEGER INOUT, NPROCS
2272 PARAMETER ( NSUBS = 8 )
2276 INTEGER I, ICTXT, MYCOL, MYROW, NPCOL, NPROW
2279 INTEGER SCODE( NSUBS )
2282 EXTERNAL BLACS_GET, BLACS_GRIDEXIT, BLACS_GRIDINFO,
2283 $ blacs_gridinit,
pddimee, pdgeadd, pdgemm,
2285 $ pdtradd, pdtrmm, pdtrsm
2290 CHARACTER*7 SNAMES( NSUBS )
2291 COMMON /snamec/snames
2292 COMMON /pberrorc/nout, abrtflg
2295 DATA scode/31, 32, 33, 35, 38, 38, 39, 40/
2302 CALL blacs_get( -1, 0, ictxt )
2303 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2304 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2317 IF( ltest( i ) )
THEN
2318 CALL pdoptee( ictxt, nout, pdgemm, scode( i ), snames( i ) )
2319 CALL pddimee( ictxt, nout, pdgemm, scode( i ), snames( i ) )
2320 CALL pdmatee( ictxt, nout, pdgemm, scode( i ), snames( i ) )
2326 IF( ltest( i ) )
THEN
2327 CALL pdoptee( ictxt, nout, pdsymm, scode( i ), snames( i ) )
2328 CALL pddimee( ictxt, nout, pdsymm, scode( i ), snames( i ) )
2329 CALL pdmatee( ictxt, nout, pdsymm, scode( i ), snames( i ) )
2335 IF( ltest( i ) )
THEN
2336 CALL pdoptee( ictxt, nout, pdsyrk, scode( i ), snames( i ) )
2337 CALL pddimee( ictxt, nout, pdsyrk, scode( i ), snames( i ) )
2338 CALL pdmatee( ictxt, nout, pdsyrk, scode( i ), snames( i ) )
2344 IF( ltest( i ) )
THEN
2345 CALL pdoptee( ictxt, nout, pdsyr2k, scode( i ), snames( i ) )
2346 CALL pddimee( ictxt, nout, pdsyr2k, scode( i ), snames( i ) )
2347 CALL pdmatee( ictxt, nout, pdsyr2k, scode( i ), snames( i ) )
2353 IF( ltest( i ) )
THEN
2354 CALL pdoptee( ictxt, nout, pdtrmm, scode( i ), snames( i ) )
2355 CALL pddimee( ictxt, nout, pdtrmm, scode( i ), snames( i ) )
2356 CALL pdmatee( ictxt, nout, pdtrmm, scode( i ), snames( i ) )
2362 IF( ltest( i ) )
THEN
2363 CALL pdoptee( ictxt, nout, pdtrsm, scode( i ), snames( i ) )
2364 CALL pddimee( ictxt, nout, pdtrsm, scode( i ), snames( i ) )
2365 CALL pdmatee( ictxt, nout, pdtrsm, scode( i ), snames( i ) )
2371 IF( ltest( i ) )
THEN
2372 CALL pdoptee( ictxt, nout, pdgeadd, scode( i ), snames( i ) )
2373 CALL pddimee( ictxt, nout, pdgeadd, scode( i ), snames( i ) )
2374 CALL pdmatee( ictxt, nout, pdgeadd, scode( i ), snames( i ) )
2380 IF( ltest( i ) )
THEN
2381 CALL pdoptee( ictxt, nout, pdtradd, scode( i ), snames( i ) )
2382 CALL pddimee( ictxt, nout, pdtradd, scode( i ), snames( i ) )
2383 CALL pdmatee( ictxt, nout, pdtradd, scode( i ), snames( i ) )
2386 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
2387 $
WRITE( nout, fmt = 9999 )
2389 CALL blacs_gridexit( ictxt )
2395 9999
FORMAT( 2x,
'Error-exit tests completed.' )
2402 SUBROUTINE pdchkarg3( ICTXT, NOUT, SNAME, SIDE, UPLO, TRANSA,
2403 $ TRANSB, DIAG, M, N, K, ALPHA, IA, JA,
2404 $ DESCA, IB, JB, DESCB, BETA, IC, JC, DESCC,
2413 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2414 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2416 DOUBLE PRECISION ALPHA, BETA
2420 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2536 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2537 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2539 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2540 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2541 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2542 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2545 CHARACTER*1 DIAGREF, SIDEREF, TRANSAREF, TRANSBREF, UPLOREF
2546 INTEGER I, IAREF, IBREF, ICREF, JAREF, JBREF, JCREF,
2547 $ KREF, MREF, MYCOL, MYROW, NPCOL, NPROW, NREF
2548 DOUBLE PRECISION ALPHAREF, BETAREF
2551 CHARACTER*15 ARGNAME
2552 INTEGER DESCAREF( DLEN_ ), DESCBREF( DLEN_ ),
2556 EXTERNAL blacs_gridinfo, igsum2d
2569 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2573 IF( info.EQ.0 )
THEN
2587 descaref( i ) = desca( i )
2592 descbref( i ) = descb( i )
2598 desccref( i ) = descc( i )
2606 IF( .NOT. lsame( diag, diagref ) )
THEN
2607 WRITE( argname, fmt =
'(A)' )
'DIAG'
2608 ELSE IF( .NOT. lsame( side, sideref ) )
THEN
2609 WRITE( argname, fmt =
'(A)' )
'SIDE'
2610 ELSE IF( .NOT. lsame( transa, transaref ) )
THEN
2611 WRITE( argname, fmt =
'(A)' )
'TRANSA'
2612 ELSE IF( .NOT. lsame( transb, transbref ) )
THEN
2613 WRITE( argname, fmt =
'(A)' )
'TRANSB'
2614 ELSE IF( .NOT. lsame( uplo, uploref ) )
THEN
2615 WRITE( argname, fmt =
'(A)' )
'UPLO'
2616 ELSE IF( m.NE.mref )
THEN
2617 WRITE( argname, fmt =
'(A)' )
'M'
2618 ELSE IF( n.NE.nref )
THEN
2619 WRITE( argname, fmt =
'(A)' )
'N'
2620 ELSE IF( k.NE.kref )
THEN
2621 WRITE( argname, fmt =
'(A)' )
'K'
2622 ELSE IF( alpha.NE.alpharef )
THEN
2623 WRITE( argname, fmt =
'(A)' )
'ALPHA'
2624 ELSE IF( ia.NE.iaref )
THEN
2625 WRITE( argname, fmt =
'(A)' )
'IA'
2626 ELSE IF( ja.NE.jaref )
THEN
2627 WRITE( argname, fmt =
'(A)' )
'JA'
2628 ELSE IF( desca( dtype_ ).NE.descaref( dtype_ ) )
THEN
2629 WRITE( argname, fmt =
'(A)' )
'DESCA( DTYPE_ )'
2630 ELSE IF( desca( m_ ).NE.descaref( m_ ) )
THEN
2631 WRITE( argname, fmt =
'(A)' )
'DESCA( M_ )'
2632 ELSE IF( desca( n_ ).NE.descaref( n_ ) )
THEN
2633 WRITE( argname, fmt =
'(A)' )
'DESCA( N_ )'
2634 ELSE IF( desca( imb_ ).NE.descaref( imb_ ) )
THEN
2635 WRITE( argname, fmt =
'(A)' )
'DESCA( IMB_ )'
2636 ELSE IF( desca( inb_ ).NE.descaref( inb_ ) )
THEN
2637 WRITE( argname, fmt =
'(A)' )
'DESCA( INB_ )'
2638 ELSE IF( desca( mb_ ).NE.descaref( mb_ ) )
THEN
2639 WRITE( argname, fmt =
'(A)' )
'DESCA( MB_ )'
2640 ELSE IF( desca( nb_ ).NE.descaref( nb_ ) )
THEN
2641 WRITE( argname, fmt =
'(A)' )
'DESCA( NB_ )'
2642 ELSE IF( desca( rsrc_ ).NE.descaref( rsrc_ ) )
THEN
2643 WRITE( argname, fmt =
'(A)' )
'DESCA( RSRC_ )'
2644 ELSE IF( desca( csrc_ ).NE.descaref( csrc_ ) )
THEN
2645 WRITE( argname, fmt =
'(A)' )
'DESCA( CSRC_ )'
2646 ELSE IF( desca( ctxt_ ).NE.descaref( ctxt_ ) )
THEN
2647 WRITE( argname, fmt =
'(A)' )
'DESCA( CTXT_ )'
2648 ELSE IF( desca( lld_ ).NE.descaref( lld_ ) )
THEN
2649 WRITE( argname, fmt =
'(A)' )
'DESCA( LLD_ )'
2650 ELSE IF( ib.NE.ibref )
THEN
2651 WRITE( argname, fmt =
'(A)' )
'IB'
2652 ELSE IF( jb.NE.jbref )
THEN
2653 WRITE( argname, fmt =
'(A)' )
'JB'
2654 ELSE IF( descb( dtype_ ).NE.descbref( dtype_ ) )
THEN
2655 WRITE( argname, fmt =
'(A)' )
'DESCB( DTYPE_ )'
2656 ELSE IF( descb( m_ ).NE.descbref( m_ ) )
THEN
2657 WRITE( argname, fmt =
'(A)' )
'DESCB( M_ )'
2658 ELSE IF( descb( n_ ).NE.descbref( n_ ) )
THEN
2659 WRITE( argname, fmt =
'(A)' )
'DESCB( N_ )'
2660 ELSE IF( descb( imb_ ).NE.descbref( imb_ ) )
THEN
2661 WRITE( argname, fmt =
'(A)' )
'DESCB( IMB_ )'
2662 ELSE IF( descb( inb_ ).NE.descbref( inb_ ) )
THEN
2663 WRITE( argname, fmt =
'(A)' )
'DESCB( INB_ )'
2664 ELSE IF( descb( mb_ ).NE.descbref( mb_ ) )
THEN
2665 WRITE( argname, fmt =
'(A)' )
'DESCB( MB_ )'
2666 ELSE IF( descb( nb_ ).NE.descbref( nb_ ) )
THEN
2667 WRITE( argname, fmt =
'(A)' )
'DESCB( NB_ )'
2668 ELSE IF( descb( rsrc_ ).NE.descbref( rsrc_ ) )
THEN
2669 WRITE( argname, fmt =
'(A)' )
'DESCB( RSRC_ )'
2670 ELSE IF( descb( csrc_ ).NE.descbref( csrc_ ) )
THEN
2671 WRITE( argname, fmt =
'(A)' )
'DESCB( CSRC_ )'
2672 ELSE IF( descb( ctxt_ ).NE.descbref( ctxt_ ) )
THEN
2673 WRITE( argname, fmt =
'(A)' )
'DESCB( CTXT_ )'
2674 ELSE IF( descb( lld_ ).NE.descbref( lld_ ) )
THEN
2675 WRITE( argname, fmt =
'(A)' )
'DESCB( LLD_ )'
2676 ELSE IF( beta.NE.betaref )
THEN
2677 WRITE( argname, fmt =
'(A)' )
'BETA'
2678 ELSE IF( ic.NE.icref )
THEN
2679 WRITE( argname, fmt =
'(A)' )
'IC'
2680 ELSE IF( jc.NE.jcref )
THEN
2681 WRITE( argname, fmt =
'(A)' )
'JC'
2682 ELSE IF( descc( dtype_ ).NE.desccref( dtype_ ) )
THEN
2683 WRITE( argname, fmt =
'(A)' )
'DESCC( DTYPE_ )'
2684 ELSE IF( descc( m_ ).NE.desccref( m_ ) )
THEN
2685 WRITE( argname, fmt =
'(A)' )
'DESCC( M_ )'
2686 ELSE IF( descc( n_ ).NE.desccref( n_ ) )
THEN
2687 WRITE( argname, fmt =
'(A)' )
'DESCC( N_ )'
2688 ELSE IF( descc( imb_ ).NE.desccref( imb_ ) )
THEN
2689 WRITE( argname, fmt =
'(A)' )
'DESCC( IMB_ )'
2690 ELSE IF( descc( inb_ ).NE.desccref( inb_ ) )
THEN
2691 WRITE( argname, fmt =
'(A)' )
'DESCC( INB_ )'
2692 ELSE IF( descc( mb_ ).NE.desccref( mb_ ) )
THEN
2693 WRITE( argname, fmt =
'(A)' )
'DESCC( MB_ )'
2694 ELSE IF( descc( nb_ ).NE.desccref( nb_ ) )
THEN
2695 WRITE( argname, fmt =
'(A)' )
'DESCC( NB_ )'
2696 ELSE IF( descc( rsrc_ ).NE.desccref( rsrc_ ) )
THEN
2697 WRITE( argname, fmt =
'(A)' )
'DESCC( RSRC_ )'
2698 ELSE IF( descc( csrc_ ).NE.desccref( csrc_ ) )
THEN
2699 WRITE( argname, fmt =
'(A)' )
'DESCC( CSRC_ )'
2700 ELSE IF( descc( ctxt_ ).NE.desccref( ctxt_ ) )
THEN
2701 WRITE( argname, fmt =
'(A)' )
'DESCC( CTXT_ )'
2702 ELSE IF( descc( lld_ ).NE.desccref( lld_ ) )
THEN
2703 WRITE( argname, fmt =
'(A)' )
'DESCC( LLD_ )'
2708 CALL igsum2d( ictxt,
'All',
' ', 1, 1, info, 1, -1, 0 )
2710 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2712 IF( info.NE.0 )
THEN
2713 WRITE( nout, fmt = 9999 ) argname, sname
2715 WRITE( nout, fmt = 9998 ) sname
2722 9999
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2723 $
' FAILED changed ', a,
' *****' )
2724 9998
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2732 SUBROUTINE pdblas3tstchk( ICTXT, NOUT, NROUT, SIDE, UPLO, TRANSA,
2733 $ TRANSB, DIAG, M, N, K, ALPHA, A, PA, IA,
2734 $ JA, DESCA, B, PB, IB, JB, DESCB, BETA,
2735 $ C, PC, IC, JC, DESCC, THRESH, ROGUE,
2744 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2745 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2748 DOUBLE PRECISION ALPHA, BETA, ROGUE
2751 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2752 DOUBLE PRECISION A( * ), B( * ), C( * ), PA( * ), PB( * ),
2753 $ PC( * ), WORK( * )
2970 DOUBLE PRECISION ONE, ZERO
2971 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
2972 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2973 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2975 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2976 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2977 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2978 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2981 INTEGER I, IPG, MYCOL, MYROW, NPCOL, NPROW
2982 DOUBLE PRECISION ERR
2988 EXTERNAL BLACS_GRIDINFO, DTRSM, PB_DLASET, PDCHKMIN,
3004 IF( ( m.LE.0 ).OR.( n.LE.0 ) )
3009 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
3014 ipg =
max( m,
max( n, k ) ) + 1
3016 IF( nrout.EQ.1 )
THEN
3022 CALL pdmmch( ictxt, transa, transb, m, n, k, alpha, a, ia, ja,
3023 $ desca, b, ib, jb, descb, beta, c, pc, ic, jc,
3024 $ descc, work, work( ipg ), err, ierr( 3 ) )
3026 IF( ierr( 3 ).NE.0 )
THEN
3027 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3028 $
WRITE( nout, fmt = 9998 )
3029 ELSE IF( err.GT.dble( thresh ) )
THEN
3030 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3031 $
WRITE( nout, fmt = 9997 ) err
3036 IF( lsame( transa,
'N' ) )
THEN
3037 CALL pdchkmin( err, m, k, a, pa, ia, ja, desca, ierr( 1 ) )
3039 CALL pdchkmin( err, k, m, a, pa, ia, ja, desca, ierr( 1 ) )
3041 IF( lsame( transb,
'N' ) )
THEN
3042 CALL pdchkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3044 CALL pdchkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3047 ELSE IF( nrout.EQ.2 )
THEN
3053 IF( lsame( side,
'L' ) )
THEN
3054 CALL pdmmch( ictxt,
'No transpose',
'No transpose', m, n, m,
3055 $ alpha, a, ia, ja, desca, b, ib, jb, descb,
3056 $ beta, c, pc, ic, jc, descc, work, work( ipg ),
3059 CALL pdmmch( ictxt,
'No transpose',
'No transpose', m, n, n,
3060 $ alpha, b, ib, jb, descb, a, ia, ja, desca,
3061 $ beta, c, pc, ic, jc, descc, work, work( ipg ),
3065 IF( ierr( 3 ).NE.0 )
THEN
3066 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3067 $
WRITE( nout, fmt = 9998 )
3068 ELSE IF( err.GT.dble( thresh ) )
THEN
3069 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3070 $
WRITE( nout, fmt = 9997 ) err
3075 IF( lsame( uplo,
'L' ) )
THEN
3076 IF( lsame( side,
'L' ) )
THEN
3077 CALL pb_dlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3078 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3080 CALL pb_dlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3081 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3084 IF( lsame( side,
'L' ) )
THEN
3085 CALL pb_dlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3086 $ a( ia+1+(ja-1)*desca( m_ ) ),
3089 CALL pb_dlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3090 $ a( ia+1+(ja-1)*desca( m_ ) ),
3095 IF( lsame( side,
'L' ) )
THEN
3096 CALL pdchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3098 CALL pdchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3100 CALL pdchkmin( err, m, n, b, pb, ib, jb, descb, ierr( 2 ) )
3102 ELSE IF( nrout.EQ.3 )
THEN
3108 IF( lsame( transa,
'N' ) )
THEN
3109 CALL pdmmch1( ictxt, uplo,
'No transpose', n, k, alpha, a,
3110 $ ia, ja, desca, beta, c, pc, ic, jc, descc,
3111 $ work, work( ipg ), err, ierr( 3 ) )
3113 CALL pdmmch1( ictxt, uplo,
'Transpose', n, k, alpha, a, ia,
3114 $ ja, desca, beta, c, pc, ic, jc, descc, work,
3115 $ work( ipg ), err, ierr( 3 ) )
3118 IF( ierr( 3 ).NE.0 )
THEN
3119 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3120 $
WRITE( nout, fmt = 9998 )
3121 ELSE IF( err.GT.dble( thresh ) )
THEN
3122 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3123 $
WRITE( nout, fmt = 9997 ) err
3128 IF( lsame( transa,
'N' ) )
THEN
3129 CALL pdchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3131 CALL pdchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3134 ELSE IF( nrout.EQ.4 )
THEN
3140 IF( lsame( transa,
'N' ) )
THEN
3141 CALL pdmmch2( ictxt, uplo,
'No transpose', n, k, alpha, a,
3142 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3143 $ ic, jc, descc, work, work( ipg ), err,
3146 CALL pdmmch2( ictxt, uplo,
'Transpose', n, k, alpha, a,
3147 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3148 $ ic, jc, descc, work, work( ipg ), err,
3152 IF( ierr( 3 ).NE.0 )
THEN
3153 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3154 $
WRITE( nout, fmt = 9998 )
3155 ELSE IF( err.GT.dble( thresh ) )
THEN
3156 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3157 $
WRITE( nout, fmt = 9997 ) err
3162 IF( lsame( transa,
'N' ) )
THEN
3163 CALL pdchkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3164 CALL pdchkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3166 CALL pdchkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3167 CALL pdchkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3170 ELSE IF( nrout.EQ.5 )
THEN
3176 IF( lsame( side,
'L' ) )
THEN
3177 CALL pdmmch( ictxt, transa,
'No transpose', m, n, m,
3178 $ alpha, a, ia, ja, desca, c, ib, jb, descb,
3179 $ zero, b, pb, ib, jb, descb, work,
3180 $ work( ipg ), err, ierr( 2 ) )
3182 CALL pdmmch( ictxt,
'No transpose', transa, m, n, n,
3183 $ alpha, c, ib, jb, descb, a, ia, ja, desca,
3184 $ zero, b, pb, ib, jb, descb, work,
3185 $ work( ipg ), err, ierr( 2 ) )
3188 IF( ierr( 2 ).NE.0 )
THEN
3189 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3190 $
WRITE( nout, fmt = 9998 )
3191 ELSE IF( err.GT.dble( thresh ) )
THEN
3192 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3193 $
WRITE( nout, fmt = 9997 ) err
3198 IF( lsame( side,
'L' ) )
THEN
3199 IF( lsame( uplo,
'L' ) )
THEN
3200 IF( lsame( diag,
'N' ) )
THEN
3201 CALL pb_dlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3202 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3204 CALL pb_dlaset(
'Upper', m, m, 0, rogue, one,
3205 $ a( ia+(ja-1)*desca( m_ ) ),
3209 IF( lsame( diag,
'N' ) )
THEN
3210 CALL pb_dlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3211 $ a( ia+1+(ja-1)*desca( m_ ) ),
3214 CALL pb_dlaset(
'Lower', m, m, 0, rogue, one,
3215 $ a( ia+(ja-1)*desca( m_ ) ),
3219 CALL pdchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3221 IF( lsame( uplo,
'L' ) )
THEN
3222 IF( lsame( diag,
'N' ) )
THEN
3223 CALL pb_dlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3224 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3226 CALL pb_dlaset(
'Upper', n, n, 0, rogue, one,
3227 $ a( ia+(ja-1)*desca( m_ ) ),
3231 IF( lsame( diag,
'N' ) )
THEN
3232 CALL pb_dlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3233 $ a( ia+1+(ja-1)*desca( m_ ) ),
3236 CALL pb_dlaset(
'Lower', n, n, 0, rogue, one,
3237 $ a( ia+(ja-1)*desca( m_ ) ),
3241 CALL pdchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3244 ELSE IF( nrout.EQ.6 )
THEN
3250 CALL dtrsm( side, uplo, transa, diag, m, n, alpha,
3251 $ a( ia+(ja-1)*desca( m_ ) ), desca( m_ ),
3252 $ b( ib+(jb-1)*descb( m_ ) ), descb( m_ ) )
3253 CALL pdtrmm( side, uplo, transa, diag, m, n, alpha, pa, ia, ja,
3254 $ desca, pb, ib, jb, descb )
3255 IF( lsame( side,
'L' ) )
THEN
3256 CALL pdmmch( ictxt, transa,
'No transpose', m, n, m, alpha,
3257 $ a, ia, ja, desca, b, ib, jb, descb, zero, c,
3258 $ pb, ib, jb, descb, work, work( ipg ), err,
3261 CALL pdmmch( ictxt,
'No transpose', transa, m, n, n, alpha,
3262 $ b, ib, jb, descb, a, ia, ja, desca, zero, c,
3263 $ pb, ib, jb, descb, work, work( ipg ), err,
3267 IF( ierr( 2 ).NE.0 )
THEN
3268 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3269 $
WRITE( nout, fmt = 9998 )
3270 ELSE IF( err.GT.dble( thresh ) )
THEN
3271 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3272 $
WRITE( nout, fmt = 9997 ) err
3277 IF( lsame( side,
'L' ) )
THEN
3278 IF( lsame( uplo,
'L' ) )
THEN
3279 IF( lsame( diag,
'N' ) )
THEN
3280 CALL pb_dlaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3281 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3283 CALL pb_dlaset(
'Upper', m, m, 0, rogue, one,
3284 $ a( ia+(ja-1)*desca( m_ ) ),
3288 IF( lsame( diag,
'N' ) )
THEN
3289 CALL pb_dlaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3290 $ a( ia+1+(ja-1)*desca( m_ ) ),
3293 CALL pb_dlaset(
'Lower', m, m, 0, rogue, one,
3294 $ a( ia+(ja-1)*desca( m_ ) ),
3298 CALL pdchkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3300 IF( lsame( uplo,
'L' ) )
THEN
3301 IF( lsame( diag,
'N' ) )
THEN
3302 CALL pb_dlaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3303 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3305 CALL pb_dlaset(
'Upper', n, n, 0, rogue, one,
3306 $ a( ia+(ja-1)*desca( m_ ) ),
3310 IF( lsame( diag,
'N' ) )
THEN
3311 CALL pb_dlaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3312 $ a( ia+1+(ja-1)*desca( m_ ) ),
3315 CALL pb_dlaset(
'Lower', n, n, 0, rogue, one,
3316 $ a( ia+(ja-1)*desca( m_ ) ),
3320 CALL pdchkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3322 ELSE IF( nrout.EQ.7 )
THEN
3328 CALL pdmmch3(
'All', transa, m, n, alpha, a, ia, ja, desca,
3329 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3333 IF( lsame( transa,
'N' ) )
THEN
3334 CALL pdchkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3336 CALL pdchkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3339 ELSE IF( nrout.EQ.8 )
THEN
3345 CALL pdmmch3( uplo, transa, m, n, alpha, a, ia, ja, desca,
3346 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3350 IF( lsame( transa,
'N' ) )
THEN
3351 CALL pdchkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3353 CALL pdchkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3358 IF( ierr( 1 ).NE.0 )
THEN
3360 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3361 $
WRITE( nout, fmt = 9999 )
'A'
3364 IF( ierr( 2 ).NE.0 )
THEN
3366 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3367 $
WRITE( nout, fmt = 9999 )
'B'
3370 IF( ierr( 3 ).NE.0 )
THEN
3372 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3373 $
WRITE( nout, fmt = 9999 )
'C'
3376 9999
FORMAT( 2x,
' ***** ERROR: Matrix operand ', a,
3377 $
' is incorrect.' )
3378 9998
FORMAT( 2x,
' ***** FATAL ERROR - Computed result is less ',
3379 $
'than half accurate *****' )
3380 9997
FORMAT( 2x,
' ***** Test completed with maximum test ratio: ',
3381 $ f11.5,
' SUSPECT *****' )