4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PDGEMM ',
'PDSYMM ',
'PDSYRK ',
7 $
'PDSYR2K',
'PDTRMM ',
'PDTRSM ',
8 $
'PDGEADD',
'PDTRADD'/
116 INTEGER maxtests, maxgrids, dblesz, totmem, memsiz,
119 parameter( maxtests = 20, maxgrids = 20, dblesz = 8,
120 $ one = 1.0d+0, totmem = 2000000, nsubs = 8,
121 $ memsiz = totmem / dblesz )
122 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
123 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
125 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
126 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
127 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
128 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
131 CHARACTER*1 adiagdo, aform, cform, diag, side, transa,
133 INTEGER csrca, csrcb, csrcc, i, ia, iam, iaseed, ib,
134 $ ibseed, ic, icseed, ictxt, imba, imbb, imbc,
135 $ imida, imidb, imidc, inba, inbb, inbc, ipa,
136 $ ipb, ipc, iposta, ipostb, ipostc, iprea, ipreb,
137 $ iprec, j, ja, jb, jc, k, l, m, ma, mb, mba,
138 $ mbb, mbc, mc, memreqd, mpa, mpb, mpc, mycol,
139 $ myrow, n, na, nb, nba, nbb, nbc, nc, ncola,
140 $ ncolb, ncolc, ngrids, nout, npcol, nprocs,
141 $ nprow, nqa, nqb, nqc, nrowa, nrowb, nrowc,
142 $ ntests, offda, offdc, rsrca, rsrcb, rsrcc
143 DOUBLE PRECISION alpha, beta, cflops, nops, scale, wflops
146 LOGICAL ltest( nsubs ), bcheck( nsubs ),
148 CHARACTER*1 diagval( maxtests ), sideval( maxtests ),
149 $ trnaval( maxtests ), trnbval( maxtests ),
150 $ uploval( maxtests )
152 INTEGER cscaval( maxtests ), cscbval( maxtests ),
153 $ csccval( maxtests ), desca( dlen_ ),
154 $ descb( dlen_ ), descc( dlen_ ),
155 $ iaval( maxtests ), ibval( maxtests ),
156 $ icval( maxtests ), ierr( 3 ),
157 $ imbaval( maxtests ), imbbval( maxtests ),
158 $ imbcval( maxtests ), inbaval( maxtests ),
159 $ inbbval( maxtests ), inbcval( maxtests ),
160 $ javal( maxtests ), jbval( maxtests ),
161 $ jcval( maxtests ), kval( maxtests ),
162 $ maval( maxtests ), mbaval( maxtests ),
163 $ mbbval( maxtests ), mbcval( maxtests ),
164 $ mbval( maxtests ), mcval( maxtests ),
165 $ mval( maxtests ), naval( maxtests ),
166 $ nbaval( maxtests ), nbbval( maxtests ),
167 $ nbcval( maxtests ), nbval( maxtests ),
168 $ ncval( maxtests ), nval( maxtests ),
169 $ pval( maxtests ), qval( maxtests ),
170 $ rscaval( maxtests ), rscbval( maxtests ),
171 $ rsccval( maxtests )
172 DOUBLE PRECISION ctime( 1 ), mem( memsiz ), wtime( 1 )
175 EXTERNAL blacs_barrier, blacs_exit, blacs_get,
176 $ blacs_gridexit, blacs_gridinfo, blacs_gridinit,
191 CHARACTER*7 snames( nsubs )
194 COMMON /snamec/snames
195 COMMON /infoc/info, nblog
196 COMMON /pberrorc/nout, abrtflg
199 DATA bcheck/.true., .true., .false., .true., .true.,
200 $ .true., .false., .false./
201 DATA ccheck/.true., .true., .true., .true., .false.,
202 $ .false., .true., .true./
221 CALL blacs_pinfo( iam, nprocs )
223 $ trnaval, trnbval, uploval, mval, nval,
224 $ kval, maval, naval, imbaval, mbaval,
225 $ inbaval, nbaval, rscaval, cscaval, iaval,
226 $ javal, mbval, nbval, imbbval, mbbval,
227 $ inbbval, nbbval, rscbval, cscbval, ibval,
228 $ jbval, mcval, ncval, imbcval, mbcval,
229 $ inbcval, nbcval, rsccval, csccval, icval,
230 $ jcval, maxtests, ngrids, pval, maxgrids,
231 $ qval, maxgrids, nblog, ltest, iam, nprocs,
235 $
WRITE( nout, fmt = 9984 )
247 IF( nprow.LT.1 )
THEN
249 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
251 ELSE IF( npcol.LT.1 )
THEN
253 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
255 ELSE IF( nprow*npcol.GT.nprocs )
THEN
257 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
261 IF( ierr( 1 ).GT.0 )
THEN
263 $
WRITE( nout, fmt = 9997 )
'GRID'
269 CALL blacs_get( -1, 0, ictxt )
270 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
271 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
276 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
287 transa = trnaval( j )
288 transb = trnbval( j )
330 WRITE( nout, fmt = * )
331 WRITE( nout, fmt = 9996 ) j, nprow, npcol
332 WRITE( nout, fmt = * )
334 WRITE( nout, fmt = 9995 )
335 WRITE( nout, fmt = 9994 )
336 WRITE( nout, fmt = 9995 )
337 WRITE( nout, fmt = 9993 ) m, n, k, side, uplo, transa,
340 WRITE( nout, fmt = 9995 )
341 WRITE( nout, fmt = 9992 )
342 WRITE( nout, fmt = 9995 )
343 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
344 $ mba, nba, rsrca, csrca
346 WRITE( nout, fmt = 9995 )
347 WRITE( nout, fmt = 9990 )
348 WRITE( nout, fmt = 9995 )
349 WRITE( nout, fmt = 9991 ) ib, jb, mb, nb, imbb, inbb,
350 $ mbb, nbb, rsrcb, csrcb
352 WRITE( nout, fmt = 9995 )
353 WRITE( nout, fmt = 9989 )
354 WRITE( nout, fmt = 9995 )
355 WRITE( nout, fmt = 9991 ) ic, jc, mc, nc, imbc, inbc,
356 $ mbc, nbc, rsrcc, csrcc
358 WRITE( nout, fmt = 9995 )
359 WRITE( nout, fmt = 9980 )
365 IF( .NOT.
lsame( side,
'L' ).AND.
366 $ .NOT.
lsame( side,
'R' ) )
THEN
368 $
WRITE( nout, fmt = 9997 )
'SIDE'
372 IF( .NOT.
lsame( uplo,
'U' ).AND.
373 $ .NOT.
lsame( uplo,
'L' ) )
THEN
375 $
WRITE( nout, fmt = 9997 )
'UPLO'
379 IF( .NOT.
lsame( transa,
'N' ).AND.
380 $ .NOT.
lsame( transa,
'T' ).AND.
381 $ .NOT.
lsame( transa,
'C' ) )
THEN
383 $
WRITE( nout, fmt = 9997 )
'TRANSA'
387 IF( .NOT.
lsame( transb,
'N' ).AND.
388 $ .NOT.
lsame( transb,
'T' ).AND.
389 $ .NOT.
lsame( transb,
'C' ) )
THEN
391 $
WRITE( nout, fmt = 9997 )
'TRANSB'
395 IF( .NOT.
lsame( diag ,
'U' ).AND.
396 $ .NOT.
lsame( diag ,
'N' ) )
THEN
398 $
WRITE( nout, fmt = 9997 )
'DIAG'
405 $ block_cyclic_2d_inb, ma, na, imba, inba,
406 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
407 $ imida, iposta, 0, 0, ierr( 1 ) )
410 $ block_cyclic_2d_inb, mb, nb, imbb, inbb,
411 $ mbb, nbb, rsrcb, csrcb, mpb, nqb, ipreb,
412 $ imidb, ipostb, 0, 0, ierr( 2 ) )
415 $ block_cyclic_2d_inb, mc, nc, imbc, inbc,
416 $ mbc, nbc, rsrcc, csrcc, mpc, nqc, iprec,
417 $ imidc, ipostc, 0, 0, ierr( 3 ) )
419 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
420 $ ierr( 3 ).GT.0 )
THEN
428 ipb = ipa + desca( lld_ )*nqa
429 ipc = ipb + descb( lld_ )*nqb
433 memreqd = ipc + descc( lld_ )*nqc - 1
435 IF( memreqd.GT.memsiz )
THEN
437 $
WRITE( nout, fmt = 9987 ) memreqd*dblesz
443 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
445 IF( ierr( 1 ).GT.0 )
THEN
447 $
WRITE( nout, fmt = 9988 )
457 IF( .NOT.ltest( l ) )
468 IF(
lsame( transa,
'N' ) )
THEN
475 IF(
lsame( transb,
'N' ) )
THEN
482 ELSE IF( l.EQ.2 )
THEN
490 IF(
lsame( side,
'L' ) )
THEN
497 ELSE IF( l.EQ.3 )
THEN
503 IF(
lsame( transa,
'N' ) )
THEN
512 ELSE IF( l.EQ.4 )
THEN
518 IF(
lsame( transa,
'N' ) )
THEN
529 ELSE IF( l.EQ.5 .OR. l.EQ.6 )
THEN
535 IF(
lsame( side,
'L' ) )
THEN
544 ELSE IF( l.EQ.7 .OR. l.EQ.8 )
THEN
548 IF(
lsame( transa,
'N' ) )
THEN
564 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
566 CALL pmdimchk( ictxt, nout, nrowb, ncolb,
'B', ib, jb,
568 CALL pmdimchk( ictxt, nout, nrowc, ncolc,
'C', ic, jc,
571 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
572 $ ierr( 3 ).NE.0 )
THEN
588 ELSE IF( l.EQ.3 .OR. l.EQ.4 )
THEN
598 ELSE IF( ( l.EQ.6 ).AND.(
lsame( diag,
'N' ) ) )
THEN
620 CALL pdlagen( .false., aform, adiagdo, offda, ma, na,
621 $ 1, 1, desca, iaseed, mem( ipa ),
623 IF( ( l.EQ.6 ).AND.( .NOT.(
lsame( diag,
'N' ) ) ).AND.
624 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
625 scale = one / dble(
max( nrowa, ncola ) )
626 IF(
lsame( uplo,
'L' ) )
THEN
627 CALL pdlascal(
'Lower', nrowa-1, ncola-1, scale,
628 $ mem( ipa ), ia+1, ja, desca )
630 CALL pdlascal(
'Upper', nrowa-1, ncola-1, scale,
631 $ mem( ipa ), ia, ja+1, desca )
637 $
CALL pdlagen( .false.,
'None',
'No diag', 0, mb, nb,
638 $ 1, 1, descb, ibseed, mem( ipb ),
642 $
CALL pdlagen( .false., cform,
'No diag', offdc, mc,
643 $ nc, 1, 1, descc, icseed, mem( ipc ),
648 CALL blacs_barrier( ictxt,
'All' )
656 nops =
pdopbl3( snames( l ), m, n, k )
659 CALL pdgemm( transa, transb, m, n, k, alpha,
660 $ mem( ipa ), ia, ja, desca, mem( ipb ),
661 $ ib, jb, descb, beta, mem( ipc ), ic, jc,
665 ELSE IF( l.EQ.2 )
THEN
669 IF(
lsame( side,
'L' ) )
THEN
670 nops =
pdopbl3( snames( l ), m, n, 0 )
672 nops =
pdopbl3( snames( l ), m, n, 1 )
676 CALL pdsymm( side, uplo, m, n, alpha, mem( ipa ), ia,
677 $ ja, desca, mem( ipb ), ib, jb, descb,
678 $ beta, mem( ipc ), ic, jc, descc )
681 ELSE IF( l.EQ.3 )
THEN
685 nops =
pdopbl3( snames( l ), n, n, k )
688 CALL pdsyrk( uplo, transa, n, k, alpha, mem( ipa ),
689 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
693 ELSE IF( l.EQ.4 )
THEN
697 nops =
pdopbl3( snames( l ), n, n, k )
700 CALL pdsyr2k( uplo, transa, n, k, alpha, mem( ipa ),
701 $ ia, ja, desca, mem( ipb ), ib, jb,
702 $ descb, beta, mem( ipc ), ic, jc,
706 ELSE IF( l.EQ.5 )
THEN
710 IF(
lsame( side,
'L' ) )
THEN
711 nops =
pdopbl3( snames( l ), m, n, 0 )
713 nops =
pdopbl3( snames( l ), m, n, 1 )
717 CALL pdtrmm( side, uplo, transa, diag, m, n, alpha,
718 $ mem( ipa ), ia, ja, desca, mem( ipb ),
722 ELSE IF( l.EQ.6 )
THEN
726 IF(
lsame( side,
'L' ) )
THEN
727 nops =
pdopbl3( snames( l ), m, n, 0 )
729 nops =
pdopbl3( snames( l ), m, n, 1 )
733 CALL pdtrsm( side, uplo, transa, diag, m, n, alpha,
734 $ mem( ipa ), ia, ja, desca, mem( ipb ),
738 ELSE IF( l.EQ.7 )
THEN
742 nops =
pdopbl3( snames( l ), m, n, m )
745 CALL pdgeadd( transa, m, n, alpha, mem( ipa ), ia, ja,
746 $ desca, beta, mem( ipc ), ic, jc, descc )
749 ELSE IF( l.EQ.8 )
THEN
753 IF(
lsame( uplo,
'U' ) )
THEN
754 nops =
pdopbl3( snames( l ), m, n, 0 )
756 nops =
pdopbl3( snames( l ), m, n, 1 )
760 CALL pdtradd( uplo, transa, m, n, alpha, mem( ipa ),
761 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
771 $
WRITE( nout, fmt = 9982 ) info
775 CALL pb_combine( ictxt,
'All',
'>',
'W', 1, 1, wtime )
776 CALL pb_combine( ictxt,
'All',
'>',
'C', 1, 1, ctime )
784 IF( wtime( 1 ).GT.0.0d+0 )
THEN
785 wflops = nops / ( wtime( 1 ) * 1.0d+6 )
792 IF( ctime( 1 ).GT.0.0d+0 )
THEN
793 cflops = nops / ( ctime( 1 ) * 1.0d+6 )
798 WRITE( nout, fmt = 9981 ) snames( l ), wtime( 1 ),
799 $ wflops, ctime( 1 ), cflops
805 40
IF( iam.EQ.0 )
THEN
806 WRITE( nout, fmt = 9995 )
807 WRITE( nout, fmt = * )
808 WRITE( nout, fmt = 9986 ) j
813 CALL blacs_gridexit( ictxt )
818 WRITE( nout, fmt = * )
819 WRITE( nout, fmt = 9985 )
820 WRITE( nout, fmt = * )
825 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
826 $
' should be at least 1' )
827 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
828 $
'. It can be at most', i4 )
829 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
830 9996
FORMAT( 2x,
'Test number ', i2 ,
' started on a ', i4,
' x ',
831 $ i4,
' process grid.' )
832 9995
FORMAT( 2x,
' ------------------------------------------------',
833 $
'-------------------' )
834 9994
FORMAT( 2x,
' M N K SIDE UPLO TRANSA ',
836 9993
FORMAT( 5x,i6,1x,i6,1x,i6,6x,a1,5x,a1,7x,a1,7x,a1,5x,a1 )
837 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
838 $
' MBA NBA RSRCA CSRCA' )
839 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
841 9990
FORMAT( 2x,
' IB JB MB NB IMBB INBB',
842 $
' MBB NBB RSRCB CSRCB' )
843 9989
FORMAT( 2x,
' IC JC MC NC IMBC INBC',
844 $
' MBC NBC RSRCC CSRCC' )
845 9988
FORMAT(
'Not enough memory for this test: going on to',
846 $
' next test case.' )
847 9987
FORMAT(
'Not enough memory. Need: ', i12 )
848 9986
FORMAT( 2x,
'Test number ', i2,
' completed.' )
849 9985
FORMAT( 2x,
'End of Tests.' )
850 9984
FORMAT( 2x,
'Tests started.' )
851 9983
FORMAT( 5x, a,
' ***** ', a,
' has an incorrect value: ',
853 9982
FORMAT( 2x,
' ***** Operation not supported, error code: ',
855 9981
FORMAT( 2x,
'| ', a, 2x, f13.3, 2x, f13.3, 2x, f13.3, 2x, f13.3 )
856 9980
FORMAT( 2x,
' WALL time (s) WALL Mflops ',
857 $
' CPU time (s) CPU Mflops' )
864 SUBROUTINE pdbla3timinfo( SUMMRY, NOUT, NMAT, DIAGVAL, SIDEVAL,
865 $ TRNAVAL, TRNBVAL, UPLOVAL, MVAL,
866 $ NVAL, KVAL, MAVAL, NAVAL, IMBAVAL,
867 $ MBAVAL, INBAVAL, NBAVAL, RSCAVAL,
868 $ CSCAVAL, IAVAL, JAVAL, MBVAL, NBVAL,
869 $ IMBBVAL, MBBVAL, INBBVAL, NBBVAL,
870 $ RSCBVAL, CSCBVAL, IBVAL, JBVAL,
871 $ MCVAL, NCVAL, IMBCVAL, MBCVAL,
872 $ INBCVAL, NBCVAL, RSCCVAL, CSCCVAL,
873 $ ICVAL, JCVAL, LDVAL, NGRIDS, PVAL,
874 $ LDPVAL, QVAL, LDQVAL, NBLOG, LTEST,
875 $ IAM, NPROCS, ALPHA, BETA, WORK )
883 INTEGER IAM, LDPVAL, LDQVAL, LDVAL, NBLOG, NGRIDS,
885 DOUBLE PRECISION ALPHA, BETA
888 CHARACTER*( * ) SUMMRY
889 CHARACTER*1 DIAGVAL( LDVAL ), SIDEVAL( LDVAL ),
890 $ TRNAVAL( LDVAL ), TRNBVAL( LDVAL ),
893 INTEGER CSCAVAL( LDVAL ), CSCBVAL( LDVAL ),
894 $ csccval( ldval ), iaval( ldval ),
895 $ ibval( ldval ), icval( ldval ),
896 $ imbaval( ldval ), imbbval( ldval ),
897 $ imbcval( ldval ), inbaval( ldval ),
898 $ inbbval( ldval ), inbcval( ldval ),
899 $ javal( ldval ), jbval( ldval ), jcval( ldval ),
900 $ kval( ldval ), maval( ldval ), mbaval( ldval ),
901 $ mbbval( ldval ), mbcval( ldval ),
902 $ mbval( ldval ), mcval( ldval ), mval( ldval ),
903 $ naval( ldval ), nbaval( ldval ),
904 $ nbbval( ldval ), nbcval( ldval ),
905 $ nbval( ldval ), ncval( ldval ), nval( ldval ),
906 $ pval( ldpval ), qval( ldqval ),
907 $ rscaval( ldval ), rscbval( ldval ),
908 $ rsccval( ldval ), work( * )
1180 PARAMETER ( NIN = 11, nsubs = 8 )
1188 CHARACTER*79 USRINFO
1191 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1192 $ blacs_gridinit, blacs_setup, dgebr2d, dgebs2d,
1193 $
icopy, igebr2d, igebs2d, sgebr2d, sgebs2d
1196 INTRINSIC char, ichar,
max,
min
1199 CHARACTER*7 SNAMES( NSUBS )
1200 COMMON /SNAMEC/SNAMES
1211 OPEN( nin, file=
'PDBLAS3TIM.dat', status=
'OLD' )
1212 READ( nin, fmt = * ) summry
1217 READ( nin, fmt = 9999 ) usrinfo
1221 READ( nin, fmt = * ) summry
1222 READ( nin, fmt = * ) nout
1223 IF( nout.NE.0 .AND. nout.NE.6 )
1224 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1230 READ( nin, fmt = * ) nblog
1236 READ( nin, fmt = * ) ngrids
1237 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1238 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1240 ELSE IF( ngrids.GT.ldqval )
THEN
1241 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1247 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1248 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1252 READ( nin, fmt = * ) alpha
1253 READ( nin, fmt = * ) beta
1257 READ( nin, fmt = * ) nmat
1258 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1259 WRITE( nout, fmt = 9998 )
'Tests', ldval
1265 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1266 READ( nin, fmt = * ) ( sideval( i ), i = 1, nmat )
1267 READ( nin, fmt = * ) ( trnaval( i ), i = 1, nmat )
1268 READ( nin, fmt = * ) ( trnbval( i ), i = 1, nmat )
1269 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1270 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1271 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1272 READ( nin, fmt = * ) ( kval( i ), i = 1, nmat )
1273 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1274 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1275 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1276 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1277 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1278 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1279 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1280 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1281 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1282 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1283 READ( nin, fmt = * ) ( mbval( i ), i = 1, nmat )
1284 READ( nin, fmt = * ) ( nbval( i ), i = 1, nmat )
1285 READ( nin, fmt = * ) ( imbbval( i ), i = 1, nmat )
1286 READ( nin, fmt = * ) ( inbbval( i ), i = 1, nmat )
1287 READ( nin, fmt = * ) ( mbbval( i ), i = 1, nmat )
1288 READ( nin, fmt = * ) ( nbbval( i ), i = 1, nmat )
1289 READ( nin, fmt = * ) ( rscbval( i ), i = 1, nmat )
1290 READ( nin, fmt = * ) ( cscbval( i ), i = 1, nmat )
1291 READ( nin, fmt = * ) ( ibval( i ), i = 1, nmat )
1292 READ( nin, fmt = * ) ( jbval( i ), i = 1, nmat )
1293 READ( nin, fmt = * ) ( mcval( i ), i = 1, nmat )
1294 READ( nin, fmt = * ) ( ncval( i ), i = 1, nmat )
1295 READ( nin, fmt = * ) ( imbcval( i ), i = 1, nmat )
1296 READ( nin, fmt = * ) ( inbcval( i ), i = 1, nmat )
1297 READ( nin, fmt = * ) ( mbcval( i ), i = 1, nmat )
1298 READ( nin, fmt = * ) ( nbcval( i ), i = 1, nmat )
1299 READ( nin, fmt = * ) ( rsccval( i ), i = 1, nmat )
1300 READ( nin, fmt = * ) ( csccval( i ), i = 1, nmat )
1301 READ( nin, fmt = * ) ( icval( i ), i = 1, nmat )
1302 READ( nin, fmt = * ) ( jcval( i ), i = 1, nmat )
1308 ltest( i ) = .false.
1311 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1313 IF( snamet.EQ.snames( i ) )
1317 WRITE( nout, fmt = 9995 )snamet
1333 IF( nprocs.LT.1 )
THEN
1336 nprocs =
max( nprocs, pval( i )*qval( i ) )
1338 CALL blacs_setup( iam, nprocs )
1344 CALL blacs_get( -1, 0, ictxt )
1345 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1349 CALL dgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1350 CALL dgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1355 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1359 work( i ) = ichar( diagval( j ) )
1360 work( i+1 ) = ichar( sideval( j ) )
1361 work( i+2 ) = ichar( trnaval( j ) )
1362 work( i+3 ) = ichar( trnbval( j ) )
1363 work( i+4 ) = ichar( uploval( j ) )
1366 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1368 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1370 CALL icopy( nmat, mval, 1, work( i ), 1 )
1372 CALL icopy( nmat, nval, 1, work( i ), 1 )
1374 CALL icopy( nmat, kval, 1, work( i ), 1 )
1376 CALL icopy( nmat, maval, 1, work( i ), 1 )
1378 CALL icopy( nmat, naval, 1, work( i ), 1 )
1380 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1382 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1384 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
1386 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
1388 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
1390 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
1392 CALL icopy( nmat, iaval, 1, work( i ), 1 )
1394 CALL icopy( nmat, javal, 1, work( i ), 1 )
1396 CALL icopy( nmat, mbval, 1, work( i ), 1 )
1398 CALL icopy( nmat, nbval, 1, work( i ), 1 )
1400 CALL icopy( nmat, imbbval, 1, work( i ), 1 )
1402 CALL icopy( nmat, inbbval, 1, work( i ), 1 )
1404 CALL icopy( nmat, mbbval, 1, work( i ), 1 )
1406 CALL icopy( nmat, nbbval, 1, work( i ), 1 )
1408 CALL icopy( nmat, rscbval, 1, work( i ), 1 )
1410 CALL icopy( nmat, cscbval, 1, work( i ), 1 )
1412 CALL icopy( nmat, ibval, 1, work( i ), 1 )
1414 CALL icopy( nmat, jbval, 1, work( i ), 1 )
1416 CALL icopy( nmat, mcval, 1, work( i ), 1 )
1418 CALL icopy( nmat, ncval, 1, work( i ), 1 )
1420 CALL icopy( nmat, imbcval, 1, work( i ), 1 )
1422 CALL icopy( nmat, inbcval, 1, work( i ), 1 )
1424 CALL icopy( nmat, mbcval, 1, work( i ), 1 )
1426 CALL icopy( nmat, nbcval, 1, work( i ), 1 )
1428 CALL icopy( nmat, rsccval, 1, work( i ), 1 )
1430 CALL icopy( nmat, csccval, 1, work( i ), 1 )
1432 CALL icopy( nmat, icval, 1, work( i ), 1 )
1434 CALL icopy( nmat, jcval, 1, work( i ), 1 )
1438 IF( ltest( j ) )
THEN
1446 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1450 WRITE( nout, fmt = 9999 )
1451 $
'Level 3 PBLAS timing program.'
1452 WRITE( nout, fmt = 9999 ) usrinfo
1453 WRITE( nout, fmt = * )
1454 WRITE( nout, fmt = 9999 )
1455 $
'Tests of the real double precision '//
1457 WRITE( nout, fmt = * )
1458 WRITE( nout, fmt = 9992 ) nmat
1459 WRITE( nout, fmt = 9986 ) nblog
1460 WRITE( nout, fmt = 9991 ) ngrids
1461 WRITE( nout, fmt = 9989 )
1462 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1464 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 6,
1465 $
min( 10, ngrids ) )
1467 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 11,
1468 $
min( 15, ngrids ) )
1470 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 16, ngrids )
1471 WRITE( nout, fmt = 9989 )
1472 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1474 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 6,
1475 $
min( 10, ngrids ) )
1477 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 11,
1478 $
min( 15, ngrids ) )
1480 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 16, ngrids )
1481 WRITE( nout, fmt = 9994 ) alpha
1482 WRITE( nout, fmt = 9993 ) beta
1483 IF( ltest( 1 ) )
THEN
1484 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... Yes'
1486 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... No '
1489 IF( ltest( i ) )
THEN
1490 WRITE( nout, fmt = 9987 ) snames( i ),
' ... Yes'
1492 WRITE( nout, fmt = 9987 ) snames( i ),
' ... No '
1495 WRITE( nout, fmt = * )
1502 $
CALL blacs_setup( iam, nprocs )
1507 CALL blacs_get( -1, 0, ictxt )
1508 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1510 CALL dgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
1511 CALL dgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
1513 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
1518 i = 2*ngrids + 38*nmat + nsubs
1519 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
1523 diagval( j ) = char( work( i ) )
1524 sideval( j ) = char( work( i+1 ) )
1525 trnaval( j ) = char( work( i+2 ) )
1526 trnbval( j ) = char( work( i+3 ) )
1527 uploval( j ) = char( work( i+4 ) )
1530 CALL icopy( ngrids, work( i ), 1, pval, 1 )
1532 CALL icopy( ngrids, work( i ), 1, qval, 1 )
1534 CALL icopy( nmat, work( i ), 1, mval, 1 )
1536 CALL icopy( nmat, work( i ), 1, nval, 1 )
1538 CALL icopy( nmat, work( i ), 1, kval, 1 )
1540 CALL icopy( nmat, work( i ), 1, maval, 1 )
1542 CALL icopy( nmat, work( i ), 1, naval, 1 )
1544 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
1546 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
1548 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
1550 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
1552 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
1554 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
1556 CALL icopy( nmat, work( i ), 1, iaval, 1 )
1558 CALL icopy( nmat, work( i ), 1, javal, 1 )
1560 CALL icopy( nmat, work( i ), 1, mbval, 1 )
1562 CALL icopy( nmat, work( i ), 1, nbval, 1 )
1564 CALL icopy( nmat, work( i ), 1, imbbval, 1 )
1566 CALL icopy( nmat, work( i ), 1, inbbval, 1 )
1568 CALL icopy( nmat, work( i ), 1, mbbval, 1 )
1570 CALL icopy( nmat, work( i ), 1, nbbval, 1 )
1572 CALL icopy( nmat, work( i ), 1, rscbval, 1 )
1574 CALL icopy( nmat, work( i ), 1, cscbval, 1 )
1576 CALL icopy( nmat, work( i ), 1, ibval, 1 )
1578 CALL icopy( nmat, work( i ), 1, jbval, 1 )
1580 CALL icopy( nmat, work( i ), 1, mcval, 1 )
1582 CALL icopy( nmat, work( i ), 1, ncval, 1 )
1584 CALL icopy( nmat, work( i ), 1, imbcval, 1 )
1586 CALL icopy( nmat, work( i ), 1, inbcval, 1 )
1588 CALL icopy( nmat, work( i ), 1, mbcval, 1 )
1590 CALL icopy( nmat, work( i ), 1, nbcval, 1 )
1592 CALL icopy( nmat, work( i ), 1, rsccval, 1 )
1594 CALL icopy( nmat, work( i ), 1, csccval, 1 )
1596 CALL icopy( nmat, work( i ), 1, icval, 1 )
1598 CALL icopy( nmat, work( i ), 1, jcval, 1 )
1602 IF( work( i ).EQ.1 )
THEN
1605 ltest( j ) = .false.
1612 CALL blacs_gridexit( ictxt )
1616 120
WRITE( nout, fmt = 9997 )
1618 IF( nout.NE.6 .AND. nout.NE.0 )
1620 CALL blacs_abort( ictxt, 1 )
1625 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
1627 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
1628 9996
FORMAT( a7, l2 )
1629 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
1630 $ /
' ******* TESTS ABANDONED *******' )
1631 9994
FORMAT( 2x,
'Alpha : ', g16.6 )
1632 9993
FORMAT( 2x,
'Beta : ', g16.6 )
1633 9992
FORMAT( 2x,
'Number of Tests : ', i6 )
1634 9991
FORMAT( 2x,
'Number of process grids : ', i6 )
1635 9990
FORMAT( 2x,
' : ', 5i6 )
1636 9989
FORMAT( 2x, a1,
' : ', 5i6 )
1637 9988
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
1638 9987
FORMAT( 2x,
' ', a, a8 )
1639 9986
FORMAT( 2x,
'Logical block size : ', i6 )