4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PZSWAP ',
'PZSCAL ',
7 $
'PZDSCAL',
'PZCOPY ',
'PZAXPY ',
8 $
'PZDOTU ',
'PZDOTC ',
'PDZNRM2',
108 INTEGER maxtests, maxgrids, gapmul, zplxsz, totmem,
110 DOUBLE PRECISION rzero
111 COMPLEX*16 padval, zero
112 parameter( maxtests = 20, maxgrids = 20, gapmul = 10,
113 $ zplxsz = 16, totmem = 2000000,
114 $ memsiz = totmem / zplxsz,
115 $ padval = ( -9923.0d+0, -9923.0d+0 ),
116 $ rzero = 0.0d+0, zero = ( 0.0d+0, 0.0d+0 ),
118 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
119 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
121 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
122 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
123 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
124 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
127 LOGICAL errflg, sof, tee
128 INTEGER csrcx, csrcy, i, iam, ictxt, igap, imbx, imby,
129 $ imidx, imidy, inbx, inby, incx, incy, ipmatx,
130 $ ipmaty, ipostx, iposty, iprex, iprey, ipw, ipx,
131 $ ipy, iverb, ix, ixseed, iy, iyseed, j, jx, jy,
132 $ k, ldx, ldy, mbx, mby, memreqd, mpx, mpy, mx,
133 $ my, mycol, myrow, n, nbx, nby, ngrids, nout,
134 $ npcol, nprocs, nprow, nqx, nqy, ntests, nx, ny,
135 $ pisclr, rsrcx, rsrcy, tskip, tstcnt
136 DOUBLE PRECISION pusclr
137 COMPLEX*16 alpha, psclr
141 LOGICAL ltest( nsubs ), ycheck( nsubs )
142 INTEGER cscxval( maxtests ), cscyval( maxtests ),
143 $ descx( dlen_ ), descxr( dlen_ ),
144 $ descy( dlen_ ), descyr( dlen_ ), ierr( 4 ),
145 $ imbxval( maxtests ), imbyval( maxtests ),
146 $ inbxval( maxtests ), inbyval( maxtests ),
147 $ incxval( maxtests ), incyval( maxtests ),
148 $ ixval( maxtests ), iyval( maxtests ),
149 $ jxval( maxtests ), jyval( maxtests ),
150 $ kfail( nsubs ), kpass( nsubs ), kskip( nsubs ),
151 $ ktests( nsubs ), mbxval( maxtests ),
152 $ mbyval( maxtests ), mxval( maxtests ),
153 $ myval( maxtests ), nbxval( maxtests ),
154 $ nbyval( maxtests ), nval( maxtests ),
155 $ nxval( maxtests ), nyval( maxtests ),
156 $ pval( maxtests ), qval( maxtests ),
157 $ rscxval( maxtests ), rscyval( maxtests )
158 COMPLEX*16 mem( memsiz )
161 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
162 $ blacs_gridinfo, blacs_gridinit, blacs_pinfo,
167 $
pzchkvout, pzcopy, pzdotc, pzdotu, pzdscal,
171 INTRINSIC abs, dble,
max, mod
174 CHARACTER*7 snames( nsubs )
177 COMMON /snamec/snames
178 COMMON /infoc/info, nblog
179 COMMON /pberrorc/nout, abrtflg
182 DATA ycheck/.true., .false., .false., .true.,
183 $ .true., .true., .true., .false., .false.,
219 CALL blacs_pinfo( iam, nprocs )
220 CALL pzbla1tstinfo( outfile, nout, ntests, nval, mxval, nxval,
221 $ imbxval, mbxval, inbxval, nbxval, rscxval,
222 $ cscxval, ixval, jxval, incxval, myval,
223 $ nyval, imbyval, mbyval, inbyval, nbyval,
224 $ rscyval, cscyval, iyval, jyval, incyval,
225 $ maxtests, ngrids, pval, maxgrids, qval,
226 $ maxgrids, ltest, sof, tee, iam, igap, iverb,
227 $ nprocs, alpha, mem )
230 WRITE( nout, fmt = 9979 )
231 WRITE( nout, fmt = * )
249 IF( nprow.LT.1 )
THEN
251 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
253 ELSE IF( npcol.LT.1 )
THEN
255 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
257 ELSE IF( nprow*npcol.GT.nprocs )
THEN
259 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
263 IF( ierr( 1 ).GT.0 )
THEN
265 $
WRITE( nout, fmt = 9997 )
'GRID'
272 CALL blacs_get( -1, 0, ictxt )
273 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
274 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
279 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
314 WRITE( nout, fmt = * )
315 WRITE( nout, fmt = 9996 ) tstcnt, nprow, npcol
316 WRITE( nout, fmt = * )
318 WRITE( nout, fmt = 9995 )
319 WRITE( nout, fmt = 9994 )
320 WRITE( nout, fmt = 9995 )
321 WRITE( nout, fmt = 9993 ) n, ix, jx, mx, nx, imbx, inbx,
322 $ mbx, nbx, rsrcx, csrcx, incx
324 WRITE( nout, fmt = 9995 )
325 WRITE( nout, fmt = 9992 )
326 WRITE( nout, fmt = 9995 )
327 WRITE( nout, fmt = 9993 ) n, iy, jy, my, ny, imby, inby,
328 $ mby, nby, rsrcy, csrcy, incy
329 WRITE( nout, fmt = 9995 )
335 $ block_cyclic_2d_inb, mx, nx, imbx, inbx,
336 $ mbx, nbx, rsrcx, csrcx, incx, mpx, nqx,
337 $ iprex, imidx, ipostx, igap, gapmul,
340 $ block_cyclic_2d_inb, my, ny, imby, inby,
341 $ mby, nby, rsrcy, csrcy, incy, mpy, nqy,
342 $ iprey, imidy, iposty, igap, gapmul,
345 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 )
THEN
357 ipy = ipx + descx( lld_ ) * nqx + ipostx + iprey
358 ipmatx = ipy + descy( lld_ ) * nqy + iposty
359 ipmaty = ipmatx + mx * nx
360 ipw = ipmaty + my * ny
368 $
max(
max( imbx, mbx ),
max( imby, mby ) )
370 IF( memreqd.GT.memsiz )
THEN
372 $
WRITE( nout, fmt = 9990 ) memreqd*zplxsz
378 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
380 IF( ierr( 1 ).GT.0 )
THEN
382 $
WRITE( nout, fmt = 9991 )
393 IF( .NOT.ltest( k ) )
397 WRITE( nout, fmt = * )
398 WRITE( nout, fmt = 9989 ) snames( k )
403 CALL pvdimchk( ictxt, nout, n,
'X', ix, jx, descx, incx,
405 CALL pvdimchk( ictxt, nout, n,
'Y', iy, jy, descy, incy,
408 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 )
THEN
409 kskip( k ) = kskip( k ) + 1
415 CALL pzlagen( .false.,
'None',
'No diag', 0, mx, nx, 1,
416 $ 1, descx, ixseed, mem( ipx ),
419 $
CALL pzlagen( .false.,
'None',
'No diag', 0, my, ny,
420 $ 1, 1, descy, iyseed, mem( ipy ),
425 CALL pb_descset2( descxr, mx, nx, imbx, inbx, mbx, nbx,
426 $ -1, -1, ictxt,
max( 1, mx ) )
427 CALL pzlagen( .false.,
'None',
'No diag', 0, mx, nx, 1,
428 $ 1, descxr, ixseed, mem( ipmatx ),
430 IF( ycheck( k ) )
THEN
432 $ nby, -1, -1, ictxt,
max( 1, my ) )
433 CALL pzlagen( .false.,
'None',
'No diag', 0, my, ny,
434 $ 1, 1, descyr, iyseed, mem( ipmaty ),
440 CALL pb_zfillpad( ictxt, mpx, nqx, mem( ipx-iprex ),
441 $ descx( lld_ ), iprex, ipostx, padval )
443 IF( ycheck( k ) )
THEN
444 CALL pb_zfillpad( ictxt, mpy, nqy, mem( ipy-iprey ),
445 $ descy( lld_ ), iprey, iposty,
452 CALL pzchkarg1( ictxt, nout, snames( k ), n, alpha, ix,
453 $ jx, descx, incx, iy, jy, descy, incy,
463 IF( iverb.EQ.2 )
THEN
464 IF( incx.EQ.descx( m_ ) )
THEN
466 $ 0, 0,
'PARALLEL_INITIAL_X', nout,
470 $ 0, 0,
'PARALLEL_INITIAL_X', nout,
473 IF( ycheck( k ) )
THEN
474 IF( incy.EQ.descy( m_ ) )
THEN
477 $
'PARALLEL_INITIAL_Y', nout,
482 $
'PARALLEL_INITIAL_Y', nout,
486 ELSE IF( iverb.GE.3 )
THEN
487 CALL pb_pzlaprnt( mx, nx, mem( ipx ), 1, 1, descx, 0,
488 $ 0,
'PARALLEL_INITIAL_X', nout,
491 $
CALL pb_pzlaprnt( my, ny, mem( ipy ), 1, 1, descy,
492 $ 0, 0,
'PARALLEL_INITIAL_Y', nout,
502 CALL pzswap( n, mem( ipx ), ix, jx, descx, incx,
503 $ mem( ipy ), iy, jy, descy, incy )
505 ELSE IF( k.EQ.2 )
THEN
510 CALL pzscal( n, alpha, mem( ipx ), ix, jx, descx,
513 ELSE IF( k.EQ.3 )
THEN
517 pusclr = dble( alpha )
518 CALL pzdscal( n, dble( alpha ), mem( ipx ), ix, jx,
521 ELSE IF( k.EQ.4 )
THEN
525 CALL pzcopy( n, mem( ipx ), ix, jx, descx, incx,
526 $ mem( ipy ), iy, jy, descy, incy )
528 ELSE IF( k.EQ.5 )
THEN
533 CALL pzaxpy( n, alpha, mem( ipx ), ix, jx, descx,
534 $ incx, mem( ipy ), iy, jy, descy, incy )
536 ELSE IF( k.EQ.6 )
THEN
540 CALL pzdotu( n, psclr, mem( ipx ), ix, jx, descx,
541 $ incx, mem( ipy ), iy, jy, descy, incy )
543 ELSE IF( k.EQ.7 )
THEN
547 CALL pzdotc( n, psclr, mem( ipx ), ix, jx, descx,
548 $ incx, mem( ipy ), iy, jy, descy, incy )
550 ELSE IF( k.EQ.8 )
THEN
554 CALL pdznrm2( n, pusclr, mem( ipx ), ix, jx, descx,
557 ELSE IF( k.EQ.9 )
THEN
561 CALL pdzasum( n, pusclr, mem( ipx ), ix, jx, descx,
564 ELSE IF( k.EQ.10 )
THEN
566 CALL pzamax( n, psclr, pisclr, mem( ipx ), ix, jx,
574 kskip( k ) = kskip( k ) + 1
576 $
WRITE( nout, fmt = 9978 ) info
583 $ pisclr, mem( ipmatx ), mem( ipx ),
584 $ ix, jx, descx, incx, mem( ipmaty ),
585 $ mem( ipy ), iy, jy, descy, incy,
587 IF( mod( info, 2 ).EQ.1 )
THEN
589 ELSE IF( mod( info / 2, 2 ).EQ.1 )
THEN
591 ELSE IF( info.NE.0 )
THEN
599 $ mem( ipx-iprex ), descx( lld_ ),
600 $ iprex, ipostx, padval )
601 IF( ycheck( k ) )
THEN
603 $ mem( ipy-iprey ), descy( lld_ ),
604 $ iprey, iposty, padval )
610 CALL pzchkarg1( ictxt, nout, snames( k ), n, alpha, ix,
611 $ jx, descx, incx, iy, jy, descy, incy,
616 CALL pzchkvout( n, mem( ipmatx ), mem( ipx ), ix, jx,
617 $ descx, incx, ierr( 3 ) )
619 IF( ierr( 3 ).NE.0 )
THEN
621 $
WRITE( nout, fmt = 9986 )
'PARALLEL_X', snames( k )
624 IF( ycheck( k ) )
THEN
625 CALL pzchkvout( n, mem( ipmaty ), mem( ipy ), iy, jy,
626 $ descy, incy, ierr( 4 ) )
627 IF( ierr( 4 ).NE.0 )
THEN
629 $
WRITE( nout, fmt = 9986 )
'PARALLEL_Y',
636 IF( info.NE.0 .OR. ierr( 1 ).NE.0 .OR.
637 $ ierr( 2 ).NE.0 .OR. ierr( 3 ).NE.0 .OR.
638 $ ierr( 4 ).NE. 0 )
THEN
640 $
WRITE( nout, fmt = 9988 ) snames( k )
641 kfail( k ) = kfail( k ) + 1
645 $
WRITE( nout, fmt = 9987 ) snames( k )
646 kpass( k ) = kpass( k ) + 1
651 IF( iverb.GE.1 .AND. errflg )
THEN
652 IF( ierr( 3 ).NE.0 .OR. iverb.GE.3 )
THEN
653 CALL pzmprnt( ictxt, nout, mx, nx, mem( ipmatx ),
654 $ ldx, 0, 0,
'SERIAL_X' )
656 $ 0, 0,
'PARALLEL_X', nout,
658 ELSE IF( ierr( 1 ).NE.0 )
THEN
660 $
CALL pzvprnt( ictxt, nout, n,
661 $ mem( ipmatx+ix-1+(jx-1)*ldx ),
662 $ incx, 0, 0,
'SERIAL_X' )
663 IF( incx.EQ.descx( m_ ) )
THEN
665 $ descx, 0, 0,
'PARALLEL_X',
666 $ nout, mem( ipmatx ) )
669 $ descx, 0, 0,
'PARALLEL_X',
670 $ nout, mem( ipmatx ) )
673 IF( ycheck( k ) )
THEN
674 IF( ierr( 4 ).NE.0 .OR. iverb.GE.3 )
THEN
675 CALL pzmprnt( ictxt, nout, my, ny,
676 $ mem( ipmaty ), ldy, 0, 0,
679 $ descy, 0, 0,
'PARALLEL_Y',
680 $ nout, mem( ipmatx ) )
681 ELSE IF( ierr( 2 ).NE.0 )
THEN
683 $
CALL pzvprnt( ictxt, nout, n,
684 $ mem( ipmaty+iy-1+(jy-1)*ldy ),
685 $ incy, 0, 0,
'SERIAL_Y' )
686 IF( incy.EQ.descy( m_ ) )
THEN
688 $ descy, 0, 0,
'PARALLEL_Y',
689 $ nout, mem( ipmatx ) )
692 $ descy, 0, 0,
'PARALLEL_Y',
693 $ nout, mem( ipmatx ) )
706 40
IF( iam.EQ.0 )
THEN
707 WRITE( nout, fmt = * )
708 WRITE( nout, fmt = 9985 ) j
713 CALL blacs_gridexit( ictxt )
724 IF( ltest( i ) )
THEN
725 kskip( i ) = kskip( i ) + tskip
726 ktests( i ) = kskip( i ) + kfail( i ) + kpass( i )
733 WRITE( nout, fmt = * )
734 WRITE( nout, fmt = 9981 )
735 WRITE( nout, fmt = * )
736 WRITE( nout, fmt = 9983 )
737 WRITE( nout, fmt = 9982 )
740 WRITE( nout, fmt = 9984 )
'|', snames( i ), ktests( i ),
741 $ kpass( i ), kfail( i ), kskip( i )
743 WRITE( nout, fmt = * )
744 WRITE( nout, fmt = 9980 )
745 WRITE( nout, fmt = * )
751 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
752 $
' should be at least 1' )
753 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
754 $
'. It can be at most', i4 )
755 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
756 9996
FORMAT( 2x,
'Test number ', i4 ,
' started on a ', i6,
' x ',
757 $ i6,
' process grid.' )
758 9995
FORMAT( 2x,
'---------------------------------------------------',
759 $
'--------------------------' )
760 9994
FORMAT( 2x,
' N IX JX MX NX IMBX INBX',
761 $
' MBX NBX RSRCX CSRCX INCX' )
762 9993
FORMAT( 2x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i5,1x,i5,1x,i5,1x,i5,1x,
764 9992
FORMAT( 2x,
' N IY JY MY NY IMBY INBY',
765 $
' MBY NBY RSRCY CSRCY INCY' )
766 9991
FORMAT(
'Not enough memory for this test: going on to',
767 $
' next test case.' )
768 9990
FORMAT(
'Not enough memory. Need: ', i12 )
769 9989
FORMAT( 2x,
' Tested Subroutine: ', a )
770 9988
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
771 $
' FAILED ',
' *****' )
772 9987
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
773 $
' PASSED ',
' *****' )
774 9986
FORMAT( 2x,
' ***** ERROR ***** Matrix operand ', a,
775 $
' modified by ', a,
' *****' )
776 9985
FORMAT( 2x,
'Test number ', i4,
' completed.' )
777 9984
FORMAT( 2x,a1,2x,a7,8x,i4,6x,i4,5x,i4,4x,i4 )
778 9983
FORMAT( 2x,
' SUBROUTINE TOTAL TESTS PASSED FAILED ',
780 9982
FORMAT( 2x,
' ---------- ----------- ------ ------ ',
782 9981
FORMAT( 2x,
'Testing Summary')
783 9980
FORMAT( 2x,
'End of Tests.' )
784 9979
FORMAT( 2x,
'Tests started.' )
785 9978
FORMAT( 2x,
' ***** Operation not supported, error code: ',
794 $ NXVAL, IMBXVAL, MBXVAL, INBXVAL,
795 $ NBXVAL, RSCXVAL, CSCXVAL, IXVAL,
796 $ JXVAL, INCXVAL, MYVAL, NYVAL, IMBYVAL,
797 $ MBYVAL, INBYVAL, NBYVAL, RSCYVAL,
798 $ CSCYVAL, IYVAL, JYVAL, INCYVAL,
799 $ LDVAL, NGRIDS, PVAL, LDPVAL, QVAL,
800 $ LDQVAL, LTEST, SOF, TEE, IAM, IGAP,
801 $ IVERB, NPROCS, ALPHA, WORK )
810 INTEGER IAM, IGAP, IVERB, LDPVAL, LDQVAL, LDVAL,
811 $ NGRIDS, NMAT, NOUT, NPROCS
815 CHARACTER*( * ) SUMMRY
817 INTEGER CSCXVAL( LDVAL ), CSCYVAL( LDVAL ),
818 $ imbxval( ldval ), imbyval( ldval ),
819 $ inbxval( ldval ), inbyval( ldval ),
820 $ incxval( ldval ), incyval( ldval ),
821 $ ixval( ldval ), iyval( ldval ), jxval( ldval ),
822 $ jyval( ldval ), mbxval( ldval ),
823 $ mbyval( ldval ), mxval( ldval ),
824 $ myval( ldval ), nbxval( ldval ),
825 $ nbyval( ldval ), nval( ldval ), nxval( ldval ),
826 $ nyval( ldval ), pval( ldpval ), qval( ldqval ),
827 $ rscxval( ldval ), rscyval( ldval ), work( * )
1037 PARAMETER ( NIN = 11, nsubs = 10 )
1042 DOUBLE PRECISION EPS
1046 CHARACTER*79 USRINFO
1049 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1050 $ blacs_gridinit, blacs_setup,
icopy, igebr2d,
1051 $ igebs2d, sgebr2d, sgebs2d, zgebr2d, zgebs2d
1054 DOUBLE PRECISION PDLAMCH
1061 CHARACTER*7 SNAMES( NSUBS )
1062 COMMON /snamec/snames
1073 OPEN( nin, file=
'PZBLAS1TST.dat', status=
'OLD' )
1074 READ( nin, fmt = * ) summry
1079 READ( nin, fmt = 9999 ) usrinfo
1083 READ( nin, fmt = * ) summry
1084 READ( nin, fmt = * ) nout
1085 IF( nout.NE.0 .AND. nout.NE.6 )
1086 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1092 READ( nin, fmt = * ) sof
1096 READ( nin, fmt = * ) tee
1100 READ( nin, fmt = * ) iverb
1101 IF( iverb.LT.0 .OR. iverb.GT.3 )
1106 READ( nin, fmt = * ) igap
1112 READ( nin, fmt = * ) ngrids
1113 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1114 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1116 ELSE IF( ngrids.GT.ldqval )
THEN
1117 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1123 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1124 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1128 READ( nin, fmt = * ) alpha
1132 READ( nin, fmt = * ) nmat
1133 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1134 WRITE( nout, fmt = 9998 )
'Tests', ldval
1140 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1141 READ( nin, fmt = * ) ( mxval( i ), i = 1, nmat )
1142 READ( nin, fmt = * ) ( nxval( i ), i = 1, nmat )
1143 READ( nin, fmt = * ) ( imbxval( i ), i = 1, nmat )
1144 READ( nin, fmt = * ) ( inbxval( i ), i = 1, nmat )
1145 READ( nin, fmt = * ) ( mbxval( i ), i = 1, nmat )
1146 READ( nin, fmt = * ) ( nbxval( i ), i = 1, nmat )
1147 READ( nin, fmt = * ) ( rscxval( i ), i = 1, nmat )
1148 READ( nin, fmt = * ) ( cscxval( i ), i = 1, nmat )
1149 READ( nin, fmt = * ) ( ixval( i ), i = 1, nmat )
1150 READ( nin, fmt = * ) ( jxval( i ), i = 1, nmat )
1151 READ( nin, fmt = * ) ( incxval( i ), i = 1, nmat )
1152 READ( nin, fmt = * ) ( myval( i ), i = 1, nmat )
1153 READ( nin, fmt = * ) ( nyval( i ), i = 1, nmat )
1154 READ( nin, fmt = * ) ( imbyval( i ), i = 1, nmat )
1155 READ( nin, fmt = * ) ( inbyval( i ), i = 1, nmat )
1156 READ( nin, fmt = * ) ( mbyval( i ), i = 1, nmat )
1157 READ( nin, fmt = * ) ( nbyval( i ), i = 1, nmat )
1158 READ( nin, fmt = * ) ( rscyval( i ), i = 1, nmat )
1159 READ( nin, fmt = * ) ( cscyval( i ), i = 1, nmat )
1160 READ( nin, fmt = * ) ( iyval( i ), i = 1, nmat )
1161 READ( nin, fmt = * ) ( jyval( i ), i = 1, nmat )
1162 READ( nin, fmt = * ) ( incyval( i ), i = 1, nmat )
1168 ltest( i ) = .false.
1171 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1173 IF( snamet.EQ.snames( i ) )
1177 WRITE( nout, fmt = 9995 )snamet
1193 IF( nprocs.LT.1 )
THEN
1196 nprocs =
max( nprocs, pval( i )*qval( i ) )
1198 CALL blacs_setup( iam, nprocs )
1204 CALL blacs_get( -1, 0, ictxt )
1205 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1213 CALL zgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1217 CALL igebs2d( ictxt,
'All',
' ', 2, 1, work, 2 )
1236 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1238 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1240 CALL icopy( nmat, nval, 1, work( i ), 1 )
1242 CALL icopy( nmat, mxval, 1, work( i ), 1 )
1244 CALL icopy( nmat, nxval, 1, work( i ), 1 )
1246 CALL icopy( nmat, imbxval, 1, work( i ), 1 )
1248 CALL icopy( nmat, inbxval, 1, work( i ), 1 )
1250 CALL icopy( nmat, mbxval, 1, work( i ), 1 )
1252 CALL icopy( nmat, nbxval, 1, work( i ), 1 )
1254 CALL icopy( nmat, rscxval, 1, work( i ), 1 )
1256 CALL icopy( nmat, cscxval, 1, work( i ), 1 )
1258 CALL icopy( nmat, ixval, 1, work( i ), 1 )
1260 CALL icopy( nmat, jxval, 1, work( i ), 1 )
1262 CALL icopy( nmat, incxval, 1, work( i ), 1 )
1264 CALL icopy( nmat, myval, 1, work( i ), 1 )
1266 CALL icopy( nmat, nyval, 1, work( i ), 1 )
1268 CALL icopy( nmat, imbyval, 1, work( i ), 1 )
1270 CALL icopy( nmat, inbyval, 1, work( i ), 1 )
1272 CALL icopy( nmat, mbyval, 1, work( i ), 1 )
1274 CALL icopy( nmat, nbyval, 1, work( i ), 1 )
1276 CALL icopy( nmat, rscyval, 1, work( i ), 1 )
1278 CALL icopy( nmat, cscyval, 1, work( i ), 1 )
1280 CALL icopy( nmat, iyval, 1, work( i ), 1 )
1282 CALL icopy( nmat, jyval, 1, work( i ), 1 )
1284 CALL icopy( nmat, incyval, 1, work( i ), 1 )
1288 IF( ltest( j ) )
THEN
1296 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1300 WRITE( nout, fmt = 9999 )
'Level 1 PBLAS testing program.'
1301 WRITE( nout, fmt = 9999 ) usrinfo
1302 WRITE( nout, fmt = * )
1303 WRITE( nout, fmt = 9999 )
1304 $
'Tests of the complex double precision '//
1306 WRITE( nout, fmt = * )
1307 WRITE( nout, fmt = 9999 )
1308 $
'The following parameter values will be used:'
1309 WRITE( nout, fmt = * )
1310 WRITE( nout, fmt = 9993 ) nmat
1311 WRITE( nout, fmt = 9992 ) ngrids
1312 WRITE( nout, fmt = 9990 )
1313 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1315 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 6,
1316 $
min( 10, ngrids ) )
1318 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 11,
1319 $
min( 15, ngrids ) )
1321 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 16, ngrids )
1322 WRITE( nout, fmt = 9990 )
1323 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1325 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 6,
1326 $
min( 10, ngrids ) )
1328 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 11,
1329 $
min( 15, ngrids ) )
1331 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 16, ngrids )
1332 WRITE( nout, fmt = 9988 ) sof
1333 WRITE( nout, fmt = 9987 ) tee
1334 WRITE( nout, fmt = 9983 ) igap
1335 WRITE( nout, fmt = 9986 ) iverb
1336 WRITE( nout, fmt = 9982 ) alpha
1337 IF( ltest( 1 ) )
THEN
1338 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... Yes'
1340 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... No '
1343 IF( ltest( i ) )
THEN
1344 WRITE( nout, fmt = 9984 ) snames( i ),
' ... Yes'
1346 WRITE( nout, fmt = 9984 ) snames( i ),
' ... No '
1349 WRITE( nout, fmt = 9994 ) eps
1350 WRITE( nout, fmt = * )
1357 $
CALL blacs_setup( iam, nprocs )
1362 CALL blacs_get( -1, 0, ictxt )
1363 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1369 CALL zgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
1371 CALL igebr2d( ictxt,
'All',
' ', 2, 1, work, 2, 0, 0 )
1375 i = 2*ngrids + 23*nmat + nsubs + 4
1376 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
1379 IF( work( i ).EQ.1 )
THEN
1385 IF( work( i ).EQ.1 )
THEN
1395 CALL icopy( ngrids, work( i ), 1, pval, 1 )
1397 CALL icopy( ngrids, work( i ), 1, qval, 1 )
1399 CALL icopy( nmat, work( i ), 1, nval, 1 )
1401 CALL icopy( nmat, work( i ), 1, mxval, 1 )
1403 CALL icopy( nmat, work( i ), 1, nxval, 1 )
1405 CALL icopy( nmat, work( i ), 1, imbxval, 1 )
1407 CALL icopy( nmat, work( i ), 1, inbxval, 1 )
1409 CALL icopy( nmat, work( i ), 1, mbxval, 1 )
1411 CALL icopy( nmat, work( i ), 1, nbxval, 1 )
1413 CALL icopy( nmat, work( i ), 1, rscxval, 1 )
1415 CALL icopy( nmat, work( i ), 1, cscxval, 1 )
1417 CALL icopy( nmat, work( i ), 1, ixval, 1 )
1419 CALL icopy( nmat, work( i ), 1, jxval, 1 )
1421 CALL icopy( nmat, work( i ), 1, incxval, 1 )
1423 CALL icopy( nmat, work( i ), 1, myval, 1 )
1425 CALL icopy( nmat, work( i ), 1, nyval, 1 )
1427 CALL icopy( nmat, work( i ), 1, imbyval, 1 )
1429 CALL icopy( nmat, work( i ), 1, inbyval, 1 )
1431 CALL icopy( nmat, work( i ), 1, mbyval, 1 )
1433 CALL icopy( nmat, work( i ), 1, nbyval, 1 )
1435 CALL icopy( nmat, work( i ), 1, rscyval, 1 )
1437 CALL icopy( nmat, work( i ), 1, cscyval, 1 )
1439 CALL icopy( nmat, work( i ), 1, iyval, 1 )
1441 CALL icopy( nmat, work( i ), 1, jyval, 1 )
1443 CALL icopy( nmat, work( i ), 1, incyval, 1 )
1447 IF( work( i ).EQ.1 )
THEN
1450 ltest( j ) = .false.
1457 CALL blacs_gridexit( ictxt )
1461 100
WRITE( nout, fmt = 9997 )
1463 IF( nout.NE.6 .AND. nout.NE.0 )
1465 CALL blacs_abort( ictxt, 1 )
1470 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
1472 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
1473 9996
FORMAT( a7, l2 )
1474 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
1475 $ /
' ******* TESTS ABANDONED *******' )
1476 9994
FORMAT( 2x,
'Relative machine precision (eps) is taken to be ',
1478 9993
FORMAT( 2x,
'Number of Tests : ', i6 )
1479 9992
FORMAT( 2x,
'Number of process grids : ', i6 )
1480 9991
FORMAT( 2x,
' : ', 5i6 )
1481 9990
FORMAT( 2x, a1,
' : ', 5i6 )
1482 9988
FORMAT( 2x,
'Stop on failure flag : ', l6 )
1483 9987
FORMAT( 2x,
'Test for error exits flag : ', l6 )
1484 9986
FORMAT( 2x,
'Verbosity level : ', i6 )
1485 9985
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
1486 9984
FORMAT( 2x,
' ', a, a8 )
1487 9983
FORMAT( 2x,
'Leading dimension gap : ', i6 )
1488 9982
FORMAT( 2x,
'Alpha : (', g16.6,
1502 INTEGER INOUT, NPROCS
1638 PARAMETER ( NSUBS = 10 )
1642 INTEGER I, ICTXT, MYCOL, MYROW, NPCOL, NPROW
1645 INTEGER SCODE( NSUBS )
1648 EXTERNAL blacs_get, blacs_gridexit, blacs_gridinfo,
1649 $ blacs_gridinit, pdzasum, pdznrm2, pzamax,
1650 $ pzaxpy, pzcopy,
pzdimee, pzdotc, pzdotu,
1651 $ pzdscal, pzscal, pzswap,
pzvecee
1656 CHARACTER*7 SNAMES( NSUBS )
1657 COMMON /SNAMEC/SNAMES
1658 COMMON /PBERRORC/NOUT, ABRTFLG
1661 DATA SCODE/11, 12, 12, 11, 13, 13, 13, 15, 15, 14/
1668 CALL blacs_get( -1, 0, ictxt )
1669 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1670 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
1683 IF( ltest( i ) )
THEN
1684 CALL pzdimee( ictxt, nout, pzswap, scode( i ), snames( i ) )
1685 CALL pzvecee( ictxt, nout, pzswap, scode( i ), snames( i ) )
1691 IF( ltest( i ) )
THEN
1692 CALL pzdimee( ictxt, nout, pzscal, scode( i ), snames( i ) )
1693 CALL pzvecee( ictxt, nout, pzscal, scode( i ), snames( i ) )
1699 IF( ltest( i ) )
THEN
1700 CALL pzdimee( ictxt, nout, pzdscal, scode( i ), snames( i ) )
1701 CALL pzvecee( ictxt, nout, pzdscal, scode( i ), snames( i ) )
1707 IF( ltest( i ) )
THEN
1708 CALL pzdimee( ictxt, nout, pzcopy, scode( i ), snames( i ) )
1709 CALL pzvecee( ictxt, nout, pzcopy, scode( i ), snames( i ) )
1715 IF( ltest( i ) )
THEN
1716 CALL pzdimee( ictxt, nout, pzaxpy, scode( i ), snames( i ) )
1717 CALL pzvecee( ictxt, nout, pzaxpy, scode( i ), snames( i ) )
1723 IF( ltest( i ) )
THEN
1724 CALL pzdimee( ictxt, nout, pzdotu, scode( i ), snames( i ) )
1725 CALL pzvecee( ictxt, nout, pzdotu, scode( i ), snames( i ) )
1731 IF( ltest( i ) )
THEN
1732 CALL pzdimee( ictxt, nout, pzdotc, scode( i ), snames( i ) )
1733 CALL pzvecee( ictxt, nout, pzdotc, scode( i ), snames( i ) )
1739 IF( ltest( i ) )
THEN
1740 CALL pzdimee( ictxt, nout, pdznrm2, scode( i ), snames( i ) )
1741 CALL pzvecee( ictxt, nout, pdznrm2, scode( i ), snames( i ) )
1747 IF( ltest( i ) )
THEN
1748 CALL pzdimee( ictxt, nout, pdzasum, scode( i ), snames( i ) )
1749 CALL pzvecee( ictxt, nout, pdzasum, scode( i ), snames( i ) )
1755 IF( ltest( i ) )
THEN
1756 CALL pzdimee( ictxt, nout, pzamax, scode( i ), snames( i ) )
1757 CALL pzvecee( ictxt, nout, pzamax, scode( i ), snames( i ) )
1760 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
1761 $
WRITE( nout, fmt = 9999 )
1763 CALL blacs_gridexit( ictxt )
1769 9999
FORMAT( 2x,
'Error-exit tests completed.' )
1777 $ DESCX, INCX, IY, JY, DESCY, INCY, INFO )
1785 INTEGER ICTXT, INCX, INCY, INFO, IX, IY, JX, JY, N,
1791 INTEGER DESCX( * ), DESCY( * )
1936 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
1937 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
1939 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
1940 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
1941 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
1942 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
1945 INTEGER I, INCXREF, INCYREF, IXREF, IYREF, JXREF,
1946 $ JYREF, MYCOL, MYROW, NPCOL, NPROW, NREF
1950 CHARACTER*15 ARGNAME
1951 INTEGER DESCXREF( DLEN_ ), DESCYREF( DLEN_ )
1954 EXTERNAL blacs_gridinfo, igsum2d
1963 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
1967 IF( info.EQ.0 )
THEN
1973 descxref( i ) = descx( i )
1979 descyref( i ) = descy( i )
1989 IF( n.NE.nref )
THEN
1990 WRITE( argname, fmt =
'(A)' )
'N'
1991 ELSE IF( ix.NE.ixref )
THEN
1992 WRITE( argname, fmt =
'(A)' )
'IX'
1993 ELSE IF( jx.NE.jxref )
THEN
1994 WRITE( argname, fmt =
'(A)' )
'JX'
1995 ELSE IF( descx( dtype_ ).NE.descxref( dtype_ ) )
THEN
1996 WRITE( argname, fmt =
'(A)' )
'DESCX( DTYPE_ )'
1997 ELSE IF( descx( m_ ).NE.descxref( m_ ) )
THEN
1998 WRITE( argname, fmt =
'(A)' )
'DESCX( M_ )'
1999 ELSE IF( descx( n_ ).NE.descxref( n_ ) )
THEN
2000 WRITE( argname, fmt =
'(A)' )
'DESCX( N_ )'
2001 ELSE IF( descx( imb_ ).NE.descxref( imb_ ) )
THEN
2002 WRITE( argname, fmt =
'(A)' )
'DESCX( IMB_ )'
2003 ELSE IF( descx( inb_ ).NE.descxref( inb_ ) )
THEN
2004 WRITE( argname, fmt =
'(A)' )
'DESCX( INB_ )'
2005 ELSE IF( descx( mb_ ).NE.descxref( mb_ ) )
THEN
2006 WRITE( argname, fmt =
'(A)' )
'DESCX( MB_ )'
2007 ELSE IF( descx( nb_ ).NE.descxref( nb_ ) )
THEN
2008 WRITE( argname, fmt =
'(A)' )
'DESCX( NB_ )'
2009 ELSE IF( descx( rsrc_ ).NE.descxref( rsrc_ ) )
THEN
2010 WRITE( argname, fmt =
'(A)' )
'DESCX( RSRC_ )'
2011 ELSE IF( descx( csrc_ ).NE.descxref( csrc_ ) )
THEN
2012 WRITE( argname, fmt =
'(A)' )
'DESCX( CSRC_ )'
2013 ELSE IF( descx( ctxt_ ).NE.descxref( ctxt_ ) )
THEN
2014 WRITE( argname, fmt =
'(A)' )
'DESCX( CTXT_ )'
2015 ELSE IF( descx( lld_ ).NE.descxref( lld_ ) )
THEN
2016 WRITE( argname, fmt =
'(A)' )
'DESCX( LLD_ )'
2017 ELSE IF( incx.NE.incxref )
THEN
2018 WRITE( argname, fmt =
'(A)' )
'INCX'
2019 ELSE IF( iy.NE.iyref )
THEN
2020 WRITE( argname, fmt =
'(A)' )
'IY'
2021 ELSE IF( jy.NE.jyref )
THEN
2022 WRITE( argname, fmt =
'(A)' )
'JY'
2023 ELSE IF( descy( dtype_ ).NE.descyref( dtype_ ) )
THEN
2024 WRITE( argname, fmt =
'(A)' )
'DESCY( DTYPE_ )'
2025 ELSE IF( descy( m_ ).NE.descyref( m_ ) )
THEN
2026 WRITE( argname, fmt =
'(A)' )
'DESCY( M_ )'
2027 ELSE IF( descy( n_ ).NE.descyref( n_ ) )
THEN
2028 WRITE( argname, fmt =
'(A)' )
'DESCY( N_ )'
2029 ELSE IF( descy( imb_ ).NE.descyref( imb_ ) )
THEN
2030 WRITE( argname, fmt =
'(A)' )
'DESCY( IMB_ )'
2031 ELSE IF( descy( inb_ ).NE.descyref( inb_ ) )
THEN
2032 WRITE( argname, fmt =
'(A)' )
'DESCY( INB_ )'
2033 ELSE IF( descy( mb_ ).NE.descyref( mb_ ) )
THEN
2034 WRITE( argname, fmt =
'(A)' )
'DESCY( MB_ )'
2035 ELSE IF( descy( nb_ ).NE.descyref( nb_ ) )
THEN
2036 WRITE( argname, fmt =
'(A)' )
'DESCY( NB_ )'
2037 ELSE IF( descy( rsrc_ ).NE.descyref( rsrc_ ) )
THEN
2038 WRITE( argname, fmt =
'(A)' )
'DESCY( RSRC_ )'
2039 ELSE IF( descy( csrc_ ).NE.descyref( csrc_ ) )
THEN
2040 WRITE( argname, fmt =
'(A)' )
'DESCY( CSRC_ )'
2041 ELSE IF( descy( ctxt_ ).NE.descyref( ctxt_ ) )
THEN
2042 WRITE( argname, fmt =
'(A)' )
'DESCY( CTXT_ )'
2043 ELSE IF( descy( lld_ ).NE.descyref( lld_ ) )
THEN
2044 WRITE( argname, fmt =
'(A)' )
'DESCY( LLD_ )'
2045 ELSE IF( incy.NE.incyref )
THEN
2046 WRITE( argname, fmt =
'(A)' )
'INCY'
2047 ELSE IF( alpha.NE.alpharef )
THEN
2048 WRITE( argname, fmt =
'(A)' )
'ALPHA'
2053 CALL igsum2d( ictxt,
'All',
' ', 1, 1, info, 1, -1, 0 )
2055 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2057 IF( info.GT.0 )
THEN
2058 WRITE( nout, fmt = 9999 ) argname, sname
2060 WRITE( nout, fmt = 9998 ) sname
2067 9999
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2068 $
' FAILED changed ', a,
' *****' )
2069 9998
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2085 INTEGER ictxt, incx, ix, jx, n
2196 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
2197 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
2199 PARAMETER ( block_cyclic_2d_inb = 2, dlen_ = 11,
2200 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2201 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2202 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2205 LOGICAL colrep, rowrep
2206 INTEGER iix, ixcol, ixrow, jjx, mycol, myrow, npcol,
2214 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2216 CALL pb_infog2l( ix, jx, descx, nprow, npcol, myrow, mycol,
2217 $ iix, jjx, ixrow, ixcol )
2218 rowrep = ( ixrow.EQ.-1 )
2219 colrep = ( ixcol.EQ.-1 )
2221 IF( descx( m_ ).EQ.1 .AND. n.EQ.1 )
THEN
2226 pisinscope = ( ( ixrow.EQ.myrow .OR. rowrep ) .AND.
2227 $ ( ixcol.EQ.mycol .OR. colrep ) )
2231 IF( incx.EQ.descx( m_ ) )
THEN
2253 $ PISCLR, X, PX, IX, JX, DESCX, INCX, Y,
2254 $ PY, IY, JY, DESCY, INCY, INFO )
2262 INTEGER ICTXT, INCX, INCY, INFO, IX, IY, JX, JY, N,
2263 $ nout, nrout, pisclr
2264 DOUBLE PRECISION PUSCLR
2268 INTEGER DESCX( * ), DESCY( * )
2269 COMPLEX*16 PX( * ), PY( * ), X( * ), Y( * )
2447 DOUBLE PRECISION RZERO
2449 PARAMETER ( ZERO = ( 0.0d+0, 0.0d+0 ),
2451 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2452 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2454 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2455 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2456 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2457 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2460 LOGICAL COLREP, INXSCOPE, INYSCOPE, ROWREP
2461 INTEGER I, IB, ICURCOL, ICURROW, IDUMM, IIX, IIY, IN,
2462 $ ioffx, ioffy, isclr, ixcol, ixrow, iycol,
2463 $ iyrow, j, jb, jjx, jjy, jn, kk, ldx, ldy,
2464 $ mycol, myrow, npcol, nprow
2465 DOUBLE PRECISION ERR, ERRMAX, PREC, USCLR
2470 CHARACTER*5 ARGIN1, ARGIN2, ARGOUT1, ARGOUT2
2480 DOUBLE PRECISION PDLAMCH
2481 EXTERNAL izamax, pdlamch, pisinscope
2495 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2505 prec = pdlamch( ictxt,
'precision' )
2507 IF( nrout.EQ.1 )
THEN
2511 ioffx = ix + ( jx - 1 ) * descx( m_ )
2512 ioffy = iy + ( jy - 1 ) * descy( m_ )
2513 CALL zswap( n, x( ioffx ), incx, y( ioffy ), incy )
2514 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2516 CALL pzchkvin( errmax, n, y, py, iy, jy, descy, incy,
2519 ELSE IF( nrout.EQ.2 )
THEN
2524 ioffx = ix + ( jx - 1 ) * descx( m_ )
2525 CALL pb_infog2l( ix, jx, descx, nprow, npcol, myrow, mycol,
2526 $ iix, jjx, ixrow, ixcol )
2529 rowrep = ( ixrow.EQ.-1 )
2530 colrep = ( ixcol.EQ.-1 )
2532 IF( incx.EQ.descx( m_ ) )
THEN
2536 jb = descx( inb_ ) - jx + 1
2538 $ jb = ( (-jb ) / descx( nb_ ) + 1 ) * descx( nb_ ) + jb
2544 CALL pzerrscal( err, psclr, x( ioffx ), prec )
2546 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2547 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2548 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2554 ioffx = ioffx + incx
2558 icurcol = mod( icurcol+1, npcol )
2560 DO 40 j = jn+1, jx+n-1, descx( nb_ )
2561 jb =
min( jx+n-j, descx( nb_ ) )
2565 CALL pzerrscal( err, psclr, x( ioffx ), prec )
2567 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2568 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2569 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2575 ioffx = ioffx + incx
2579 icurcol = mod( icurcol+1, npcol )
2587 ib = descx( imb_ ) - ix + 1
2589 $ ib = ( (-ib ) / descx( mb_ ) + 1 ) * descx( mb_ ) + ib
2595 CALL pzerrscal( err, psclr, x( ioffx ), prec )
2597 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2598 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2599 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2605 ioffx = ioffx + incx
2609 icurrow = mod( icurrow+1, nprow )
2611 DO 70 i = in+1, ix+n-1, descx( mb_ )
2612 ib =
min( ix+n-i, descx( mb_ ) )
2616 CALL pzerrscal( err, psclr, x( ioffx ), prec )
2618 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2619 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2620 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2626 ioffx = ioffx + incx
2629 icurrow = mod( icurrow+1, nprow )
2635 ELSE IF( nrout.EQ.3 )
THEN
2640 ioffx = ix + ( jx - 1 ) * descx( m_ )
2641 CALL pb_infog2l( ix, jx, descx, nprow, npcol, myrow, mycol,
2642 $ iix, jjx, ixrow, ixcol )
2645 rowrep = ( ixrow.EQ.-1 )
2646 colrep = ( ixcol.EQ.-1 )
2648 IF( incx.EQ.descx( m_ ) )
THEN
2652 jb = descx( inb_ ) - jx + 1
2654 $ jb = ( (-jb ) / descx( nb_ ) + 1 ) * descx( nb_ ) + jb
2660 CALL pzderrscal( err, pusclr, x( ioffx ), prec )
2662 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2663 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2664 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2670 ioffx = ioffx + incx
2674 icurcol = mod( icurcol+1, npcol )
2676 DO 100 j = jn+1, jx+n-1, descx( nb_ )
2677 jb =
min( jx+n-j, descx( nb_ ) )
2681 CALL pzderrscal( err, pusclr, x( ioffx ), prec )
2683 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2684 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2685 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2691 ioffx = ioffx + incx
2695 icurcol = mod( icurcol+1, npcol )
2703 ib = descx( imb_ ) - ix + 1
2705 $ ib = ( (-ib ) / descx( mb_ ) + 1 ) * descx( mb_ ) + ib
2711 CALL pzderrscal( err, pusclr, x( ioffx ), prec )
2713 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2714 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2715 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2721 ioffx = ioffx + incx
2725 icurrow = mod( icurrow+1, nprow )
2727 DO 130 i = in+1, ix+n-1, descx( mb_ )
2728 ib =
min( ix+n-i, descx( mb_ ) )
2732 CALL pzderrscal( err, pusclr, x( ioffx ), prec )
2734 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2735 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2736 IF( abs( px( iix+(jjx-1)*ldx ) - x( ioffx ) ).GT.
2742 ioffx = ioffx + incx
2745 icurrow = mod( icurrow+1, nprow )
2751 ELSE IF( nrout.EQ.4 )
THEN
2755 ioffx = ix + ( jx - 1 ) * descx( m_ )
2756 ioffy = iy + ( jy - 1 ) * descy( m_ )
2757 CALL zcopy( n, x( ioffx ), incx, y( ioffy ), incy )
2758 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2760 CALL pzchkvin( errmax, n, y, py, iy, jy, descy, incy,
2763 ELSE IF( nrout.EQ.5 )
THEN
2767 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2770 ioffx = ix + ( jx - 1 ) * descx( m_ )
2771 ioffy = iy + ( jy - 1 ) * descy( m_ )
2772 CALL pb_infog2l( iy, jy, descy, nprow, npcol, myrow, mycol,
2773 $ iiy, jjy, iyrow, iycol )
2776 rowrep = ( iyrow.EQ.-1 )
2777 colrep = ( iycol.EQ.-1 )
2779 IF( incy.EQ.descy( m_ ) )
THEN
2783 jb = descy( inb_ ) - jy + 1
2785 $ jb = ( (-jb ) / descy( nb_ ) + 1 ) * descy( nb_ ) + jb
2791 CALL pzerraxpy( err, psclr, x( ioffx ), y( ioffy ),
2794 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2795 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2796 IF( abs( py( iiy+(jjy-1)*ldy ) - y( ioffy ) ).GT.
2803 ioffx = ioffx + incx
2804 ioffy = ioffy + incy
2808 icurcol = mod( icurcol+1, npcol )
2810 DO 160 j = jn+1, jy+n-1, descy( nb_ )
2811 jb =
min( jy+n-j, descy( nb_ ) )
2815 CALL pzerraxpy( err, psclr, x( ioffx ), y( ioffy ),
2818 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2819 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2820 IF( abs( py( iiy+(jjy-1)*ldy ) - y( ioffy ) ).GT.
2827 ioffx = ioffx + incx
2828 ioffy = ioffy + incy
2832 icurcol = mod( icurcol+1, npcol )
2840 ib = descy( imb_ ) - iy + 1
2842 $ ib = ( (-ib ) / descy( mb_ ) + 1 ) * descy( mb_ ) + ib
2848 CALL pzerraxpy( err, psclr, x( ioffx ), y( ioffy ),
2851 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2852 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2853 IF( abs( py( iiy+(jjy-1)*ldy ) - y( ioffy ) ).GT.
2860 ioffx = ioffx + incx
2861 ioffy = ioffy + incy
2865 icurrow = mod( icurrow+1, nprow )
2867 DO 190 i = in+1, iy+n-1, descy( mb_ )
2868 ib =
min( iy+n-i, descy( mb_ ) )
2872 CALL pzerraxpy( err, psclr, x( ioffx ), y( ioffy ),
2875 IF( ( myrow.EQ.icurrow .OR. rowrep ) .AND.
2876 $ ( mycol.EQ.icurcol .OR. colrep ) )
THEN
2877 IF( abs( py( iiy+(jjy-1)*ldy ) - y( ioffy ) ).GT.
2884 ioffx = ioffx + incx
2885 ioffy = ioffy + incy
2889 icurrow = mod( icurrow+1, nprow )
2895 ELSE IF( nrout.EQ.6 )
THEN
2899 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2901 CALL pzchkvin( errmax, n, y, py, iy, jy, descy, incy,
2903 ioffx = ix + ( jx - 1 ) * descx( m_ )
2904 ioffy = iy + ( jy - 1 ) * descy( m_ )
2905 CALL pzerrdotu( err, n, sclr, x( ioffx ), incx, y( ioffy ),
2907 inxscope = pisinscope( ictxt, n, ix, jx, descx, incx )
2908 inyscope = pisinscope( ictxt, n, iy, jy, descy, incy )
2909 IF( inxscope.OR.inyscope )
THEN
2910 IF( abs( psclr - sclr ).GT.err )
THEN
2912 WRITE( argin1, fmt =
'(A)' )
'DOTU'
2913 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2914 WRITE( nout, fmt = 9998 ) argin1
2915 WRITE( nout, fmt = 9996 ) sclr, psclr
2920 IF( psclr.NE.sclr )
THEN
2922 WRITE( argout1, fmt =
'(A)' )
'DOTU'
2923 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2924 WRITE( nout, fmt = 9997 ) argout1
2925 WRITE( nout, fmt = 9996 ) sclr, psclr
2930 ELSE IF( nrout.EQ.7 )
THEN
2934 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2936 CALL pzchkvin( errmax, n, y, py, iy, jy, descy, incy,
2938 ioffx = ix + ( jx - 1 ) * descx( m_ )
2939 ioffy = iy + ( jy - 1 ) * descy( m_ )
2940 CALL pzerrdotc( err, n, sclr, x( ioffx ), incx, y( ioffy ),
2942 inxscope = pisinscope( ictxt, n, ix, jx, descx, incx )
2943 inyscope = pisinscope( ictxt, n, iy, jy, descy, incy )
2944 IF( inxscope.OR.inyscope )
THEN
2945 IF( abs( psclr - sclr ).GT.err )
THEN
2947 WRITE( argin1, fmt =
'(A)' )
'DOTC'
2948 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2949 WRITE( nout, fmt = 9998 ) argin1
2950 WRITE( nout, fmt = 9996 ) sclr, psclr
2955 IF( psclr.NE.sclr )
THEN
2957 WRITE( argout1, fmt =
'(A)' )
'DOTC'
2958 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2959 WRITE( nout, fmt = 9997 ) argout1
2960 WRITE( nout, fmt = 9996 ) sclr, psclr
2965 ELSE IF( nrout.EQ.8 )
THEN
2969 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
2971 ioffx = ix + ( jx - 1 ) * descx( m_ )
2972 CALL pzerrnrm2( err, n, usclr, x( ioffx ), incx, prec )
2973 IF( pisinscope( ictxt, n, ix, jx, descx, incx ) )
THEN
2974 IF( abs( pusclr - usclr ).GT.err )
THEN
2976 WRITE( argin1, fmt =
'(A)' )
'NRM2'
2977 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2978 WRITE( nout, fmt = 9998 ) argin1
2979 WRITE( nout, fmt = 9994 ) usclr, pusclr
2984 IF( pusclr.NE.usclr )
THEN
2986 WRITE( argout1, fmt =
'(A)' )
'NRM2'
2987 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2988 WRITE( nout, fmt = 9997 ) argout1
2989 WRITE( nout, fmt = 9994 ) usclr, pusclr
2994 ELSE IF( nrout.EQ.9 )
THEN
2998 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
3000 ioffx = ix + ( jx - 1 ) * descx( m_ )
3001 CALL pzerrasum( err, n, usclr, x( ioffx ), incx, prec )
3002 IF( pisinscope( ictxt, n, ix, jx, descx, incx ) )
THEN
3003 IF( abs( pusclr - usclr ) .GT. err )
THEN
3005 WRITE( argin1, fmt =
'(A)' )
'ASUM'
3006 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3007 WRITE( nout, fmt = 9998 ) argin1
3008 WRITE( nout, fmt = 9994 ) usclr, pusclr
3013 IF( pusclr.NE.usclr )
THEN
3015 WRITE( argout1, fmt =
'(A)' )
'ASUM'
3016 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3017 WRITE( nout, fmt = 9997 ) argout1
3018 WRITE( nout, fmt = 9994 ) usclr, pusclr
3023 ELSE IF( nrout.EQ.10 )
THEN
3027 CALL pzchkvin( errmax, n, x, px, ix, jx, descx, incx,
3029 ioffx = ix + ( jx - 1 ) * descx( m_ )
3030 IF( pisinscope( ictxt, n, ix, jx, descx, incx ) )
THEN
3031 isclr = izamax( n, x( ioffx ), incx )
3034 ELSE IF( ( incx.EQ.1 ).AND.( descx( m_ ).EQ.1 ).AND.
3038 ELSE IF( incx.EQ.descx( m_ ) )
THEN
3039 isclr = jx + isclr - 1
3040 sclr = x( ix + ( isclr - 1 ) * descx( m_ ) )
3042 isclr = ix + isclr - 1
3043 sclr = x( isclr + ( jx - 1 ) * descx( m_ ) )
3046 IF( psclr.NE.sclr )
THEN
3048 WRITE( argin1, fmt =
'(A)' )
'AMAX'
3049 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3050 WRITE( nout, fmt = 9998 ) argin1
3051 WRITE( nout, fmt = 9996 ) sclr, psclr
3055 IF( pisclr.NE.isclr )
THEN
3057 WRITE( argin2, fmt =
'(A)' )
'INDX'
3058 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3059 WRITE( nout, fmt = 9998 ) argin2
3060 WRITE( nout, fmt = 9995 ) isclr, pisclr
3066 IF( psclr.NE.sclr )
THEN
3068 WRITE( argout1, fmt =
'(A)' )
'AMAX'
3069 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3070 WRITE( nout, fmt = 9997 ) argout1
3071 WRITE( nout, fmt = 9996 ) sclr, psclr
3074 IF( pisclr.NE.isclr )
THEN
3076 WRITE( argout2, fmt =
'(A)' )
'INDX'
3077 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
3078 WRITE( nout, fmt = 9997 ) argout2
3079 WRITE( nout, fmt = 9995 ) isclr, pisclr
3088 CALL igamx2d( ictxt,
'All',
' ', 6, 1, ierr, 6, idumm, idumm, -1,
3093 IF( ierr( 1 ).NE.0 )
THEN
3095 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3096 $
WRITE( nout, fmt = 9999 )
'X'
3099 IF( ierr( 2 ).NE.0 )
THEN
3101 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3102 $
WRITE( nout, fmt = 9999 )
'Y'
3105 IF( ierr( 3 ).NE.0 )
3108 IF( ierr( 4 ).NE.0 )
3111 IF( ierr( 5 ).NE.0 )
3114 IF( ierr( 6 ).NE.0 )
3117 9999
FORMAT( 2x,
' ***** ERROR: Vector operand ', a,
3118 $
' is incorrect.' )
3119 9998
FORMAT( 2x,
' ***** ERROR: Output scalar result ', a,
3120 $
' in scope is incorrect.' )
3121 9997
FORMAT( 2x,
' ***** ERROR: Output scalar result ', a,
3122 $
' out of scope is incorrect.' )
3123 9996
FORMAT( 2x,
' ***** Expected value is: ', d30.18,
'+i*(',
3124 $ d30.18,
'),', /2x,
' Obtained value is: ',
3125 $ d30.18,
'+i*(', d30.18,
')' )
3126 9995
FORMAT( 2x,
' ***** Expected value is: ', i6, /2x,
3127 $
' Obtained value is: ', i6 )
3128 9994
FORMAT( 2x,
' ***** Expected value is: ', d30.18, /2x,
3129 $
' Obtained value is: ', d30.18 )
3136 SUBROUTINE pzerrdotu( ERRBND, N, SCLR, X, INCX, Y, INCY, PREC )
3144 INTEGER INCX, INCY, N
3145 DOUBLE PRECISION ERRBND, PREC
3149 COMPLEX*16 X( * ), Y( * )
3211 DOUBLE PRECISION ONE, TWO, ZERO
3212 PARAMETER ( ONE = 1.0d+0, two = 2.0d+0,
3217 DOUBLE PRECISION ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
3221 INTRINSIC ABS, DBLE, DIMAG, MAX
3232 fact = two * ( one + prec )
3233 addbnd = two * two * two * prec
3237 sclr = sclr + x( ix ) * y( iy )
3239 tmp = dble( x( ix ) ) * dble( y( iy ) )
3240 IF( tmp.GE.zero )
THEN
3241 sumrpos = sumrpos + tmp * fact
3243 sumrneg = sumrneg - tmp * fact
3246 tmp = - dimag( x( ix ) ) * dimag( y( iy ) )
3247 IF( tmp.GE.zero )
THEN
3248 sumrpos = sumrpos + tmp * fact
3250 sumrneg = sumrneg - tmp * fact
3253 tmp = dimag( x( ix ) ) * dble( y( iy ) )
3254 IF( tmp.GE.zero )
THEN
3255 sumipos = sumipos + tmp * fact
3257 sumineg = sumineg - tmp * fact
3260 tmp = dble( x( ix ) ) * dimag( y( iy ) )
3261 IF( tmp.GE.zero )
THEN
3262 sumipos = sumipos + tmp * fact
3264 sumineg = sumineg - tmp * fact
3272 errbnd = addbnd * max( max( sumrpos, sumrneg ),
3273 $ max( sumipos, sumineg ) )
3280 SUBROUTINE pzerrdotc( ERRBND, N, SCLR, X, INCX, Y, INCY, PREC )
3288 INTEGER INCX, INCY, N
3289 DOUBLE PRECISION ERRBND, PREC
3293 COMPLEX*16 X( * ), Y( * )
3355 DOUBLE PRECISION ONE, TWO, ZERO
3356 PARAMETER ( ONE = 1.0d+0, two = 2.0d+0,
3361 DOUBLE PRECISION ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
3365 INTRINSIC ABS, DBLE, DCONJG, DIMAG, MAX
3376 fact = two * ( one + prec )
3377 addbnd = two * two * two * prec
3381 sclr = sclr + dconjg( x( ix ) ) * y( iy )
3383 tmp = dble( x( ix ) ) * dble( y( iy ) )
3384 IF( tmp.GE.zero )
THEN
3385 sumrpos = sumrpos + tmp * fact
3387 sumrneg = sumrneg - tmp * fact
3390 tmp = dimag( x( ix ) ) * dimag( y( iy ) )
3391 IF( tmp.GE.zero )
THEN
3392 sumrpos = sumrpos + tmp * fact
3394 sumrneg = sumrneg - tmp * fact
3397 tmp = - dimag( x( ix ) ) * dble( y( iy ) )
3398 IF( tmp.GE.zero )
THEN
3399 sumipos = sumipos + tmp * fact
3401 sumineg = sumineg - tmp * fact
3404 tmp = dble( x( ix ) ) * dimag( y( iy ) )
3405 IF( tmp.GE.zero )
THEN
3406 sumipos = sumipos + tmp * fact
3408 sumineg = sumineg - tmp * fact
3416 errbnd = addbnd * max( max( sumrpos, sumrneg ),
3417 $ max( sumipos, sumineg ) )
3433 DOUBLE PRECISION ERRBND, PREC, USCLR
3488 DOUBLE PRECISION ONE, TWO, ZERO
3489 PARAMETER ( ONE = 1.0d+0, two = 2.0d+0,
3494 DOUBLE PRECISION ABSXI, ADDBND, FACT, SCALE, SSQ, SUMSCA, SUMSSQ
3497 INTRINSIC ABS, DBLE, DIMAG
3504 addbnd = two * two * two * prec
3505 fact = one + two * ( ( one + prec )**3 - one )
3509 DO 10 ix = 1, 1 + ( n - 1 )*incx, incx
3510 IF( dble( x( ix ) ).NE.zero )
THEN
3511 absxi = abs( dble( x( ix ) ) )
3512 IF( scale.LT.absxi )
THEN
3513 sumssq = one + ( ssq*( scale/absxi )**2 ) * fact
3514 errbnd = addbnd * sumssq
3515 sumssq = sumssq + errbnd
3516 ssq = one + ssq*( scale/absxi )**2
3520 sumssq = ssq + ( ( absxi/scale )**2 ) * fact
3521 errbnd = addbnd * sumssq
3522 sumssq = sumssq + errbnd
3523 ssq = ssq + ( absxi/scale )**2
3526 IF( dimag( x( ix ) ).NE.zero )
THEN
3527 absxi = abs( dimag( x( ix ) ) )
3528 IF( scale.LT.absxi )
THEN
3529 sumssq = one + ( ssq*( scale/absxi )**2 ) * fact
3530 errbnd = addbnd * sumssq
3531 sumssq = sumssq + errbnd
3532 ssq = one + ssq*( scale/absxi )**2
3536 sumssq = ssq + ( ( absxi/scale )**2 ) * fact
3537 errbnd = addbnd * sumssq
3538 sumssq = sumssq + errbnd
3539 ssq = ssq + ( absxi/scale )**2
3544 usclr = scale * sqrt( ssq )
3548 errbnd = sqrt( sumssq ) * ( one + two * ( 1.00001d+0 * prec ) )
3550 errbnd = ( sumsca * errbnd ) - usclr
3566 DOUBLE PRECISION ERRBND, PREC, USCLR
3612 DOUBLE PRECISION TWO, ZERO
3613 PARAMETER ( TWO = 2.0d+0, zero = 0.0d+0 )
3617 DOUBLE PRECISION ADDBND
3620 INTRINSIC ABS, DBLE, DIMAG
3626 addbnd = two * two * two * prec
3628 DO 10 ix = 1, 1 + ( n - 1 )*incx, incx
3629 usclr = usclr + abs( dble( x( ix ) ) ) +
3630 $ abs( dimag( x( ix ) ) )
3633 errbnd = addbnd * usclr
3648 DOUBLE PRECISION ERRBND, PREC
3691 DOUBLE PRECISION TWO
3692 PARAMETER ( TWO = 2.0d+0 )
3701 errbnd = ( two * prec ) * abs( x )
3716 DOUBLE PRECISION ERRBND, PREC, PUSCLR
3759 DOUBLE PRECISION TWO
3760 PARAMETER ( TWO = 2.0d+0 )
3763 INTRINSIC abs, dble, dcmplx, dimag
3767 x = dcmplx( pusclr * dble( x ), pusclr * dimag( x ) )
3769 errbnd = ( two * prec ) * abs( x )
3784 DOUBLE PRECISION ERRBND, PREC
3785 COMPLEX*16 PSCLR, X, Y
3820 DOUBLE PRECISION ONE, TWO, ZERO
3821 PARAMETER ( ONE = 1.0d+0, two = 2.0d+0,
3825 DOUBLE PRECISION ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
3830 INTRINSIC DBLE, DIMAG, MAX
3838 fact = one + two * prec
3839 addbnd = two * two * two * prec
3842 IF( dble( tmp ).GE.zero )
THEN
3843 sumrpos = sumrpos + dble( tmp ) * fact
3845 sumrneg = sumrneg - dble( tmp ) * fact
3847 IF( dimag( tmp ).GE.zero )
THEN
3848 sumipos = sumipos + dimag( tmp ) * fact
3850 sumineg = sumineg - dimag( tmp ) * fact
3854 IF( dble( tmp ).GE.zero )
THEN
3855 sumrpos = sumrpos + dble( tmp )
3857 sumrneg = sumrneg - dble( tmp )
3859 IF( dimag( tmp ).GE.zero )
THEN
3860 sumipos = sumipos + dimag( tmp )
3862 sumineg = sumineg - dimag( tmp )
3865 y = y + ( psclr * x )
3867 errbnd = addbnd * max( max( sumrpos, sumrneg ),
3868 $ max( sumipos, sumineg ) )
subroutine pvdimchk(ictxt, nout, n, matrix, ix, jx, descx, incx, info)
subroutine icopy(n, sx, incx, sy, incy)
subroutine pb_descset2(desc, m, n, imb, inb, mb, nb, rsrc, csrc, ctxt, lld)
subroutine pb_infog2l(i, j, desc, nprow, npcol, myrow, mycol, ii, jj, prow, pcol)
subroutine pvdescchk(ictxt, nout, matrix, descx, dtx, mx, nx, imbx, inbx, mbx, nbx, rsrcx, csrcx, incx, mpx, nqx, iprex, imidx, ipostx, igap, gapmul, info)
logical function pisinscope(ictxt, n, ix, jx, descx, incx)
double precision function pdlamch(ictxt, cmach)
subroutine pzerrdotu(errbnd, n, sclr, x, incx, y, incy, prec)
subroutine pzblas1tstchke(ltest, inout, nprocs)
subroutine pzerraxpy(errbnd, psclr, x, y, prec)
subroutine pzderrscal(errbnd, pusclr, x, prec)
subroutine pzbla1tstinfo(summry, nout, nmat, nval, mxval, nxval, imbxval, mbxval, inbxval, nbxval, rscxval, cscxval, ixval, jxval, incxval, myval, nyval, imbyval, mbyval, inbyval, nbyval, rscyval, cscyval, iyval, jyval, incyval, ldval, ngrids, pval, ldpval, qval, ldqval, ltest, sof, tee, iam, igap, iverb, nprocs, alpha, work)
subroutine pzerrdotc(errbnd, n, sclr, x, incx, y, incy, prec)
subroutine pzblas1tstchk(ictxt, nout, nrout, n, psclr, pusclr, pisclr, x, px, ix, jx, descx, incx, y, py, iy, jy, descy, incy, info)
subroutine pzerrasum(errbnd, n, usclr, x, incx, prec)
subroutine pzerrscal(errbnd, psclr, x, prec)
subroutine pzchkarg1(ictxt, nout, sname, n, alpha, ix, jx, descx, incx, iy, jy, descy, incy, info)
subroutine pzerrnrm2(errbnd, n, usclr, x, incx, prec)
subroutine pzmprnt(ictxt, nout, m, n, a, lda, irprnt, icprnt, cmatnm)
subroutine pzchkvin(errmax, n, x, px, ix, jx, descx, incx, info)
subroutine pzvecee(ictxt, nout, subptr, scode, sname)
subroutine pb_zchekpad(ictxt, mess, m, n, a, lda, ipre, ipost, chkval)
subroutine pb_zfillpad(ictxt, m, n, a, lda, ipre, ipost, chkval)
subroutine pzchkvout(n, x, px, ix, jx, descx, incx, info)
subroutine pb_pzlaprnt(m, n, a, ia, ja, desca, irprnt, icprnt, cmatnm, nout, work)
subroutine pzvprnt(ictxt, nout, n, x, incx, irprnt, icprnt, cvecnm)
subroutine pzlagen(inplace, aform, diag, offa, m, n, ia, ja, desca, iaseed, a, lda)
subroutine pzdimee(ictxt, nout, subptr, scode, sname)