4 CHARACTER*7 SNAMES( 8 )
6 DATA snames/
'PCGEMV ',
'PCHEMV ',
'PCTRMV ',
7 $
'PCTRSV ',
'PCGERU ',
'PCGERC ',
117 INTEGER maxtests, maxgrids, cplxsz, totmem, memsiz,
120 parameter( maxtests = 20, maxgrids = 20, cplxsz = 8,
121 $ one = ( 1.0e+0, 0.0e+0 ), totmem = 2000000,
122 $ nsubs = 8, memsiz = totmem / cplxsz )
123 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
124 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
126 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
127 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
128 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
129 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
132 CHARACTER*1 aform, diag, diagdo, trans, uplo
133 INTEGER csrca, csrcx, csrcy, i, ia, iam, iaseed, ictxt,
134 $ imba, imbx, imby, imida, imidx, imidy, inba,
135 $ inbx, inby, incx, incy, ipa, iposta, ipostx,
136 $ iposty, iprea, iprex, iprey, ipx, ipy, ix,
137 $ ixseed, iy, iyseed, j, ja, jx, jy, k, m, ma,
138 $ mba, mbx, mby, memreqd, mpa, mpx, mpy, mx, my,
139 $ mycol, myrow, n, na, nba, nbx, nby, ncola,
140 $ ngrids, nlx, nly, nout, npcol, nprocs, nprow,
141 $ nqa, nqx, nqy, nrowa, ntests, nx, ny, offd,
142 $ rsrca, rsrcx, rsrcy
143 DOUBLE PRECISION cflops, nops, wflops
144 COMPLEX alpha, beta, scale
147 LOGICAL ltest( nsubs ), ycheck( nsubs )
148 CHARACTER*1 diagval( maxtests ), tranval( maxtests ),
149 $ uploval( maxtests )
151 INTEGER cscaval( maxtests ), cscxval( maxtests ),
152 $ cscyval( maxtests ), desca( dlen_ ),
153 $ descx( dlen_ ), descy( dlen_ ),
154 $ iaval( maxtests ), ierr( 3 ),
155 $ imbaval( maxtests ), imbxval( maxtests ),
156 $ imbyval( maxtests ), inbaval( maxtests ),
157 $ inbxval( maxtests ), inbyval( maxtests ),
158 $ incxval( maxtests ), incyval( maxtests ),
159 $ ixval( maxtests ), iyval( maxtests ),
160 $ javal( maxtests ), jxval( maxtests ),
161 $ jyval( maxtests ), maval( maxtests ),
162 $ mbaval( maxtests ), mbxval( maxtests ),
163 $ mbyval( maxtests ), mval( maxtests ),
164 $ mxval( maxtests ), myval( maxtests ),
165 $ naval( maxtests ), nbaval( maxtests ),
166 $ nbxval( maxtests ), nbyval( maxtests ),
167 $ nval( maxtests ), nxval( maxtests ),
168 $ nyval( maxtests ), pval( maxtests ),
169 $ qval( maxtests ), rscaval( maxtests ),
170 $ rscxval( maxtests ), rscyval( maxtests )
171 DOUBLE PRECISION ctime( 1 ), wtime( 1 )
172 COMPLEX mem( memsiz )
175 EXTERNAL blacs_barrier, blacs_exit, blacs_get,
176 $ blacs_gridexit, blacs_gridinfo, blacs_gridinit,
179 $ pcgeru, pchemv, pcher, pcher2,
pclagen,
192 CHARACTER*7 snames( nsubs )
195 COMMON /snamec/snames
196 COMMON /infoc/info, nblog
197 COMMON /pberrorc/nout, abrtflg
200 DATA ycheck/.true., .true., .false., .false.,
201 $ .true., .true., .false., .true./
220 CALL blacs_pinfo( iam, nprocs )
222 $ uploval, mval, nval, maval, naval, imbaval,
223 $ mbaval, inbaval, nbaval, rscaval, cscaval,
224 $ iaval, javal, mxval, nxval, imbxval, mbxval,
225 $ inbxval, nbxval, rscxval, cscxval, ixval,
226 $ jxval, incxval, myval, nyval, imbyval,
227 $ mbyval, inbyval, nbyval, rscyval,
228 $ cscyval, iyval, jyval, incyval, maxtests,
229 $ ngrids, pval, maxgrids, qval, maxgrids,
230 $ nblog, ltest, iam, nprocs, alpha, beta, mem )
233 $
WRITE( nout, fmt = 9983 )
245 IF( nprow.LT.1 )
THEN
247 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
249 ELSE IF( npcol.LT.1 )
THEN
251 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
253 ELSE IF( nprow*npcol.GT.nprocs )
THEN
255 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
259 IF( ierr( 1 ).GT.0 )
THEN
261 $
WRITE( nout, fmt = 9997 )
'GRID'
267 CALL blacs_get( -1, 0, ictxt )
268 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
269 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
274 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
327 WRITE( nout, fmt = * )
328 WRITE( nout, fmt = 9996 ) j, nprow, npcol
329 WRITE( nout, fmt = * )
331 WRITE( nout, fmt = 9995 )
332 WRITE( nout, fmt = 9994 )
333 WRITE( nout, fmt = 9995 )
334 WRITE( nout, fmt = 9993 ) m, n, uplo, trans, diag
336 WRITE( nout, fmt = 9995 )
337 WRITE( nout, fmt = 9992 )
338 WRITE( nout, fmt = 9995 )
339 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
340 $ mba, nba, rsrca, csrca
342 WRITE( nout, fmt = 9995 )
343 WRITE( nout, fmt = 9990 )
344 WRITE( nout, fmt = 9995 )
345 WRITE( nout, fmt = 9989 ) ix, jx, mx, nx, imbx, inbx,
346 $ mbx, nbx, rsrcx, csrcx, incx
348 WRITE( nout, fmt = 9995 )
349 WRITE( nout, fmt = 9988 )
350 WRITE( nout, fmt = 9995 )
351 WRITE( nout, fmt = 9989 ) iy, jy, my, ny, imby, inby,
352 $ mby, nby, rsrcy, csrcy, incy
354 WRITE( nout, fmt = 9995 )
355 WRITE( nout, fmt = 9980 )
361 IF( .NOT.
lsame( uplo,
'U' ).AND.
362 $ .NOT.
lsame( uplo,
'L' ) )
THEN
364 $
WRITE( nout, fmt = 9997 )
'UPLO'
368 IF( .NOT.
lsame( trans,
'N' ).AND.
369 $ .NOT.
lsame( trans,
'T' ).AND.
370 $ .NOT.
lsame( trans,
'C' ) )
THEN
372 $
WRITE( nout, fmt = 9997 )
'TRANS'
376 IF( .NOT.
lsame( diag ,
'U' ).AND.
377 $ .NOT.
lsame( diag ,
'N' ) )
THEN
379 $
WRITE( nout, fmt = 9997 ) trans
380 WRITE( nout, fmt = 9997 )
'DIAG'
387 $ block_cyclic_2d_inb, ma, na, imba, inba,
388 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
389 $ imida, iposta, 0, 0, ierr( 1 ) )
391 $ block_cyclic_2d_inb, mx, nx, imbx, inbx,
392 $ mbx, nbx, rsrcx, csrcx, incx, mpx, nqx,
393 $ iprex, imidx, ipostx, 0, 0, ierr( 2 ) )
395 $ block_cyclic_2d_inb, my, ny, imby, inby,
396 $ mby, nby, rsrcy, csrcy, incy, mpy, nqy,
397 $ iprey, imidy, iposty, 0, 0, ierr( 3 ) )
399 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
400 $ ierr( 3 ).GT.0 )
THEN
408 ipx = ipa + desca( lld_ ) * nqa
409 ipy = ipx + descx( lld_ ) * nqx
413 memreqd = ipy + descy( lld_ ) * nqy - 1
415 IF( memreqd.GT.memsiz )
THEN
417 $
WRITE( nout, fmt = 9986 ) memreqd*cplxsz
423 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
425 IF( ierr( 1 ).GT.0 )
THEN
427 $
WRITE( nout, fmt = 9987 )
437 IF( .NOT.ltest( k ) )
445 IF(
lsame( trans,
'N' ) )
THEN
452 ELSE IF( k.EQ.5 .OR. k.EQ.6 )
THEN
466 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
468 CALL pvdimchk( ictxt, nout, nlx,
'X', ix, jx, descx,
470 CALL pvdimchk( ictxt, nout, nly,
'Y', iy, jy, descy,
473 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
474 $ ierr( 3 ).NE.0 )
THEN
480 IF( k.EQ.2 .OR. k.EQ.7 .OR. k.EQ.8 )
THEN
484 ELSE IF( ( k.EQ.4 ).AND.(
lsame( diag,
'N' ) ) )
THEN
494 CALL pclagen( .false., aform, diagdo, offd, ma, na,
495 $ 1, 1, desca, iaseed, mem( ipa ),
497 CALL pclagen( .false.,
'None',
'No diag', 0, mx, nx,
498 $ 1, 1, descx, ixseed, mem( ipx ),
501 $
CALL pclagen( .false.,
'None',
'No diag', 0, my,
502 $ ny, 1, 1, descy, iyseed, mem( ipy ),
505 IF( ( k.EQ.4 ).AND.( .NOT.(
lsame( diag,
'N' ) ) ).AND.
506 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
507 scale = one /
cmplx( real(
max( nrowa, ncola ) ) )
508 IF(
lsame( uplo,
'L' ) )
THEN
509 CALL pclascal(
'Lower', nrowa-1, ncola-1, scale,
510 $ mem( ipa ), ia+1, ja, desca )
512 CALL pclascal(
'Upper', nrowa-1, ncola-1, scale,
513 $ mem( ipa ), ia, ja+1, desca )
519 CALL blacs_barrier( ictxt,
'All' )
528 CALL pcgemv( trans, m, n, alpha, mem( ipa ), ia, ja,
529 $ desca, mem( ipx ), ix, jx, descx, incx,
530 $ beta, mem( ipy ), iy, jy, descy, incy )
533 ELSE IF( k.EQ.2 )
THEN
538 CALL pchemv( uplo, n, alpha, mem( ipa ), ia, ja,
539 $ desca, mem( ipx ), ix, jx, descx, incx,
540 $ beta, mem( ipy ), iy, jy, descy, incy )
543 ELSE IF( k.EQ.3 )
THEN
548 CALL pctrmv( uplo, trans, diag, n, mem( ipa ), ia, ja,
549 $ desca, mem( ipx ), ix, jx, descx, incx )
552 ELSE IF( k.EQ.4 )
THEN
557 CALL pctrsv( uplo, trans, diag, n, mem( ipa ), ia, ja,
558 $ desca, mem( ipx ), ix, jx, descx, incx )
561 ELSE IF( k.EQ.5 )
THEN
566 CALL pcgeru( m, n, alpha, mem( ipx ), ix, jx, descx,
567 $ incx, mem( ipy ), iy, jy, descy, incy,
568 $ mem( ipa ), ia, ja, desca )
571 ELSE IF( k.EQ.6 )
THEN
576 CALL pcgerc( m, n, alpha, mem( ipx ), ix, jx, descx,
577 $ incx, mem( ipy ), iy, jy, descy, incy,
578 $ mem( ipa ), ia, ja, desca )
581 ELSE IF( k.EQ.7 )
THEN
586 CALL pcher( uplo, n, real( alpha ), mem( ipx ), ix,
587 $ jx, descx, incx, mem( ipa ), ia, ja,
591 ELSE IF( k.EQ.8 )
THEN
596 CALL pcher2( uplo, n, alpha, mem( ipx ), ix, jx,
597 $ descx, incx, mem( ipy ), iy, jy, descy,
598 $ incy, mem( ipa ), ia, ja, desca )
607 $
WRITE( nout, fmt = 9982 ) info
611 CALL pb_combine( ictxt,
'All',
'>',
'W', 1, 1, wtime )
612 CALL pb_combine( ictxt,
'All',
'>',
'C', 1, 1, ctime )
620 nops =
pdopbl2( snames( k ), nrowa, ncola, 0, 0 )
624 IF( wtime( 1 ).GT.0.0d+0 )
THEN
625 wflops = nops / ( wtime( 1 ) * 1.0d+6 )
632 IF( ctime( 1 ).GT.0.0d+0 )
THEN
633 cflops = nops / ( ctime( 1 ) * 1.0d+6 )
638 WRITE( nout, fmt = 9981 ) snames( k ), wtime( 1 ),
639 $ wflops, ctime( 1 ), cflops
645 40
IF( iam.EQ.0 )
THEN
646 WRITE( nout, fmt = 9995 )
647 WRITE( nout, fmt = * )
648 WRITE( nout, fmt = 9985 ) j
653 CALL blacs_gridexit( ictxt )
660 WRITE( nout, fmt = * )
661 WRITE( nout, fmt = 9984 )
662 WRITE( nout, fmt = * )
667 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
668 $
' should be at least 1' )
669 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
670 $
'. It can be at most', i4 )
671 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
672 9996
FORMAT( 2x,
'Test number ', i2 ,
' started on a ', i4,
' x ',
673 $ i4,
' process grid.' )
674 9995
FORMAT( 2x,
' ------------------------------------------------',
675 $
'--------------------------' )
676 9994
FORMAT( 2x,
' M N UPLO TRANS DIAG' )
677 9993
FORMAT( 5x,i6,1x,i6,9x,a1,11x,a1,10x,a1 )
678 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
679 $
' MBA NBA RSRCA CSRCA' )
680 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
682 9990
FORMAT( 2x,
' IX JX MX NX IMBX INBX',
683 $
' MBX NBX RSRCX CSRCX INCX' )
684 9989
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
685 $ 1x,i5,1x,i5,1x,i6 )
686 9988
FORMAT( 2x,
' IY JY MY NY IMBY INBY',
687 $
' MBY NBY RSRCY CSRCY INCY' )
688 9987
FORMAT(
'Not enough memory for this test: going on to',
689 $
' next test case.' )
690 9986
FORMAT(
'Not enough memory. Need: ', i12 )
691 9985
FORMAT( 2x,
'Test number ', i2,
' completed.' )
692 9984
FORMAT( 2x,
'End of Tests.' )
693 9983
FORMAT( 2x,
'Tests started.' )
694 9982
FORMAT( 2x,
' ***** Operation not supported, error code: ',
696 9981
FORMAT( 2x,
'| ', a, 2x, f13.3, 2x, f13.3, 2x, f13.3, 2x, f13.3 )
697 9980
FORMAT( 2x,
' WALL time (s) WALL Mflops ',
698 $
' CPU time (s) CPU Mflops' )
705 SUBROUTINE pcbla2timinfo( SUMMRY, NOUT, NMAT, DIAGVAL, TRANVAL,
706 $ UPLOVAL, MVAL, NVAL, MAVAL, NAVAL,
707 $ IMBAVAL, MBAVAL, INBAVAL, NBAVAL,
708 $ RSCAVAL, CSCAVAL, IAVAL, JAVAL,
709 $ MXVAL, NXVAL, IMBXVAL, MBXVAL,
710 $ INBXVAL, NBXVAL, RSCXVAL, CSCXVAL,
711 $ IXVAL, JXVAL, INCXVAL, MYVAL, NYVAL,
712 $ IMBYVAL, MBYVAL, INBYVAL, NBYVAL,
713 $ RSCYVAL, CSCYVAL, IYVAL, JYVAL,
714 $ INCYVAL, LDVAL, NGRIDS, PVAL, LDPVAL,
715 $ QVAL, LDQVAL, NBLOG, LTEST, IAM, NPROCS,
716 $ ALPHA, BETA, WORK )
724 INTEGER IAM, LDPVAL, LDQVAL, LDVAL, NBLOG, NGRIDS,
729 CHARACTER*( * ) SUMMRY
730 CHARACTER*1 DIAGVAL( LDVAL ), TRANVAL( LDVAL ),
733 INTEGER CSCAVAL( LDVAL ), CSCXVAL( LDVAL ),
734 $ CSCYVAL( LDVAL ), IAVAL( LDVAL ),
735 $ imbaval( ldval ), imbxval( ldval ),
736 $ imbyval( ldval ), inbaval( ldval ),
737 $ inbxval( ldval ), inbyval( ldval ),
738 $ incxval( ldval ), incyval( ldval ),
739 $ ixval( ldval ), iyval( ldval ), javal( ldval ),
740 $ jxval( ldval ), jyval( ldval ), maval( ldval ),
741 $ mbaval( ldval ), mbxval( ldval ),
742 $ mbyval( ldval ), mval( ldval ), mxval( ldval ),
743 $ myval( ldval ), naval( ldval ),
744 $ nbaval( ldval ), nbxval( ldval ),
745 $ nbyval( ldval ), nval( ldval ), nxval( ldval ),
746 $ nyval( ldval ), pval( ldpval ), qval( ldqval ),
747 $ rscaval( ldval ), rscxval( ldval ),
748 $ rscyval( ldval ), work( * )
1015 PARAMETER ( NIN = 11, nsubs = 8 )
1023 CHARACTER*79 USRINFO
1026 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1027 $ blacs_gridinit, blacs_setup, cgebr2d, cgebs2d,
1028 $
icopy, igebr2d, igebs2d, sgebr2d, sgebs2d
1031 INTRINSIC char, ichar,
max,
min
1034 CHARACTER*7 SNAMES( NSUBS )
1035 COMMON /SNAMEC/SNAMES
1046 OPEN( nin, file=
'PCBLAS2TIM.dat', status=
'OLD' )
1047 READ( nin, fmt = * ) summry
1052 READ( nin, fmt = 9999 ) usrinfo
1056 READ( nin, fmt = * ) summry
1057 READ( nin, fmt = * ) nout
1058 IF( nout.NE.0 .AND. nout.NE.6 )
1059 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1065 READ( nin, fmt = * ) nblog
1071 READ( nin, fmt = * ) ngrids
1072 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1073 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1075 ELSE IF( ngrids.GT.ldqval )
THEN
1076 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1082 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1083 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1087 READ( nin, fmt = * ) alpha
1088 READ( nin, fmt = * ) beta
1092 READ( nin, fmt = * ) nmat
1093 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1094 WRITE( nout, fmt = 9998 )
'Tests', ldval
1100 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1101 READ( nin, fmt = * ) ( tranval( i ), i = 1, nmat )
1102 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1103 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1104 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1105 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1106 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1107 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1108 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1109 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1110 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1111 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1112 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1113 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1114 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1115 READ( nin, fmt = * ) ( mxval( i ), i = 1, nmat )
1116 READ( nin, fmt = * ) ( nxval( i ), i = 1, nmat )
1117 READ( nin, fmt = * ) ( imbxval( i ), i = 1, nmat )
1118 READ( nin, fmt = * ) ( inbxval( i ), i = 1, nmat )
1119 READ( nin, fmt = * ) ( mbxval( i ), i = 1, nmat )
1120 READ( nin, fmt = * ) ( nbxval( i ), i = 1, nmat )
1121 READ( nin, fmt = * ) ( rscxval( i ), i = 1, nmat )
1122 READ( nin, fmt = * ) ( cscxval( i ), i = 1, nmat )
1123 READ( nin, fmt = * ) ( ixval( i ), i = 1, nmat )
1124 READ( nin, fmt = * ) ( jxval( i ), i = 1, nmat )
1125 READ( nin, fmt = * ) ( incxval( i ), i = 1, nmat )
1126 READ( nin, fmt = * ) ( myval( i ), i = 1, nmat )
1127 READ( nin, fmt = * ) ( nyval( i ), i = 1, nmat )
1128 READ( nin, fmt = * ) ( imbyval( i ), i = 1, nmat )
1129 READ( nin, fmt = * ) ( inbyval( i ), i = 1, nmat )
1130 READ( nin, fmt = * ) ( mbyval( i ), i = 1, nmat )
1131 READ( nin, fmt = * ) ( nbyval( i ), i = 1, nmat )
1132 READ( nin, fmt = * ) ( rscyval( i ), i = 1, nmat )
1133 READ( nin, fmt = * ) ( cscyval( i ), i = 1, nmat )
1134 READ( nin, fmt = * ) ( iyval( i ), i = 1, nmat )
1135 READ( nin, fmt = * ) ( jyval( i ), i = 1, nmat )
1136 READ( nin, fmt = * ) ( incyval( i ), i = 1, nmat )
1142 ltest( i ) = .false.
1145 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1147 IF( snamet.EQ.snames( i ) )
1151 WRITE( nout, fmt = 9995 )snamet
1167 IF( nprocs.LT.1 )
THEN
1170 nprocs =
max( nprocs, pval( i )*qval( i ) )
1172 CALL blacs_setup( iam, nprocs )
1178 CALL blacs_get( -1, 0, ictxt )
1179 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1183 CALL cgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1184 CALL cgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1189 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1193 work( i ) = ichar( diagval( j ) )
1194 work( i+1 ) = ichar( tranval( j ) )
1195 work( i+2 ) = ichar( uploval( j ) )
1198 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1200 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1202 CALL icopy( nmat, mval, 1, work( i ), 1 )
1204 CALL icopy( nmat, nval, 1, work( i ), 1 )
1206 CALL icopy( nmat, maval, 1, work( i ), 1 )
1208 CALL icopy( nmat, naval, 1, work( i ), 1 )
1210 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1212 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1214 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
1216 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
1218 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
1220 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
1222 CALL icopy( nmat, iaval, 1, work( i ), 1 )
1224 CALL icopy( nmat, javal, 1, work( i ), 1 )
1226 CALL icopy( nmat, mxval, 1, work( i ), 1 )
1228 CALL icopy( nmat, nxval, 1, work( i ), 1 )
1230 CALL icopy( nmat, imbxval, 1, work( i ), 1 )
1232 CALL icopy( nmat, inbxval, 1, work( i ), 1 )
1234 CALL icopy( nmat, mbxval, 1, work( i ), 1 )
1236 CALL icopy( nmat, nbxval, 1, work( i ), 1 )
1238 CALL icopy( nmat, rscxval, 1, work( i ), 1 )
1240 CALL icopy( nmat, cscxval, 1, work( i ), 1 )
1242 CALL icopy( nmat, ixval, 1, work( i ), 1 )
1244 CALL icopy( nmat, jxval, 1, work( i ), 1 )
1246 CALL icopy( nmat, incxval, 1, work( i ), 1 )
1248 CALL icopy( nmat, myval, 1, work( i ), 1 )
1250 CALL icopy( nmat, nyval, 1, work( i ), 1 )
1252 CALL icopy( nmat, imbyval, 1, work( i ), 1 )
1254 CALL icopy( nmat, inbyval, 1, work( i ), 1 )
1256 CALL icopy( nmat, mbyval, 1, work( i ), 1 )
1258 CALL icopy( nmat, nbyval, 1, work( i ), 1 )
1260 CALL icopy( nmat, rscyval, 1, work( i ), 1 )
1262 CALL icopy( nmat, cscyval, 1, work( i ), 1 )
1264 CALL icopy( nmat, iyval, 1, work( i ), 1 )
1266 CALL icopy( nmat, jyval, 1, work( i ), 1 )
1268 CALL icopy( nmat, incyval, 1, work( i ), 1 )
1272 IF( ltest( j ) )
THEN
1280 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1284 WRITE( nout, fmt = 9999 )
1285 $
'Level 2 PBLAS timing program.'
1286 WRITE( nout, fmt = 9999 ) usrinfo
1287 WRITE( nout, fmt = * )
1288 WRITE( nout, fmt = 9999 )
1289 $
'Tests of the complex single precision '//
1291 WRITE( nout, fmt = * )
1292 WRITE( nout, fmt = 9992 ) nmat
1293 WRITE( nout, fmt = 9986 ) nblog
1294 WRITE( nout, fmt = 9991 ) ngrids
1295 WRITE( nout, fmt = 9989 )
1296 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1298 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 6,
1299 $
min( 10, ngrids ) )
1301 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 11,
1302 $
min( 15, ngrids ) )
1304 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 16, ngrids )
1305 WRITE( nout, fmt = 9989 )
1306 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1308 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 6,
1309 $
min( 10, ngrids ) )
1311 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 11,
1312 $
min( 15, ngrids ) )
1314 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 16, ngrids )
1315 WRITE( nout, fmt = 9994 ) alpha
1316 WRITE( nout, fmt = 9993 ) beta
1317 IF( ltest( 1 ) )
THEN
1318 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... Yes'
1320 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... No '
1323 IF( ltest( i ) )
THEN
1324 WRITE( nout, fmt = 9987 ) snames( i ),
' ... Yes'
1326 WRITE( nout, fmt = 9987 ) snames( i ),
' ... No '
1329 WRITE( nout, fmt = * )
1336 $
CALL blacs_setup( iam, nprocs )
1341 CALL blacs_get( -1, 0, ictxt )
1342 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1344 CALL cgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
1345 CALL cgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
1347 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
1352 i = 2*ngrids + 37*nmat + nsubs
1353 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
1357 diagval( j ) = char( work( i ) )
1358 tranval( j ) = char( work( i+1 ) )
1359 uploval( j ) = char( work( i+2 ) )
1362 CALL icopy( ngrids, work( i ), 1, pval, 1 )
1364 CALL icopy( ngrids, work( i ), 1, qval, 1 )
1366 CALL icopy( nmat, work( i ), 1, mval, 1 )
1368 CALL icopy( nmat, work( i ), 1, nval, 1 )
1370 CALL icopy( nmat, work( i ), 1, maval, 1 )
1372 CALL icopy( nmat, work( i ), 1, naval, 1 )
1374 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
1376 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
1378 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
1380 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
1382 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
1384 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
1386 CALL icopy( nmat, work( i ), 1, iaval, 1 )
1388 CALL icopy( nmat, work( i ), 1, javal, 1 )
1390 CALL icopy( nmat, work( i ), 1, mxval, 1 )
1392 CALL icopy( nmat, work( i ), 1, nxval, 1 )
1394 CALL icopy( nmat, work( i ), 1, imbxval, 1 )
1396 CALL icopy( nmat, work( i ), 1, inbxval, 1 )
1398 CALL icopy( nmat, work( i ), 1, mbxval, 1 )
1400 CALL icopy( nmat, work( i ), 1, nbxval, 1 )
1402 CALL icopy( nmat, work( i ), 1, rscxval, 1 )
1404 CALL icopy( nmat, work( i ), 1, cscxval, 1 )
1406 CALL icopy( nmat, work( i ), 1, ixval, 1 )
1408 CALL icopy( nmat, work( i ), 1, jxval, 1 )
1410 CALL icopy( nmat, work( i ), 1, incxval, 1 )
1412 CALL icopy( nmat, work( i ), 1, myval, 1 )
1414 CALL icopy( nmat, work( i ), 1, nyval, 1 )
1416 CALL icopy( nmat, work( i ), 1, imbyval, 1 )
1418 CALL icopy( nmat, work( i ), 1, inbyval, 1 )
1420 CALL icopy( nmat, work( i ), 1, mbyval, 1 )
1422 CALL icopy( nmat, work( i ), 1, nbyval, 1 )
1424 CALL icopy( nmat, work( i ), 1, rscyval, 1 )
1426 CALL icopy( nmat, work( i ), 1, cscyval, 1 )
1428 CALL icopy( nmat, work( i ), 1, iyval, 1 )
1430 CALL icopy( nmat, work( i ), 1, jyval, 1 )
1432 CALL icopy( nmat, work( i ), 1, incyval, 1 )
1436 IF( work( i ).EQ.1 )
THEN
1439 ltest( j ) = .false.
1446 CALL blacs_gridexit( ictxt )
1450 120
WRITE( nout, fmt = 9997 )
1452 IF( nout.NE.6 .AND. nout.NE.0 )
1454 CALL blacs_abort( ictxt, 1 )
1459 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
1461 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
1462 9996
FORMAT( a7, l2 )
1463 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
1464 $ /
' ******* TESTS ABANDONED *******' )
1465 9994
FORMAT( 2x,
'Alpha : (', g16.6,
1467 9993
FORMAT( 2x,
'Beta : (', g16.6,
1469 9992
FORMAT( 2x,
'Number of Tests : ', i6 )
1470 9991
FORMAT( 2x,
'Number of process grids : ', i6 )
1471 9990
FORMAT( 2x,
' : ', 5i6 )
1472 9989
FORMAT( 2x, a1,
' : ', 5i6 )
1473 9988
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
1474 9987
FORMAT( 2x,
' ', a, a8 )
1475 9986
FORMAT( 2x,
'Logical block size : ', i6 )