4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PSGEMV ',
'PSSYMV ',
'PSTRMV ',
7 $
'PSTRSV ',
'PSGER ',
'PSSYR ',
114 INTEGER maxtests, maxgrids, realsz, totmem, memsiz,
117 parameter( maxtests = 20, maxgrids = 20, realsz = 4,
118 $ one = 1.0e+0, totmem = 2000000, nsubs = 7,
119 $ memsiz = totmem / realsz )
120 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
121 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
123 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
124 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
125 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
126 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
129 CHARACTER*1 aform, diag, diagdo, trans, uplo
130 INTEGER csrca, csrcx, csrcy, i, ia, iam, iaseed, ictxt,
131 $ imba, imbx, imby, imida, imidx, imidy, inba,
132 $ inbx, inby, incx, incy, ipa, iposta, ipostx,
133 $ iposty, iprea, iprex, iprey, ipx, ipy, ix,
134 $ ixseed, iy, iyseed, j, ja, jx, jy, k, m, ma,
135 $ mba, mbx, mby, memreqd, mpa, mpx, mpy, mx, my,
136 $ mycol, myrow, n, na, nba, nbx, nby, ncola,
137 $ ngrids, nlx, nly, nout, npcol, nprocs, nprow,
138 $ nqa, nqx, nqy, nrowa, ntests, nx, ny, offd,
139 $ rsrca, rsrcx, rsrcy
140 REAL alpha, beta, scale
141 DOUBLE PRECISION cflops, nops, wflops
144 LOGICAL ltest( nsubs ), ycheck( nsubs )
145 CHARACTER*1 diagval( maxtests ), tranval( maxtests ),
146 $ uploval( maxtests )
148 INTEGER cscaval( maxtests ), cscxval( maxtests ),
149 $ cscyval( maxtests ), desca( dlen_ ),
150 $ descx( dlen_ ), descy( dlen_ ),
151 $ iaval( maxtests ), ierr( 3 ),
152 $ imbaval( maxtests ), imbxval( maxtests ),
153 $ imbyval( maxtests ), inbaval( maxtests ),
154 $ inbxval( maxtests ), inbyval( maxtests ),
155 $ incxval( maxtests ), incyval( maxtests ),
156 $ ixval( maxtests ), iyval( maxtests ),
157 $ javal( maxtests ), jxval( maxtests ),
158 $ jyval( maxtests ), maval( maxtests ),
159 $ mbaval( maxtests ), mbxval( maxtests ),
160 $ mbyval( maxtests ), mval( maxtests ),
161 $ mxval( maxtests ), myval( maxtests ),
162 $ naval( maxtests ), nbaval( maxtests ),
163 $ nbxval( maxtests ), nbyval( maxtests ),
164 $ nval( maxtests ), nxval( maxtests ),
165 $ nyval( maxtests ), pval( maxtests ),
166 $ qval( maxtests ), rscaval( maxtests ),
167 $ rscxval( maxtests ), rscyval( maxtests )
169 DOUBLE PRECISION ctime( 1 ), wtime( 1 )
172 EXTERNAL blacs_barrier, blacs_exit, blacs_get,
173 $ blacs_gridexit, blacs_gridinfo, blacs_gridinit,
177 $ pssyr, pssyr2, pstrmv, pstrsv,
pvdescchk,
186 INTRINSIC dble,
max, real
189 CHARACTER*7 snames( nsubs )
192 COMMON /snamec/snames
193 COMMON /infoc/info, nblog
194 COMMON /pberrorc/nout, abrtflg
197 DATA ycheck/.true., .true., .false., .false.,
198 $ .true., .false., .true./
217 CALL blacs_pinfo( iam, nprocs )
219 $ uploval, mval, nval, maval, naval, imbaval,
220 $ mbaval, inbaval, nbaval, rscaval, cscaval,
221 $ iaval, javal, mxval, nxval, imbxval, mbxval,
222 $ inbxval, nbxval, rscxval, cscxval, ixval,
223 $ jxval, incxval, myval, nyval, imbyval,
224 $ mbyval, inbyval, nbyval, rscyval,
225 $ cscyval, iyval, jyval, incyval, maxtests,
226 $ ngrids, pval, maxgrids, qval, maxgrids,
227 $ nblog, ltest, iam, nprocs, alpha, beta, mem )
230 $
WRITE( nout, fmt = 9983 )
242 IF( nprow.LT.1 )
THEN
244 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
246 ELSE IF( npcol.LT.1 )
THEN
248 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
250 ELSE IF( nprow*npcol.GT.nprocs )
THEN
252 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
256 IF( ierr( 1 ).GT.0 )
THEN
258 $
WRITE( nout, fmt = 9997 )
'GRID'
264 CALL blacs_get( -1, 0, ictxt )
265 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
266 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
271 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
324 WRITE( nout, fmt = * )
325 WRITE( nout, fmt = 9996 ) j, nprow, npcol
326 WRITE( nout, fmt = * )
328 WRITE( nout, fmt = 9995 )
329 WRITE( nout, fmt = 9994 )
330 WRITE( nout, fmt = 9995 )
331 WRITE( nout, fmt = 9993 ) m, n, uplo, trans, diag
333 WRITE( nout, fmt = 9995 )
334 WRITE( nout, fmt = 9992 )
335 WRITE( nout, fmt = 9995 )
336 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
337 $ mba, nba, rsrca, csrca
339 WRITE( nout, fmt = 9995 )
340 WRITE( nout, fmt = 9990 )
341 WRITE( nout, fmt = 9995 )
342 WRITE( nout, fmt = 9989 ) ix, jx, mx, nx, imbx, inbx,
343 $ mbx, nbx, rsrcx, csrcx, incx
345 WRITE( nout, fmt = 9995 )
346 WRITE( nout, fmt = 9988 )
347 WRITE( nout, fmt = 9995 )
348 WRITE( nout, fmt = 9989 ) iy, jy, my, ny, imby, inby,
349 $ mby, nby, rsrcy, csrcy, incy
351 WRITE( nout, fmt = 9995 )
352 WRITE( nout, fmt = 9980 )
358 IF( .NOT.lsame( uplo,
'U' ).AND.
359 $ .NOT.lsame( uplo,
'L' ) )
THEN
361 $
WRITE( nout, fmt = 9997 )
'UPLO'
365 IF( .NOT.lsame( trans,
'N' ).AND.
366 $ .NOT.lsame( trans,
'T' ).AND.
367 $ .NOT.lsame( trans,
'C' ) )
THEN
369 $
WRITE( nout, fmt = 9997 )
'TRANS'
373 IF( .NOT.lsame( diag ,
'U' ).AND.
374 $ .NOT.lsame( diag ,
'N' ) )
THEN
376 $
WRITE( nout, fmt = 9997 ) trans
377 WRITE( nout, fmt = 9997 )
'DIAG'
384 $ block_cyclic_2d_inb, ma, na, imba, inba,
385 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
386 $ imida, iposta, 0, 0, ierr( 1 ) )
388 $ block_cyclic_2d_inb, mx, nx, imbx, inbx,
389 $ mbx, nbx, rsrcx, csrcx, incx, mpx, nqx,
390 $ iprex, imidx, ipostx, 0, 0, ierr( 2 ) )
392 $ block_cyclic_2d_inb, my, ny, imby, inby,
393 $ mby, nby, rsrcy, csrcy, incy, mpy, nqy,
394 $ iprey, imidy, iposty, 0, 0, ierr( 3 ) )
396 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
397 $ ierr( 3 ).GT.0 )
THEN
405 ipx = ipa + desca( lld_ ) * nqa
406 ipy = ipx + descx( lld_ ) * nqx
410 memreqd = ipy + descy( lld_ ) * nqy - 1
412 IF( memreqd.GT.memsiz )
THEN
414 $
WRITE( nout, fmt = 9986 ) memreqd*realsz
420 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
422 IF( ierr( 1 ).GT.0 )
THEN
424 $
WRITE( nout, fmt = 9987 )
434 IF( .NOT.ltest( k ) )
442 IF( lsame( trans,
'N' ) )
THEN
449 ELSE IF( k.EQ.5 )
THEN
463 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
465 CALL pvdimchk( ictxt, nout, nlx,
'X', ix, jx, descx,
467 CALL pvdimchk( ictxt, nout, nly,
'Y', iy, jy, descy,
470 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
471 $ ierr( 3 ).NE.0 )
THEN
477 IF( k.EQ.2 .OR. k.EQ.6 .OR. k.EQ.7 )
THEN
481 ELSE IF( ( k.EQ.4 ).AND.( lsame( diag,
'N' ) ) )
THEN
491 CALL pslagen( .false., aform, diagdo, offd, ma, na,
492 $ 1, 1, desca, iaseed, mem( ipa ),
494 CALL pslagen( .false.,
'None',
'No diag', 0, mx, nx,
495 $ 1, 1, descx, ixseed, mem( ipx ),
498 $
CALL pslagen( .false.,
'None',
'No diag', 0, my,
499 $ ny, 1, 1, descy, iyseed, mem( ipy ),
502 IF( ( k.EQ.4 ).AND.( .NOT.( lsame( diag,
'N' ) ) ).AND.
503 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
504 scale = one / real(
max( nrowa, ncola ) )
505 IF( lsame( uplo,
'L' ) )
THEN
506 CALL pslascal(
'Lower', nrowa-1, ncola-1, scale,
507 $ mem( ipa ), ia+1, ja, desca )
509 CALL pslascal(
'Upper', nrowa-1, ncola-1, scale,
510 $ mem( ipa ), ia, ja+1, desca )
516 CALL blacs_barrier( ictxt,
'All' )
525 CALL psgemv( trans, m, n, alpha, mem( ipa ), ia, ja,
526 $ desca, mem( ipx ), ix, jx, descx, incx,
527 $ beta, mem( ipy ), iy, jy, descy, incy )
530 ELSE IF( k.EQ.2 )
THEN
535 CALL pssymv( uplo, n, alpha, mem( ipa ), ia, ja,
536 $ desca, mem( ipx ), ix, jx, descx, incx,
537 $ beta, mem( ipy ), iy, jy, descy, incy )
540 ELSE IF( k.EQ.3 )
THEN
545 CALL pstrmv( uplo, trans, diag, n, mem( ipa ), ia, ja,
546 $ desca, mem( ipx ), ix, jx, descx, incx )
549 ELSE IF( k.EQ.4 )
THEN
554 CALL pstrsv( uplo, trans, diag, n, mem( ipa ), ia, ja,
555 $ desca, mem( ipx ), ix, jx, descx, incx )
558 ELSE IF( k.EQ.5 )
THEN
563 CALL psger( m, n, alpha, mem( ipx ), ix, jx, descx,
564 $ incx, mem( ipy ), iy, jy, descy, incy,
565 $ mem( ipa ), ia, ja, desca )
568 ELSE IF( k.EQ.6 )
THEN
573 CALL pssyr( uplo, n, alpha, mem( ipx ), ix, jx, descx,
574 $ incx, mem( ipa ), ia, ja, desca )
577 ELSE IF( k.EQ.7 )
THEN
582 CALL pssyr2( uplo, n, alpha, mem( ipx ), ix, jx,
583 $ descx, incx, mem( ipy ), iy, jy, descy,
584 $ incy, mem( ipa ), ia, ja, desca )
593 $
WRITE( nout, fmt = 9982 ) info
597 CALL pb_combine( ictxt,
'All',
'>',
'W', 1, 1, wtime )
598 CALL pb_combine( ictxt,
'All',
'>',
'C', 1, 1, ctime )
606 nops =
pdopbl2( snames( k ), nrowa, ncola, 0, 0 )
610 IF( wtime( 1 ).GT.0.0d+0 )
THEN
611 wflops = nops / ( wtime( 1 ) * 1.0d+6 )
618 IF( ctime( 1 ).GT.0.0d+0 )
THEN
619 cflops = nops / ( ctime( 1 ) * 1.0d+6 )
624 WRITE( nout, fmt = 9981 ) snames( k ), wtime( 1 ),
625 $ wflops, ctime( 1 ), cflops
631 40
IF( iam.EQ.0 )
THEN
632 WRITE( nout, fmt = 9995 )
633 WRITE( nout, fmt = * )
634 WRITE( nout, fmt = 9985 ) j
639 CALL blacs_gridexit( ictxt )
646 WRITE( nout, fmt = * )
647 WRITE( nout, fmt = 9984 )
648 WRITE( nout, fmt = * )
653 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
654 $
' should be at least 1' )
655 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
656 $
'. It can be at most', i4 )
657 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
658 9996
FORMAT( 2x,
'Test number ', i2 ,
' started on a ', i4,
' x ',
659 $ i4,
' process grid.' )
660 9995
FORMAT( 2x,
' ------------------------------------------------',
661 $
'--------------------------' )
662 9994
FORMAT( 2x,
' M N UPLO TRANS DIAG' )
663 9993
FORMAT( 5x,i6,1x,i6,9x,a1,11x,a1,10x,a1 )
664 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
665 $
' MBA NBA RSRCA CSRCA' )
666 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
668 9990
FORMAT( 2x,
' IX JX MX NX IMBX INBX',
669 $
' MBX NBX RSRCX CSRCX INCX' )
670 9989
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
671 $ 1x,i5,1x,i5,1x,i6 )
672 9988
FORMAT( 2x,
' IY JY MY NY IMBY INBY',
673 $
' MBY NBY RSRCY CSRCY INCY' )
674 9987
FORMAT(
'Not enough memory for this test: going on to',
675 $
' next test case.' )
676 9986
FORMAT(
'Not enough memory. Need: ', i12 )
677 9985
FORMAT( 2x,
'Test number ', i2,
' completed.' )
678 9984
FORMAT( 2x,
'End of Tests.' )
679 9983
FORMAT( 2x,
'Tests started.' )
680 9982
FORMAT( 2x,
' ***** Operation not supported, error code: ',
682 9981
FORMAT( 2x,
'| ', a, 2x, f13.3, 2x, f13.3, 2x, f13.3, 2x, f13.3 )
683 9980
FORMAT( 2x,
' WALL time (s) WALL Mflops ',
684 $
' CPU time (s) CPU Mflops' )
691 SUBROUTINE psbla2timinfo( SUMMRY, NOUT, NMAT, DIAGVAL, TRANVAL,
692 $ UPLOVAL, MVAL, NVAL, MAVAL, NAVAL,
693 $ IMBAVAL, MBAVAL, INBAVAL, NBAVAL,
694 $ RSCAVAL, CSCAVAL, IAVAL, JAVAL,
695 $ MXVAL, NXVAL, IMBXVAL, MBXVAL,
696 $ INBXVAL, NBXVAL, RSCXVAL, CSCXVAL,
697 $ IXVAL, JXVAL, INCXVAL, MYVAL, NYVAL,
698 $ IMBYVAL, MBYVAL, INBYVAL, NBYVAL,
699 $ RSCYVAL, CSCYVAL, IYVAL, JYVAL,
700 $ INCYVAL, LDVAL, NGRIDS, PVAL, LDPVAL,
701 $ QVAL, LDQVAL, NBLOG, LTEST, IAM, NPROCS,
702 $ ALPHA, BETA, WORK )
710 INTEGER IAM, LDPVAL, LDQVAL, LDVAL, NBLOG, NGRIDS,
715 CHARACTER*( * ) SUMMRY
716 CHARACTER*1 DIAGVAL( LDVAL ), TRANVAL( LDVAL ),
719 INTEGER CSCAVAL( LDVAL ), CSCXVAL( LDVAL ),
720 $ CSCYVAL( LDVAL ), IAVAL( LDVAL ),
721 $ imbaval( ldval ), imbxval( ldval ),
722 $ imbyval( ldval ), inbaval( ldval ),
723 $ inbxval( ldval ), inbyval( ldval ),
724 $ incxval( ldval ), incyval( ldval ),
725 $ ixval( ldval ), iyval( ldval ), javal( ldval ),
726 $ jxval( ldval ), jyval( ldval ), maval( ldval ),
727 $ mbaval( ldval ), mbxval( ldval ),
728 $ mbyval( ldval ), mval( ldval ), mxval( ldval ),
729 $ myval( ldval ), naval( ldval ),
730 $ nbaval( ldval ), nbxval( ldval ),
731 $ nbyval( ldval ), nval( ldval ), nxval( ldval ),
732 $ nyval( ldval ), pval( ldpval ), qval( ldqval ),
733 $ rscaval( ldval ), rscxval( ldval ),
734 $ rscyval( ldval ), work( * )
1001 PARAMETER ( NIN = 11, nsubs = 7 )
1009 CHARACTER*79 USRINFO
1012 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1013 $ blacs_gridinit, blacs_setup,
icopy, igebr2d,
1014 $ igebs2d, sgebr2d, sgebs2d
1017 INTRINSIC char, ichar,
max,
min
1020 CHARACTER*7 SNAMES( NSUBS )
1021 COMMON /SNAMEC/SNAMES
1032 OPEN( nin, file=
'PSBLAS2TIM.dat', status=
'OLD' )
1033 READ( nin, fmt = * ) summry
1038 READ( nin, fmt = 9999 ) usrinfo
1042 READ( nin, fmt = * ) summry
1043 READ( nin, fmt = * ) nout
1044 IF( nout.NE.0 .AND. nout.NE.6 )
1045 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1051 READ( nin, fmt = * ) nblog
1057 READ( nin, fmt = * ) ngrids
1058 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1059 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1061 ELSE IF( ngrids.GT.ldqval )
THEN
1062 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1068 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1069 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1073 READ( nin, fmt = * ) alpha
1074 READ( nin, fmt = * ) beta
1078 READ( nin, fmt = * ) nmat
1079 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1080 WRITE( nout, fmt = 9998 )
'Tests', ldval
1086 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1087 READ( nin, fmt = * ) ( tranval( i ), i = 1, nmat )
1088 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1089 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1090 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1091 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1092 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1093 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1094 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1095 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1096 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1097 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1098 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1099 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1100 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1101 READ( nin, fmt = * ) ( mxval( i ), i = 1, nmat )
1102 READ( nin, fmt = * ) ( nxval( i ), i = 1, nmat )
1103 READ( nin, fmt = * ) ( imbxval( i ), i = 1, nmat )
1104 READ( nin, fmt = * ) ( inbxval( i ), i = 1, nmat )
1105 READ( nin, fmt = * ) ( mbxval( i ), i = 1, nmat )
1106 READ( nin, fmt = * ) ( nbxval( i ), i = 1, nmat )
1107 READ( nin, fmt = * ) ( rscxval( i ), i = 1, nmat )
1108 READ( nin, fmt = * ) ( cscxval( i ), i = 1, nmat )
1109 READ( nin, fmt = * ) ( ixval( i ), i = 1, nmat )
1110 READ( nin, fmt = * ) ( jxval( i ), i = 1, nmat )
1111 READ( nin, fmt = * ) ( incxval( i ), i = 1, nmat )
1112 READ( nin, fmt = * ) ( myval( i ), i = 1, nmat )
1113 READ( nin, fmt = * ) ( nyval( i ), i = 1, nmat )
1114 READ( nin, fmt = * ) ( imbyval( i ), i = 1, nmat )
1115 READ( nin, fmt = * ) ( inbyval( i ), i = 1, nmat )
1116 READ( nin, fmt = * ) ( mbyval( i ), i = 1, nmat )
1117 READ( nin, fmt = * ) ( nbyval( i ), i = 1, nmat )
1118 READ( nin, fmt = * ) ( rscyval( i ), i = 1, nmat )
1119 READ( nin, fmt = * ) ( cscyval( i ), i = 1, nmat )
1120 READ( nin, fmt = * ) ( iyval( i ), i = 1, nmat )
1121 READ( nin, fmt = * ) ( jyval( i ), i = 1, nmat )
1122 READ( nin, fmt = * ) ( incyval( i ), i = 1, nmat )
1128 ltest( i ) = .false.
1131 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1133 IF( snamet.EQ.snames( i ) )
1137 WRITE( nout, fmt = 9995 )snamet
1153 IF( nprocs.LT.1 )
THEN
1156 nprocs =
max( nprocs, pval( i )*qval( i ) )
1158 CALL blacs_setup( iam, nprocs )
1164 CALL blacs_get( -1, 0, ictxt )
1165 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1169 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1170 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1175 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1179 work( i ) = ichar( diagval( j ) )
1180 work( i+1 ) = ichar( tranval( j ) )
1181 work( i+2 ) = ichar( uploval( j ) )
1184 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1186 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1188 CALL icopy( nmat, mval, 1, work( i ), 1 )
1190 CALL icopy( nmat, nval, 1, work( i ), 1 )
1192 CALL icopy( nmat, maval, 1, work( i ), 1 )
1194 CALL icopy( nmat, naval, 1, work( i ), 1 )
1196 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1198 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1200 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
1202 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
1204 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
1206 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
1208 CALL icopy( nmat, iaval, 1, work( i ), 1 )
1210 CALL icopy( nmat, javal, 1, work( i ), 1 )
1212 CALL icopy( nmat, mxval, 1, work( i ), 1 )
1214 CALL icopy( nmat, nxval, 1, work( i ), 1 )
1216 CALL icopy( nmat, imbxval, 1, work( i ), 1 )
1218 CALL icopy( nmat, inbxval, 1, work( i ), 1 )
1220 CALL icopy( nmat, mbxval, 1, work( i ), 1 )
1222 CALL icopy( nmat, nbxval, 1, work( i ), 1 )
1224 CALL icopy( nmat, rscxval, 1, work( i ), 1 )
1226 CALL icopy( nmat, cscxval, 1, work( i ), 1 )
1228 CALL icopy( nmat, ixval, 1, work( i ), 1 )
1230 CALL icopy( nmat, jxval, 1, work( i ), 1 )
1232 CALL icopy( nmat, incxval, 1, work( i ), 1 )
1234 CALL icopy( nmat, myval, 1, work( i ), 1 )
1236 CALL icopy( nmat, nyval, 1, work( i ), 1 )
1238 CALL icopy( nmat, imbyval, 1, work( i ), 1 )
1240 CALL icopy( nmat, inbyval, 1, work( i ), 1 )
1242 CALL icopy( nmat, mbyval, 1, work( i ), 1 )
1244 CALL icopy( nmat, nbyval, 1, work( i ), 1 )
1246 CALL icopy( nmat, rscyval, 1, work( i ), 1 )
1248 CALL icopy( nmat, cscyval, 1, work( i ), 1 )
1250 CALL icopy( nmat, iyval, 1, work( i ), 1 )
1252 CALL icopy( nmat, jyval, 1, work( i ), 1 )
1254 CALL icopy( nmat, incyval, 1, work( i ), 1 )
1258 IF( ltest( j ) )
THEN
1266 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1270 WRITE( nout, fmt = 9999 )
1271 $
'Level 2 PBLAS timing program.'
1272 WRITE( nout, fmt = 9999 ) usrinfo
1273 WRITE( nout, fmt = * )
1274 WRITE( nout, fmt = 9999 )
1275 $
'Tests of the real single precision '//
1277 WRITE( nout, fmt = * )
1278 WRITE( nout, fmt = 9992 ) nmat
1279 WRITE( nout, fmt = 9986 ) nblog
1280 WRITE( nout, fmt = 9991 ) ngrids
1281 WRITE( nout, fmt = 9989 )
1282 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1284 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 6,
1285 $
min( 10, ngrids ) )
1287 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 11,
1288 $
min( 15, ngrids ) )
1290 $
WRITE( nout, fmt = 9990 ) ( pval(i), i = 16, ngrids )
1291 WRITE( nout, fmt = 9989 )
1292 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1294 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 6,
1295 $
min( 10, ngrids ) )
1297 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 11,
1298 $
min( 15, ngrids ) )
1300 $
WRITE( nout, fmt = 9990 ) ( qval(i), i = 16, ngrids )
1301 WRITE( nout, fmt = 9994 ) alpha
1302 WRITE( nout, fmt = 9993 ) beta
1303 IF( ltest( 1 ) )
THEN
1304 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... Yes'
1306 WRITE( nout, fmt = 9988 ) snames( 1 ),
' ... No '
1309 IF( ltest( i ) )
THEN
1310 WRITE( nout, fmt = 9987 ) snames( i ),
' ... Yes'
1312 WRITE( nout, fmt = 9987 ) snames( i ),
' ... No '
1315 WRITE( nout, fmt = * )
1322 $
CALL blacs_setup( iam, nprocs )
1327 CALL blacs_get( -1, 0, ictxt )
1328 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1330 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
1331 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
1333 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
1338 i = 2*ngrids + 37*nmat + nsubs
1339 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
1343 diagval( j ) = char( work( i ) )
1344 tranval( j ) = char( work( i+1 ) )
1345 uploval( j ) = char( work( i+2 ) )
1348 CALL icopy( ngrids, work( i ), 1, pval, 1 )
1350 CALL icopy( ngrids, work( i ), 1, qval, 1 )
1352 CALL icopy( nmat, work( i ), 1, mval, 1 )
1354 CALL icopy( nmat, work( i ), 1, nval, 1 )
1356 CALL icopy( nmat, work( i ), 1, maval, 1 )
1358 CALL icopy( nmat, work( i ), 1, naval, 1 )
1360 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
1362 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
1364 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
1366 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
1368 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
1370 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
1372 CALL icopy( nmat, work( i ), 1, iaval, 1 )
1374 CALL icopy( nmat, work( i ), 1, javal, 1 )
1376 CALL icopy( nmat, work( i ), 1, mxval, 1 )
1378 CALL icopy( nmat, work( i ), 1, nxval, 1 )
1380 CALL icopy( nmat, work( i ), 1, imbxval, 1 )
1382 CALL icopy( nmat, work( i ), 1, inbxval, 1 )
1384 CALL icopy( nmat, work( i ), 1, mbxval, 1 )
1386 CALL icopy( nmat, work( i ), 1, nbxval, 1 )
1388 CALL icopy( nmat, work( i ), 1, rscxval, 1 )
1390 CALL icopy( nmat, work( i ), 1, cscxval, 1 )
1392 CALL icopy( nmat, work( i ), 1, ixval, 1 )
1394 CALL icopy( nmat, work( i ), 1, jxval, 1 )
1396 CALL icopy( nmat, work( i ), 1, incxval, 1 )
1398 CALL icopy( nmat, work( i ), 1, myval, 1 )
1400 CALL icopy( nmat, work( i ), 1, nyval, 1 )
1402 CALL icopy( nmat, work( i ), 1, imbyval, 1 )
1404 CALL icopy( nmat, work( i ), 1, inbyval, 1 )
1406 CALL icopy( nmat, work( i ), 1, mbyval, 1 )
1408 CALL icopy( nmat, work( i ), 1, nbyval, 1 )
1410 CALL icopy( nmat, work( i ), 1, rscyval, 1 )
1412 CALL icopy( nmat, work( i ), 1, cscyval, 1 )
1414 CALL icopy( nmat, work( i ), 1, iyval, 1 )
1416 CALL icopy( nmat, work( i ), 1, jyval, 1 )
1418 CALL icopy( nmat, work( i ), 1, incyval, 1 )
1422 IF( work( i ).EQ.1 )
THEN
1425 ltest( j ) = .false.
1432 CALL blacs_gridexit( ictxt )
1436 120
WRITE( nout, fmt = 9997 )
1438 IF( nout.NE.6 .AND. nout.NE.0 )
1440 CALL blacs_abort( ictxt, 1 )
1445 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
1447 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
1448 9996
FORMAT( a7, l2 )
1449 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
1450 $ /
' ******* TESTS ABANDONED *******' )
1451 9994
FORMAT( 2x,
'Alpha : ', g16.6 )
1452 9993
FORMAT( 2x,
'Beta : ', g16.6 )
1453 9992
FORMAT( 2x,
'Number of Tests : ', i6 )
1454 9991
FORMAT( 2x,
'Number of process grids : ', i6 )
1455 9990
FORMAT( 2x,
' : ', 5i6 )
1456 9989
FORMAT( 2x, a1,
' : ', 5i6 )
1457 9988
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
1458 9987
FORMAT( 2x,
' ', a, a8 )
1459 9986
FORMAT( 2x,
'Logical block size : ', i6 )