1 SUBROUTINE pzlahqr( WANTT, WANTZ, N, ILO, IHI, A, DESCA, W, ILOZ,
2 $ IHIZ, Z, DESCZ, WORK, LWORK, IWORK, ILWORK,
14 INTEGER IHI, IHIZ, ILO, ILOZ, ILWORK, INFO, LWORK, N
17 INTEGER DESCA( * ), DESCZ( * ), IWORK( * )
18 COMPLEX*16 A( * ), W( * ), WORK( * ), Z( * )
249 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DT_,
250 $ LLD_, MB_, M_, NB_, N_, RSRC_
251 parameter( block_cyclic_2d = 1, dlen_ = 9, dt_ = 1,
252 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
253 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
254 DOUBLE PRECISION RONE
255 PARAMETER ( RONE = 1.0d+0 )
257 parameter( zero = ( 0.0d+0, 0.0d+0 ),
258 $ one = ( 1.0d+0, 0.0d+0 ) )
259 DOUBLE PRECISION CONST
260 PARAMETER ( CONST = 1.50d+0 )
262 parameter( iblk = 32 )
266 INTEGER CONTXT, DOWN, HBL, I, I1, I2, IAFIRST, IBULGE,
267 $ icbuf, icol, icol1, icol2, idia, ierr, ii,
268 $ irbuf, irow, irow1, irow2, ispec, istart,
269 $ istartcol, istartrow, istop, isub, isup,
270 $ itermax, itmp1, itmp2, itn, its, izbuf, j,
271 $ jafirst, jblk, jj, k, ki, l, lcmrc, lda, ldz,
272 $ left, lihih, lihiz, liloh, liloz, locali1,
273 $ locali2, localk, localm, m, modkm1, mycol,
274 $ myrow, nbulge, nh, node, npcol, nprow, nq, nr,
275 $ num, nz, right, rotn, up, vecsidx
276 DOUBLE PRECISION CS, OVFL, S, SMLNUM, ULP, UNFL
277 COMPLEX*16 CDUM, H10, H11, H22, H33, H43H34, H44, SN, SUM,
278 $ t1, t1copy, t2, t3, v1save, v2, v2save, v3,
282 INTEGER ICURCOL( IBLK ), ICURROW( IBLK ), K1( IBLK ),
283 $ K2( IBLK ), KCOL( IBLK ), KP2COL( IBLK ),
284 $ kp2row( iblk ), krow( iblk )
285 COMPLEX*16 S1( 2*IBLK, 2*IBLK ), SMALLA( 6, 6, IBLK ),
290 DOUBLE PRECISION PDLAMCH
291 EXTERNAL ilcm, numroc, pdlamch
294 EXTERNAL blacs_gridinfo, igamn2d, igebr2d, igebs2d,
297 $ zgebr2d, zgebs2d, zgerv2d, zgesd2d, zgsum2d,
302 INTRINSIC abs, dble, dconjg, dimag,
max,
min, mod
305 DOUBLE PRECISION CABS1
308 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
314 itermax = 30*( ihi-ilo+1 )
321 contxt = desca( ctxt_ )
323 iafirst = desca( rsrc_ )
324 jafirst = desca( csrc_ )
326 CALL blacs_gridinfo( contxt, nprow, npcol, myrow, mycol )
327 node = myrow*npcol + mycol
329 left = mod( mycol+npcol-1, npcol )
330 right = mod( mycol+1, npcol )
331 up = mod( myrow+nprow-1, nprow )
332 down = mod( myrow+1, nprow )
333 lcmrc = ilcm( nprow, npcol )
334 IF( ( nprow.LE.3 ) .OR. ( npcol.LE.3 ) )
THEN
342 nq = numroc( n, hbl, mycol, jafirst, npcol )
347 jj = 3*n +
max( 2*
max( lda, ldz )+2*nq, jj )
348 jj = jj +
max( 2*n, ( 8*lcmrc+2 )**2 )
349 IF( lwork.EQ.-1 )
THEN
353 IF( lwork.LT.jj )
THEN
356 IF( descz( ctxt_ ).NE.desca( ctxt_ ) )
THEN
357 info = -( 1300+ctxt_ )
359 IF( desca( mb_ ).NE.desca( nb_ ) )
THEN
362 IF( descz( mb_ ).NE.descz( nb_ ) )
THEN
365 IF( desca( mb_ ).NE.descz( mb_ ) )
THEN
368 IF( ( desca( rsrc_ ).NE.0 ) .OR. ( desca( csrc_ ).NE.0 ) )
THEN
369 info = -( 700+rsrc_ )
371 IF( ( descz( rsrc_ ).NE.0 ) .OR. ( descz( csrc_ ).NE.0 ) )
THEN
372 info = -( 1300+rsrc_ )
374 IF( ( ilo.GT.n ) .OR. ( ilo.LT.1 ) )
THEN
377 IF( ( ihi.GT.n ) .OR. ( ihi.LT.1 ) )
THEN
383 CALL igamn2d( contxt,
'ALL',
' ', 1, 1, info, 1, itmp1, itmp2, -1,
386 CALL pxerbla( contxt,
'PZLAHQR', -info )
403 rotn =
min( rotn, hbl-2 )
404 rotn =
max( rotn, 1 )
406 IF( ilo.EQ.ihi )
THEN
407 CALL infog2l( ilo, ilo, desca, nprow, npcol, myrow, mycol,
408 $ irow, icol, ii, jj )
409 IF( ( myrow.EQ.ii ) .AND. ( mycol.EQ.jj ) )
THEN
410 w( ilo ) = a( ( icol-1 )*lda+irow )
420 CALL infog1l( iloz, hbl, nprow, myrow, iafirst, liloz, lihiz )
421 lihiz = numroc( ihiz, hbl, myrow, iafirst, nprow )
426 unfl = pdlamch( contxt,
'SAFE MINIMUM' )
428 CALL pdlabad( contxt, unfl, ovfl )
429 ulp = pdlamch( contxt,
'PRECISION' )
430 smlnum = unfl*( nh / ulp )
466 CALL pzlasmsub( a, desca, i, l, k, smlnum, work( irbuf+1 ),
474 CALL infog2l( l, l-1, desca, nprow, npcol, myrow, mycol,
475 $ irow, icol, itmp1, itmp2 )
476 IF( ( myrow.EQ.itmp1 ) .AND. ( mycol.EQ.itmp2 ) )
THEN
477 a( ( icol-1 )*lda+irow ) = zero
479 work( isub+l-1 ) = zero
491 IF( l.GE.i-( 2*iblk-1 ) )
THEN
500 IF( .NOT.wantt )
THEN
508 jblk =
min( iblk, ( ( i-l+1 ) / 2 )-1 )
509 IF( jblk.GT.lcmrc )
THEN
513 jblk = jblk - mod( jblk, lcmrc )
515 jblk =
min( jblk, 2*lcmrc )
516 jblk =
max( jblk, 1 )
518 CALL pzlacp3( 2*jblk, i-2*jblk+1, a, desca, s1, 2*iblk, -1, -1,
520 IF( ( its.EQ.20 .OR. its.EQ.40 ) .AND. ( jblk.GT.1 ) )
THEN
524 DO 20 ii = 2*jblk, 2, -1
525 s1( ii, ii ) = const*( cabs1( s1( ii, ii ) )+
526 $ cabs1( s1( ii, ii-1 ) ) )
527 s1( ii, ii-1 ) = zero
528 s1( ii-1, ii ) = zero
530 s1( 1, 1 ) = const*cabs1( s1( 1, 1 ) )
532 CALL zlahqr2( .false., .false., 2*jblk, 1, 2*jblk, s1,
533 $ 2*iblk, work( irbuf+1 ), 1, 2*jblk, z, ldz,
538 h44 = s1( 2*jblk, 2*jblk )
539 h33 = s1( 2*jblk-1, 2*jblk-1 )
540 h43h34 = s1( 2*jblk-1, 2*jblk )*s1( 2*jblk, 2*jblk-1 )
547 CALL pzlaconsb( a, desca, i, l, m, h44, h33, h43h34,
548 $ work( irbuf+1 ), lwork-irbuf )
554 istop =
min( m+rotn-1-mod( m-( m / hbl )*hbl-1, rotn ), i-2 )
555 istop =
min( istop, m+hbl-3-mod( m-1, hbl ) )
556 istop =
min( istop, i2-2 )
557 istop =
max( istop, m )
558 nbulge = ( i-1-istop ) / hbl
562 nbulge =
min( nbulge, jblk )
563 IF( nbulge.GT.lcmrc )
THEN
567 nbulge = nbulge - mod( nbulge, lcmrc )
569 nbulge =
max( nbulge, 1 )
576 IF( ( nbulge.GT.1 ) .AND. ( m.GT.l ) )
THEN
580 CALL infog2l( m+2, m+2, desca, nprow, npcol, myrow, mycol,
581 $ irow1, icol1, itmp1, itmp2 )
582 ii =
min( 4*nbulge+2, n-m+2 )
583 CALL pzlacp3( ii, m-1, a, desca, work( irbuf+1 ), ii, itmp1,
585 IF( ( myrow.EQ.itmp1 ) .AND. ( mycol.EQ.itmp2 ) )
THEN
589 CALL zlamsh( s1, 2*iblk, nbulge, jblk, work( irbuf+1 ),
592 CALL igebs2d( contxt,
'ALL',
' ', 1, 1, nbulge, 1 )
598 CALL igebr2d( contxt,
'ALL',
' ', 1, 1, nbulge, 1, itmp1,
609 CALL infog1l( m, hbl, npcol, mycol, jafirst, itmp1, localk )
611 CALL infog1l( 1, hbl, npcol, mycol, jafirst, icol1, locali2 )
612 locali2 = numroc( i2, hbl, mycol, jafirst, npcol )
616 CALL infog1l( i1, hbl, nprow, myrow, iafirst, locali1, icol1 )
617 CALL infog1l( 1, hbl, nprow, myrow, iafirst, localm, icol1 )
618 icol1 = numroc(
min( m+3, i ), hbl, myrow, iafirst, nprow )
622 istartrow = mod( ( m+1 ) / hbl, nprow ) + iafirst
623 istartcol = mod( ( m+1 ) / hbl, npcol ) + jafirst
625 CALL infog1l( m, hbl, nprow, myrow, iafirst, ii, itmp2 )
626 CALL infog1l( m, hbl, npcol, mycol, jafirst, jj, itmp2 )
627 CALL infog1l( 1, hbl, nprow, myrow, iafirst, istop,
629 kp2row( 1 ) = numroc( m+2, hbl, myrow, iafirst, nprow )
630 CALL infog1l( 1, hbl, npcol, mycol, jafirst, istop,
632 kp2col( 1 ) = numroc( m+2, hbl, mycol, jafirst, npcol )
653 istop =
min( m+rotn-1-mod( m-( m / hbl )*hbl-1, rotn ),
655 istop =
min( istop, m+hbl-3-mod( m-1, hbl ) )
656 istop =
min( istop, i2-2 )
657 istop =
max( istop, m )
658 IF( ( mod( m-1, hbl ).EQ.hbl-2 ) .AND.
659 $ ( istop.LT.
min( i-2, i2-2 ) ) )
THEN
663 icurrow( ki ) = istartrow
664 icurcol( ki ) = istartcol
668 $ kp2row( ki ) = kp2row( 1 )
670 $ kp2col( ki ) = kp2col( 1 )
680 CALL pzlawil( itmp1, itmp2, m, a, desca, h44, h33, h43h34,
689 IF( k2( ibulge ).LE.i-1 )
THEN
691 IF( ( k1( ibulge ).GE.m+5 ) .AND. ( ibulge.LT.nbulge ) )
693 IF( ( mod( k2( ibulge )+2, hbl ).EQ.mod( k2( ibulge+1 )+
694 $ 2, hbl ) ) .AND. ( k1( 1 ).LE.i-1 ) )
THEN
695 h44 = s1( 2*jblk-2*ibulge, 2*jblk-2*ibulge )
696 h33 = s1( 2*jblk-2*ibulge-1, 2*jblk-2*ibulge-1 )
697 h43h34 = s1( 2*jblk-2*ibulge-1, 2*jblk-2*ibulge )*
698 $ s1( 2*jblk-2*ibulge, 2*jblk-2*ibulge-1 )
701 CALL pzlawil( itmp1, itmp2, m, a, desca, h44, h33,
717 DO 120 ki = 1, ibulge
719 istart =
max( k1( ki ), m )
720 istop =
min( k2( ki ), i-1 )
722 modkm1 = mod( k-1, hbl )
723 IF( ( modkm1.GE.hbl-2 ) .AND. ( k.LE.i-1 ) )
THEN
726 smalla(itmp1, itmp2, ki) = zero
729 IF( ( modkm1.EQ.hbl-2 ) .AND. ( k.LT.i-1 ) )
THEN
733 itmp1 = icurrow( ki )
734 itmp2 = icurcol( ki )
736 $ smalla( 1, 1, ki ), 6, itmp1, itmp2,
739 IF( modkm1.EQ.hbl-1 )
THEN
743 CALL infog2l( k+1, k+1, desca, nprow, npcol, myrow,
744 $ mycol, irow1, icol1, itmp1, itmp2 )
746 $ smalla( 1, 1, ki ), 6, itmp1, itmp2,
786 IF( ( myrow.EQ.icurrow( ki ) ) .AND.
787 $ ( mycol.EQ.icurcol( ki ) ) .AND.
788 $ ( modkm1.EQ.hbl-2 ) .AND.
789 $ ( istart.LT.
min( i-1, istop+1 ) ) )
THEN
793 CALL zcopy( nr, smalla( 2, 1, ki ), 1, vcopy, 1 )
799 CALL zlarfg( nr, vcopy( 1 ), vcopy( 2 ), 1, t1copy )
801 smalla( 2, 1, ki ) = vcopy( 1 )
802 smalla( 3, 1, ki ) = zero
804 $ smalla( 4, 1, ki ) = zero
805 ELSE IF( m.GT.l )
THEN
809 smalla( 2, 1, ki ) = smalla( 2, 1, ki ) -
815 work( vecsidx+( k-1 )*3+1 ) = vcopy( 2 )
816 work( vecsidx+( k-1 )*3+2 ) = vcopy( 3 )
817 work( vecsidx+( k-1 )*3+3 ) = t1copy
825 itmp1 =
min( 6, i2+2-k )
826 itmp2 =
max( i1-k+2, 1 )
828 sum = dconjg( t1 )*smalla( 2, j, ki ) +
829 $ dconjg( t2 )*smalla( 3, j, ki ) +
830 $ dconjg( t3 )*smalla( 4, j, ki )
831 smalla( 2, j, ki ) = smalla( 2, j, ki ) - sum
832 smalla( 3, j, ki ) = smalla( 3, j, ki ) - sum*v2
833 smalla( 4, j, ki ) = smalla( 4, j, ki ) - sum*v3
836 sum = t1*smalla( j, 2, ki ) +
837 $ t2*smalla( j, 3, ki ) +
838 $ t3*smalla( j, 4, ki )
839 smalla( j, 2, ki ) = smalla( j, 2, ki ) - sum
840 smalla( j, 3, ki ) = smalla( j, 3, ki ) -
842 smalla( j, 4, ki ) = smalla( j, 4, ki ) -
848 IF( ( mod( istop-1, hbl ).EQ.hbl-1 ) .AND.
849 $ ( myrow.EQ.icurrow( ki ) ) .AND.
850 $ ( mycol.EQ.icurcol( ki ) ) .AND.
851 $ ( istart.LE.
min( i, istop ) ) )
THEN
855 CALL zcopy( nr, smalla( 3, 2, ki ), 1, vcopy, 1 )
861 CALL zlarfg( nr, vcopy( 1 ), vcopy( 2 ), 1, t1copy )
863 smalla( 3, 2, ki ) = vcopy( 1 )
864 smalla( 4, 2, ki ) = zero
866 $ smalla( 5, 2, ki ) = zero
870 IF( ( k-2.GT.m ) .AND. ( mod( k-1, hbl ).GT.1 ) )
872 h11 = smalla( 1, 1, ki )
873 h10 = smalla( 2, 1, ki )
874 h22 = smalla( 2, 2, ki )
875 s = cabs1( h11 ) + cabs1( h22 )
876 IF( cabs1( h10 ).LE.
max( ulp*s, smlnum ) )
THEN
877 smalla( 2, 1, ki ) = zero
880 ELSE IF( m.GT.l )
THEN
884 smalla( 3, 2, ki ) = smalla( 3, 2, ki ) -
890 work( vecsidx+( k-1 )*3+1 ) = vcopy( 2 )
891 work( vecsidx+( k-1 )*3+2 ) = vcopy( 3 )
892 work( vecsidx+( k-1 )*3+3 ) = t1copy
900 itmp1 =
min( 6, i2-k+3 )
901 itmp2 =
max( i1-k+3, 1 )
903 sum = dconjg( t1 )*smalla( 3, j, ki ) +
904 $ dconjg( t2 )*smalla( 4, j, ki ) +
905 $ dconjg( t3 )*smalla( 5, j, ki )
906 smalla( 3, j, ki ) = smalla( 3, j, ki ) - sum
907 smalla( 4, j, ki ) = smalla( 4, j, ki ) - sum*v2
908 smalla( 5, j, ki ) = smalla( 5, j, ki ) - sum*v3
911 sum = t1*smalla( j, 3, ki ) +
912 $ t2*smalla( j, 4, ki ) +
913 $ t3*smalla( j, 5, ki )
914 smalla( j, 3, ki ) = smalla( j, 3, ki ) - sum
915 smalla( j, 4, ki ) = smalla( j, 4, ki ) -
917 smalla( j, 5, ki ) = smalla( j, 5, ki ) -
923 IF( ( modkm1.EQ.0 ) .AND. ( istart.LE.i-1 ) .AND.
924 $ ( myrow.EQ.icurrow( ki ) ) .AND.
925 $ ( right.EQ.icurcol( ki ) ) )
THEN
935 IF( istart.GT.m )
THEN
936 vcopy( 1 ) = smalla( 4, 3, ki )
937 vcopy( 2 ) = smalla( 5, 3, ki )
938 vcopy( 3 ) = smalla( 6, 3, ki )
939 nr =
min( 3, i-istart+1 )
940 CALL zlarfg( nr, vcopy( 1 ), vcopy( 2 ), 1,
942 a( ( icol1-2 )*lda+irow1 ) = vcopy( 1 )
943 a( ( icol1-2 )*lda+irow1+1 ) = zero
944 IF( istart.LT.i-1 )
THEN
945 a( ( icol1-2 )*lda+irow1+2 ) = zero
951 nr =
min( 3, i-istart+1 )
952 IF( npcol.EQ.1 )
THEN
960 CALL zgerv2d( contxt, 3, 1, vcopy, 3, myrow,
963 CALL zlarfg( nr, vcopy( 1 ), vcopy( 2 ), 1,
969 a( ( icol1-2 )*lda+irow1 ) = a( ( icol1-2 )*lda+
970 $ irow1 )*dconjg( one-t1copy )
975 IF( ( myrow.EQ.icurrow( ki ) ) .AND.
976 $ ( mycol.EQ.icurcol( ki ) ) .AND.
977 $ ( ( ( modkm1.EQ.hbl-2 ) .AND. ( istart.EQ.i-
978 $ 1 ) ) .OR. ( ( modkm1.LT.hbl-2 ) .AND. ( istart.LE.i-
985 DO 110 k = istart, istop
991 IF( mod( k-1, hbl ).EQ.0 )
THEN
992 vcopy( 1 ) = smalla( 4, 3, ki )
993 vcopy( 2 ) = smalla( 5, 3, ki )
994 vcopy( 3 ) = smalla( 6, 3, ki )
996 vcopy( 1 ) = a( ( icol1-2 )*lda+irow1 )
997 vcopy( 2 ) = a( ( icol1-2 )*lda+irow1+1 )
999 vcopy( 3 ) = a( ( icol1-2 )*lda+irow1+2 )
1010 IF( npcol.GT.1 .AND. istart.LE.m .AND.
1011 $ mod( k-1, hbl ).EQ.0 )
THEN
1012 CALL zgesd2d( contxt, 3, 1, vcopy, 3, myrow,
1015 CALL zlarfg( nr, vcopy( 1 ), vcopy( 2 ), 1,
1018 IF( mod( k-1, hbl ).GT.0 )
THEN
1019 a( ( icol1-2 )*lda+irow1 ) = vcopy( 1 )
1020 a( ( icol1-2 )*lda+irow1+1 ) = zero
1022 a( ( icol1-2 )*lda+irow1+2 ) = zero
1027 IF( ( irow1.GT.2 ) .AND. ( icol1.GT.2 ) .AND.
1028 $ ( k-2.GT.m ) .AND. ( mod( k-1,
1029 $ hbl ).GT.1 ) )
THEN
1030 h11 = a( ( icol1-3 )*lda+irow1-2 )
1031 h10 = a( ( icol1-3 )*lda+irow1-1 )
1032 h22 = a( ( icol1-2 )*lda+irow1-1 )
1033 s = cabs1( h11 ) + cabs1( h22 )
1034 IF( cabs1( h10 ).LE.
max( ulp*s, smlnum ) )
1036 a( ( icol1-3 )*lda+irow1-1 ) = zero
1040 ELSE IF( m.GT.l )
THEN
1041 IF( mod( k-1, hbl ).GT.0 )
THEN
1045 a( ( icol1-2 )*lda+irow1 ) = a( ( icol1-2 )*
1046 $ lda+irow1 )*dconjg( one-t1copy )
1051 work( vecsidx+( k-1 )*3+1 ) = vcopy( 2 )
1052 work( vecsidx+( k-1 )*3+2 ) = vcopy( 3 )
1053 work( vecsidx+( k-1 )*3+3 ) = t1copy
1055 IF( k.LT.istop )
THEN
1061 DO 90 j = ( icol1-1 )*lda + irow1,
1062 $ (
min( k2( ki )+1, i-1 )+icol1-k-1 )*
1064 sum = dconjg( t1 )*a( j ) +
1065 $ dconjg( t2 )*a( j+1 ) +
1066 $ dconjg( t3 )*a( j+2 )
1067 a( j ) = a( j ) - sum
1068 a( j+1 ) = a( j+1 ) - sum*v2
1069 a( j+2 ) = a( j+2 ) - sum*v3
1071 DO 100 j = irow1 + 1, irow1 + 3
1072 sum = t1*a( ( icol1-1 )*lda+j ) +
1073 $ t2*a( icol1*lda+j ) +
1074 $ t3*a( ( icol1+1 )*lda+j )
1075 a( ( icol1-1 )*lda+j ) = a( ( icol1-1 )*lda+
1077 a( icol1*lda+j ) = a( icol1*lda+j ) -
1079 a( ( icol1+1 )*lda+j ) = a( ( icol1+1 )*lda+
1080 $ j ) - sum*dconjg( v3 )
1092 DO 130 ki = 1, ibulge
1094 istart =
max( k1( ki ), m )
1095 istop =
min( k2( ki ), i-1 )
1099 IF( ( myrow.EQ.icurrow( ki ) ) .AND. ( npcol.GT.1 ) .AND.
1100 $ ( istart.LE.istop ) )
THEN
1101 IF( mycol.NE.icurcol( ki ) )
THEN
1102 CALL zgebr2d( contxt,
'ROW',
' ',
1103 $ 3*( istop-istart+1 ), 1,
1104 $ work( vecsidx+( istart-1 )*3+1 ),
1105 $ 3*( istop-istart+1 ), myrow,
1108 CALL zgebs2d( contxt,
'ROW',
' ',
1109 $ 3*( istop-istart+1 ), 1,
1110 $ work( vecsidx+( istart-1 )*3+1 ),
1111 $ 3*( istop-istart+1 ) )
1118 DO 140 ki = 1, ibulge
1120 istart =
max( k1( ki ), m )
1121 istop =
min( k2( ki ), i-1 )
1123 IF( ( mycol.EQ.icurcol( ki ) ) .AND. ( nprow.GT.1 ) .AND.
1124 $ ( istart.LE.istop ) )
THEN
1125 IF( myrow.NE.icurrow( ki ) )
THEN
1126 CALL zgebr2d( contxt,
'COL',
' ',
1127 $ 3*( istop-istart+1 ), 1,
1128 $ work( vecsidx+( istart-1 )*3+1 ),
1129 $ 3*( istop-istart+1 ), icurrow( ki ),
1132 CALL zgebs2d( contxt,
'COL',
' ',
1133 $ 3*( istop-istart+1 ), 1,
1134 $ work( vecsidx+( istart-1 )*3+1 ),
1135 $ 3*( istop-istart+1 ) )
1143 DO 160 ki = 1, ibulge
1144 istart =
max( k1( ki ), m )
1145 istop =
min( k2( ki ), i-1 )
1147 modkm1 = mod( istart-1, hbl )
1148 IF( ( myrow.EQ.icurrow( ki ) ) .AND.
1149 $ ( mycol.EQ.icurcol( ki ) ) .AND.
1150 $ ( ( ( modkm1.EQ.hbl-2 ) .AND. ( istart.EQ.i-
1151 $ 1 ) ) .OR. ( ( modkm1.LT.hbl-2 ) .AND. ( istart.LE.i-
1158 DO 150 k = istart, istop
1162 nr =
min( 3, i-k+1 )
1163 v2 = work( vecsidx+( k-1 )*3+1 )
1164 v3 = work( vecsidx+( k-1 )*3+2 )
1165 t1 = work( vecsidx+( k-1 )*3+3 )
1167 IF( k.LT.istop )
THEN
1172 CALL zlaref(
'Col', a, lda, .false., z, ldz,
1173 $ .false., icol1, icol1, istart,
1174 $ istop,
min( istart+1, i )-k+irow1,
1175 $ irow1, liloz, lihiz,
1176 $ work( vecsidx+1 ), v2, v3, t1, t2,
1181 IF( ( nr.EQ.3 ) .AND. ( mod( k-1,
1182 $ hbl ).LT.hbl-2 ) )
THEN
1184 CALL zlaref(
'Row', a, lda, .false., z, ldz,
1185 $ .false., irow1, irow1, istart,
1186 $ istop, icol1,
min(
min( k2( ki )
1187 $ +1, i-1 ), i2 )-k+icol1, liloz,
1188 $ lihiz, work( vecsidx+1 ), v2,
1198 modkm1 = mod( k-1, hbl )
1199 IF( ( modkm1.GE.hbl-2 ) .AND. ( k.LE.i-1 ) )
THEN
1200 IF( ( modkm1.EQ.hbl-2 ) .AND. ( k.LT.i-1 ) )
THEN
1204 itmp1 = icurrow( ki )
1205 itmp2 = icurcol( ki )
1206 CALL pzlacp3(
min( 6, n-k+2 ), k-1, a, desca,
1207 $ smalla( 1, 1, ki ), 6, itmp1, itmp2,
1211 IF( modkm1.EQ.hbl-1 )
THEN
1215 itmp1 = icurrow( ki )
1216 itmp2 = icurcol( ki )
1217 CALL pzlacp3(
min( 6, n-k+3 ), k-2, a, desca,
1218 $ smalla( 1, 1, ki ), 6, itmp1, itmp2,
1229 DO 180 ki = 1, ibulge
1230 IF( ( myrow.NE.icurrow( ki ) ) .AND.
1231 $ ( down.NE.icurrow( ki ) ) )
GO TO 180
1232 istart =
max( k1( ki ), m )
1233 istop =
min( k2( ki ), i-1 )
1235 IF( ( istop.GT.istart ) .AND.
1236 $ ( mod( istart-1, hbl ).LT.hbl-2 ) .AND.
1237 $ ( icurrow( ki ).EQ.myrow ) )
THEN
1238 irow1 =
min( k2( ki )+1, i-1 ) + 1
1239 CALL infog1l( irow1, hbl, npcol, mycol, jafirst,
1243 CALL zlaref(
'Row', a, lda, wantz, z, ldz, .true., ii,
1244 $ ii, istart, istop, itmp1, itmp2, liloz,
1245 $ lihiz, work( vecsidx+1 ), v2, v3, t1, t2,
1250 DO 220 ki = 1, ibulge
1251 IF( krow( ki ).GT.kp2row( ki ) )
1253 IF( ( myrow.NE.icurrow( ki ) ) .AND.
1254 $ ( down.NE.icurrow( ki ) ) )
GO TO 220
1255 istart =
max( k1( ki ), m )
1256 istop =
min( k2( ki ), i-1 )
1257 IF( ( istart.EQ.istop ) .OR.
1258 $ ( mod( istart-1, hbl ).GE.hbl-2 ) .OR.
1259 $ ( icurrow( ki ).NE.myrow ) )
THEN
1260 DO 210 k = istart, istop
1261 v2 = work( vecsidx+( k-1 )*3+1 )
1262 v3 = work( vecsidx+( k-1 )*3+2 )
1263 t1 = work( vecsidx+( k-1 )*3+3 )
1264 nr =
min( 3, i-k+1 )
1265 IF( ( nr.EQ.3 ) .AND. ( krow( ki ).LE.
1266 $ kp2row( ki ) ) )
THEN
1267 IF( ( k.LT.istop ) .AND.
1268 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
1269 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1271 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1272 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1274 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1275 itmp1 =
min( k+4, i2 ) + 1
1277 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1278 itmp1 =
min( k+3, i2 ) + 1
1285 irow2 = kp2row( ki )
1286 IF( ( k.GT.istart ) .AND.
1287 $ ( mod( k-1, hbl ).GE.hbl-2 ) )
THEN
1288 IF( down.EQ.icurrow( ki ) )
THEN
1291 IF( myrow.EQ.icurrow( ki ) )
THEN
1295 CALL infog1l( itmp1, hbl, npcol, mycol, jafirst,
1298 IF( ( mod( k-1, hbl ).LT.hbl-2 ) .OR.
1299 $ ( nprow.EQ.1 ) )
THEN
1302 CALL zlaref(
'Row', a, lda, wantz, z, ldz,
1303 $ .false., irow1, irow1, istart,
1304 $ istop, icol1, icol2, liloz,
1305 $ lihiz, work( vecsidx+1 ), v2,
1308 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
1309 $ ( nprow.GT.1 ) )
THEN
1310 IF( irow1.NE.irow2 )
THEN
1311 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1312 $ a( ( icol1-1 )*lda+irow1 ),
1313 $ lda, down, mycol )
1314 IF( skip .AND. ( istart.EQ.istop ) )
THEN
1315 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1316 $ a( ( icol1-1 )*lda+
1317 $ irow1 ), lda, down,
1320 ELSE IF( skip )
THEN
1321 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1322 $ work( irbuf+1 ), 2, up,
1326 DO 190 j = icol1, icol2
1328 $ work( irbuf+2*( j-icol1 )+1 ) +
1329 $ dconjg( t2 )*work( irbuf+2*
1331 $ dconjg( t3 )*a( ( j-1 )*lda+
1333 work( irbuf+2*( j-icol1 )+1 )
1334 $ = work( irbuf+2*( j-icol1 )+1 ) -
1336 work( irbuf+2*( j-icol1 )+2 )
1337 $ = work( irbuf+2*( j-icol1 )+2 ) -
1339 a( ( j-1 )*lda+irow1 ) = a( ( j-1 )*
1340 $ lda+irow1 ) - sum*v3
1342 IF( istart.EQ.istop )
THEN
1343 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1344 $ work( irbuf+1 ), 2, up,
1349 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
1350 $ ( nprow.GT.1 ) )
THEN
1351 IF( irow1.EQ.irow2 )
THEN
1352 IF( istart.EQ.istop )
THEN
1353 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1354 $ a( ( icol1-1 )*lda+irow1-
1355 $ 1 ), lda, down, mycol )
1358 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1359 $ a( ( icol1-1 )*lda+irow1-
1360 $ 1 ), lda, down, mycol )
1362 ELSE IF( skip )
THEN
1363 IF( istart.EQ.istop )
THEN
1364 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1365 $ work( irbuf+1 ), 2, up,
1370 DO 200 j = icol1, icol2
1372 $ work( irbuf+2*( j-icol1 )+2 ) +
1373 $ dconjg( t2 )*a( ( j-1 )*lda+
1374 $ irow1 ) + dconjg( t3 )*
1375 $ a( ( j-1 )*lda+irow1+1 )
1376 work( irbuf+2*( j-icol1 )+2 )
1377 $ = work( irbuf+2*( j-icol1 )+2 ) -
1379 a( ( j-1 )*lda+irow1 ) = a( ( j-1 )*
1380 $ lda+irow1 ) - sum*v2
1381 a( ( j-1 )*lda+irow1+1 ) = a( ( j-1 )*
1382 $ lda+irow1+1 ) - sum*v3
1384 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1385 $ work( irbuf+1 ), 2, up,
1398 DO 260 ki = 1, ibulge
1399 IF( krow( ki ).GT.kp2row( ki ) )
1401 IF( ( myrow.NE.icurrow( ki ) ) .AND.
1402 $ ( down.NE.icurrow( ki ) ) )
GO TO 260
1403 istart =
max( k1( ki ), m )
1404 istop =
min( k2( ki ), i-1 )
1405 IF( ( istart.EQ.istop ) .OR.
1406 $ ( mod( istart-1, hbl ).GE.hbl-2 ) .OR.
1407 $ ( icurrow( ki ).NE.myrow ) )
THEN
1408 DO 250 k = istart, istop
1409 v2 = work( vecsidx+( k-1 )*3+1 )
1410 v3 = work( vecsidx+( k-1 )*3+2 )
1411 t1 = work( vecsidx+( k-1 )*3+3 )
1412 nr =
min( 3, i-k+1 )
1413 IF( ( nr.EQ.3 ) .AND. ( krow( ki ).LE.
1414 $ kp2row( ki ) ) )
THEN
1415 IF( ( k.LT.istop ) .AND.
1416 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
1417 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1419 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1420 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1422 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1423 itmp1 =
min( k+4, i2 ) + 1
1425 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1426 itmp1 =
min( k+3, i2 ) + 1
1433 irow2 = kp2row( ki )
1434 IF( ( k.GT.istart ) .AND.
1435 $ ( mod( k-1, hbl ).GE.hbl-2 ) )
THEN
1436 IF( down.EQ.icurrow( ki ) )
THEN
1439 IF( myrow.EQ.icurrow( ki ) )
THEN
1443 CALL infog1l( itmp1, hbl, npcol, mycol, jafirst,
1446 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
1447 $ ( nprow.GT.1 ) )
THEN
1448 IF( irow1.EQ.irow2 )
THEN
1449 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1450 $ work( irbuf+1 ), 2, up,
1454 DO 230 j = icol1, icol2
1456 $ work( irbuf+2*( j-icol1 )+1 ) +
1457 $ dconjg( t2 )*work( irbuf+2*
1459 $ dconjg( t3 )*a( ( j-1 )*lda+
1461 work( irbuf+2*( j-icol1 )+1 )
1462 $ = work( irbuf+2*( j-icol1 )+1 ) -
1464 work( irbuf+2*( j-icol1 )+2 )
1465 $ = work( irbuf+2*( j-icol1 )+2 ) -
1467 a( ( j-1 )*lda+irow1 ) = a( ( j-1 )*
1468 $ lda+irow1 ) - sum*v3
1470 IF( istart.EQ.istop )
THEN
1471 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1472 $ work( irbuf+1 ), 2, up,
1477 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
1478 $ ( nprow.GT.1 ) )
THEN
1479 IF( irow1.NE.irow2 )
THEN
1480 IF( istart.EQ.istop )
THEN
1481 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1482 $ work( irbuf+1 ), 2, up,
1487 DO 240 j = icol1, icol2
1489 $ work( irbuf+2*( j-icol1 )+2 ) +
1490 $ dconjg( t2 )*a( ( j-1 )*lda+
1491 $ irow1 ) + dconjg( t3 )*
1492 $ a( ( j-1 )*lda+irow1+1 )
1493 work( irbuf+2*( j-icol1 )+2 )
1494 $ = work( irbuf+2*( j-icol1 )+2 ) -
1496 a( ( j-1 )*lda+irow1 ) = a( ( j-1 )*
1497 $ lda+irow1 ) - sum*v2
1498 a( ( j-1 )*lda+irow1+1 ) = a( ( j-1 )*
1499 $ lda+irow1+1 ) - sum*v3
1501 CALL zgesd2d( contxt, 2, icol2-icol1+1,
1502 $ work( irbuf+1 ), 2, up,
1511 DO 280 ki = 1, ibulge
1512 IF( krow( ki ).GT.kp2row( ki ) )
1514 IF( ( myrow.NE.icurrow( ki ) ) .AND.
1515 $ ( down.NE.icurrow( ki ) ) )
GO TO 280
1516 istart =
max( k1( ki ), m )
1517 istop =
min( k2( ki ), i-1 )
1518 IF( ( istart.EQ.istop ) .OR.
1519 $ ( mod( istart-1, hbl ).GE.hbl-2 ) .OR.
1520 $ ( icurrow( ki ).NE.myrow ) )
THEN
1521 DO 270 k = istart, istop
1522 v2 = work( vecsidx+( k-1 )*3+1 )
1523 v3 = work( vecsidx+( k-1 )*3+2 )
1524 t1 = work( vecsidx+( k-1 )*3+3 )
1525 nr =
min( 3, i-k+1 )
1526 IF( ( nr.EQ.3 ) .AND. ( krow( ki ).LE.
1527 $ kp2row( ki ) ) )
THEN
1528 IF( ( k.LT.istop ) .AND.
1529 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
1530 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1532 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1533 itmp1 =
min( k2( ki )+1, i-1 ) + 1
1535 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1536 itmp1 =
min( k+4, i2 ) + 1
1538 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1539 itmp1 =
min( k+3, i2 ) + 1
1546 irow2 = kp2row( ki )
1547 IF( ( k.GT.istart ) .AND.
1548 $ ( mod( k-1, hbl ).GE.hbl-2 ) )
THEN
1549 IF( down.EQ.icurrow( ki ) )
THEN
1552 IF( myrow.EQ.icurrow( ki ) )
THEN
1556 CALL infog1l( itmp1, hbl, npcol, mycol, jafirst,
1559 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
1560 $ ( nprow.GT.1 ) )
THEN
1561 IF( irow1.NE.irow2 )
THEN
1562 IF( istart.EQ.istop )
THEN
1563 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1564 $ a( ( icol1-1 )*lda+
1565 $ irow1 ), lda, down,
1570 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
1571 $ ( nprow.GT.1 ) )
THEN
1572 IF( irow1.EQ.irow2 )
THEN
1573 CALL zgerv2d( contxt, 2, icol2-icol1+1,
1574 $ a( ( icol1-1 )*lda+irow1-
1575 $ 1 ), lda, down, mycol )
1587 DO 300 ki = 1, ibulge
1588 IF( ( mycol.NE.icurcol( ki ) ) .AND.
1589 $ ( right.NE.icurcol( ki ) ) )
GO TO 300
1590 istart =
max( k1( ki ), m )
1591 istop =
min( k2( ki ), i-1 )
1593 IF( ( ( mod( istart-1, hbl ).LT.hbl-2 ) .OR. ( npcol.EQ.
1594 $ 1 ) ) .AND. ( icurcol( ki ).EQ.mycol ) .AND.
1595 $ ( i-istop+1.GE.3 ) )
THEN
1597 IF( ( k.LT.istop ) .AND. ( mod( k-1,
1598 $ hbl ).LT.hbl-2 ) )
THEN
1599 itmp1 =
min( istart+1, i ) - 1
1601 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1602 itmp1 =
min( k+3, i )
1604 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1605 itmp1 =
max( i1, k-1 ) - 1
1607 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1608 itmp1 =
max( i1, k-2 ) - 1
1613 CALL infog1l( i1, hbl, nprow, myrow, iafirst, irow1,
1615 irow2 = numroc( itmp1, hbl, myrow, iafirst, nprow )
1616 IF( irow1.LE.irow2 )
THEN
1621 CALL zlaref(
'Col', a, lda, wantz, z, ldz, .true.,
1622 $ icol1, icol1, istart, istop, irow1,
1623 $ irow2, liloz, lihiz, work( vecsidx+1 ),
1624 $ v2, v3, t1, t2, t3 )
1626 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1630 IF( mod( k-1, hbl ).LT.hbl-3 )
THEN
1632 IF( mod( ( itmp1 / hbl ), nprow ).EQ.myrow )
1634 IF( itmp2.GT.0 )
THEN
1635 irow2 = itmp2 +
min( k+3, i ) - itmp1
1643 CALL infog1l( itmp1+1, hbl, nprow, myrow,
1644 $ iafirst, irow1, irow2 )
1645 irow2 = numroc(
min( k+3, i ), hbl, myrow,
1648 v2 = work( vecsidx+( k-1 )*3+1 )
1649 v3 = work( vecsidx+( k-1 )*3+2 )
1650 t1 = work( vecsidx+( k-1 )*3+3 )
1653 icol1 = kcol( ki ) + istop - istart
1654 CALL zlaref(
'Col', a, lda, .false., z, ldz,
1655 $ .false., icol1, icol1, istart, istop,
1656 $ irow1, irow2, liloz, lihiz,
1657 $ work( vecsidx+1 ), v2, v3, t1, t2,
1663 DO 360 ki = 1, ibulge
1664 IF( kcol( ki ).GT.kp2col( ki ) )
1666 IF( ( mycol.NE.icurcol( ki ) ) .AND.
1667 $ ( right.NE.icurcol( ki ) ) )
GO TO 360
1668 istart =
max( k1( ki ), m )
1669 istop =
min( k2( ki ), i-1 )
1670 IF( mod( istart-1, hbl ).GE.hbl-2 )
THEN
1681 DO 350 k = istart, istop
1683 v2 = work( vecsidx+( k-1 )*3+1 )
1684 v3 = work( vecsidx+( k-1 )*3+2 )
1685 t1 = work( vecsidx+( k-1 )*3+3 )
1686 nr =
min( 3, i-k+1 )
1687 IF( ( nr.EQ.3 ) .AND. ( kcol( ki ).LE.kp2col( ki ) ) )
1690 IF( ( k.LT.istop ) .AND.
1691 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
1692 itmp1 =
min( istart+1, i ) - 1
1694 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1695 itmp1 =
min( k+3, i )
1697 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1698 itmp1 =
max( i1, k-1 ) - 1
1700 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1701 itmp1 =
max( i1, k-2 ) - 1
1704 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1705 icol1 = kcol( ki ) + k - istart
1706 icol2 = kp2col( ki ) + k - istart
1709 icol2 = kp2col( ki )
1710 IF( k.GT.istart )
THEN
1711 IF( right.EQ.icurcol( ki ) )
THEN
1714 IF( mycol.EQ.icurcol( ki ) )
THEN
1719 CALL infog1l( i1, hbl, nprow, myrow, iafirst,
1721 irow2 = numroc( itmp1, hbl, myrow, iafirst, nprow )
1722 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
1723 $ ( npcol.GT.1 ) )
THEN
1724 IF( icol1.NE.icol2 )
THEN
1725 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1726 $ a( ( icol1-1 )*lda+irow1 ),
1727 $ lda, myrow, right )
1728 IF( ( istart.EQ.istop ) .AND. skip )
THEN
1729 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1730 $ a( ( icol1-1 )*lda+irow1 ),
1731 $ lda, myrow, right )
1733 ELSE IF( skip )
THEN
1736 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1737 $ work( icbuf+1 ), irow2-irow1+1,
1739 ii = icbuf - irow1 + 1
1740 jj = icbuf + irow2 - 2*irow1 + 2
1741 DO 310 j = irow1, irow2
1742 sum = t1*work( ii+j ) + t2*work( jj+j ) +
1743 $ t3*a( ( icol1-1 )*lda+j )
1744 work( ii+j ) = work( ii+j ) - sum
1745 work( jj+j ) = work( jj+j ) -
1747 a( ( icol1-1 )*lda+j ) = a( ( icol1-1 )*
1748 $ lda+j ) - sum*dconjg( v3 )
1750 IF( istart.EQ.istop )
THEN
1751 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1753 $ irow2-irow1+1, myrow, left )
1757 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
1758 $ ( npcol.GT.1 ) )
THEN
1759 IF( icol1.EQ.icol2 )
THEN
1760 IF( istart.EQ.istop )
THEN
1761 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1762 $ a( ( icol1-2 )*lda+irow1 ),
1763 $ lda, myrow, right )
1766 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1767 $ a( ( icol1-2 )*lda+irow1 ),
1768 $ lda, myrow, right )
1770 ELSE IF( skip )
THEN
1771 IF( istart.EQ.istop )
THEN
1772 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1774 $ irow2-irow1+1, myrow, left )
1778 ii = icbuf + irow2 - 2*irow1 + 2
1779 DO 320 j = irow1, irow2
1780 sum = t1*work( j+ii ) +
1781 $ t2*a( ( icol1-1 )*lda+j ) +
1782 $ t3*a( icol1*lda+j )
1783 work( j+ii ) = work( j+ii ) - sum
1784 a( ( icol1-1 )*lda+j ) = a( ( icol1-1 )*
1785 $ lda+j ) - sum*dconjg( v2 )
1786 a( icol1*lda+j ) = a( icol1*lda+j ) -
1789 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1790 $ work( icbuf+1 ), irow2-irow1+1,
1797 IF( ( wantz ) .AND. ( mod( k-1,
1798 $ hbl ).GE.hbl-2 ) .AND. ( npcol.GT.1 ) )
THEN
1804 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1805 IF( icol1.NE.icol2 )
THEN
1806 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1807 $ z( ( icol1-1 )*ldz+irow1 ),
1808 $ ldz, myrow, right )
1809 IF( ( istart.EQ.istop ) .AND. skip )
THEN
1810 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1811 $ z( ( icol1-1 )*ldz+
1812 $ irow1 ), ldz, myrow,
1815 ELSE IF( skip )
THEN
1816 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1818 $ irow2-irow1+1, myrow, left )
1821 icol1 = ( icol1-1 )*ldz
1822 ii = izbuf - irow1 + 1
1823 jj = izbuf + irow2 - 2*irow1 + 2
1824 DO 330 j = irow1, irow2
1825 sum = t1*work( ii+j ) +
1826 $ t2*work( jj+j ) + t3*z( icol1+j )
1827 work( ii+j ) = work( ii+j ) - sum
1828 work( jj+j ) = work( jj+j ) -
1830 z( icol1+j ) = z( icol1+j ) -
1833 IF( istart.EQ.istop )
THEN
1834 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1836 $ irow2-irow1+1, myrow,
1841 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1842 IF( icol1.EQ.icol2 )
THEN
1843 IF( istart.EQ.istop )
THEN
1844 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1845 $ z( ( icol1-2 )*ldz+
1846 $ irow1 ), ldz, myrow,
1850 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1851 $ z( ( icol1-2 )*ldz+
1852 $ irow1 ), ldz, myrow,
1855 ELSE IF( skip )
THEN
1856 IF( istart.EQ.istop )
THEN
1857 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1859 $ irow2-irow1+1, myrow,
1864 icol1 = ( icol1-1 )*ldz
1865 ii = izbuf + irow2 - 2*irow1 + 2
1866 DO 340 j = irow1, irow2
1867 sum = t1*work( ii+j ) +
1869 $ t3*z( j+icol1+ldz )
1870 work( ii+j ) = work( ii+j ) - sum
1871 z( j+icol1 ) = z( j+icol1 ) -
1873 z( j+icol1+ldz ) = z( j+icol1+ldz ) -
1876 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1878 $ irow2-irow1+1, myrow, left )
1889 DO 420 ki = 1, ibulge
1890 IF( kcol( ki ).GT.kp2col( ki ) )
1892 IF( ( mycol.NE.icurcol( ki ) ) .AND.
1893 $ ( right.NE.icurcol( ki ) ) )
GO TO 420
1894 istart =
max( k1( ki ), m )
1895 istop =
min( k2( ki ), i-1 )
1896 IF( mod( istart-1, hbl ).GE.hbl-2 )
THEN
1907 DO 410 k = istart, istop
1909 v2 = work( vecsidx+( k-1 )*3+1 )
1910 v3 = work( vecsidx+( k-1 )*3+2 )
1911 t1 = work( vecsidx+( k-1 )*3+3 )
1912 nr =
min( 3, i-k+1 )
1913 IF( ( nr.EQ.3 ) .AND. ( kcol( ki ).LE.kp2col( ki ) ) )
1916 IF( ( k.LT.istop ) .AND.
1917 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
1918 itmp1 =
min( istart+1, i ) - 1
1920 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1921 itmp1 =
min( k+3, i )
1923 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
1924 itmp1 =
max( i1, k-1 ) - 1
1926 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
1927 itmp1 =
max( i1, k-2 ) - 1
1930 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
1931 icol1 = kcol( ki ) + k - istart
1932 icol2 = kp2col( ki ) + k - istart
1935 icol2 = kp2col( ki )
1936 IF( k.GT.istart )
THEN
1937 IF( right.EQ.icurcol( ki ) )
THEN
1940 IF( mycol.EQ.icurcol( ki ) )
THEN
1945 CALL infog1l( i1, hbl, nprow, myrow, iafirst,
1947 irow2 = numroc( itmp1, hbl, myrow, iafirst, nprow )
1948 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
1949 $ ( npcol.GT.1 ) )
THEN
1950 IF( icol1.EQ.icol2 )
THEN
1951 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1952 $ work( icbuf+1 ), irow2-irow1+1,
1956 ii = icbuf - irow1 + 1
1957 jj = icbuf + irow2 - 2*irow1 + 2
1958 DO 370 j = irow1, irow2
1959 sum = t1*work( ii+j ) + t2*work( jj+j ) +
1960 $ t3*a( ( icol1-1 )*lda+j )
1961 work( ii+j ) = work( ii+j ) - sum
1962 work( jj+j ) = work( jj+j ) -
1964 a( ( icol1-1 )*lda+j ) = a( ( icol1-1 )*
1965 $ lda+j ) - sum*dconjg( v3 )
1967 IF( istart.EQ.istop )
THEN
1968 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1970 $ irow2-irow1+1, myrow, left )
1974 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
1975 $ ( npcol.GT.1 ) )
THEN
1976 IF( icol1.NE.icol2 )
THEN
1977 IF( istart.EQ.istop )
THEN
1978 CALL zgerv2d( contxt, irow2-irow1+1, 2,
1980 $ irow2-irow1+1, myrow, left )
1984 ii = icbuf + irow2 - 2*irow1 + 2
1985 DO 380 j = irow1, irow2
1986 sum = t1*work( j+ii ) +
1987 $ t2*a( ( icol1-1 )*lda+j ) +
1988 $ t3*a( icol1*lda+j )
1989 work( j+ii ) = work( j+ii ) - sum
1990 a( ( icol1-1 )*lda+j ) = a( ( icol1-1 )*
1991 $ lda+j ) - sum*dconjg( v2 )
1992 a( icol1*lda+j ) = a( icol1*lda+j ) -
1995 CALL zgesd2d( contxt, irow2-irow1+1, 2,
1996 $ work( icbuf+1 ), irow2-irow1+1,
2003 IF( ( wantz ) .AND. ( mod( k-1,
2004 $ hbl ).GE.hbl-2 ) .AND. ( npcol.GT.1 ) )
THEN
2010 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
2011 IF( icol1.EQ.icol2 )
THEN
2012 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2014 $ irow2-irow1+1, myrow, left )
2017 icol1 = ( icol1-1 )*ldz
2018 ii = izbuf - irow1 + 1
2019 jj = izbuf + irow2 - 2*irow1 + 2
2020 DO 390 j = irow1, irow2
2021 sum = t1*work( ii+j ) +
2022 $ t2*work( jj+j ) + t3*z( icol1+j )
2023 work( ii+j ) = work( ii+j ) - sum
2024 work( jj+j ) = work( jj+j ) -
2026 z( icol1+j ) = z( icol1+j ) -
2029 IF( istart.EQ.istop )
THEN
2030 CALL zgesd2d( contxt, irow2-irow1+1, 2,
2032 $ irow2-irow1+1, myrow,
2037 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2038 IF( icol1.NE.icol2 )
THEN
2039 IF( istart.EQ.istop )
THEN
2040 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2042 $ irow2-irow1+1, myrow,
2047 icol1 = ( icol1-1 )*ldz
2048 ii = izbuf + irow2 - 2*irow1 + 2
2049 DO 400 j = irow1, irow2
2050 sum = t1*work( ii+j ) +
2052 $ t3*z( j+icol1+ldz )
2053 work( ii+j ) = work( ii+j ) - sum
2054 z( j+icol1 ) = z( j+icol1 ) -
2056 z( j+icol1+ldz ) = z( j+icol1+ldz ) -
2059 CALL zgesd2d( contxt, irow2-irow1+1, 2,
2061 $ irow2-irow1+1, myrow, left )
2069 DO 440 ki = 1, ibulge
2070 IF( kcol( ki ).GT.kp2col( ki ) )
2072 IF( ( mycol.NE.icurcol( ki ) ) .AND.
2073 $ ( right.NE.icurcol( ki ) ) )
GO TO 440
2074 istart =
max( k1( ki ), m )
2075 istop =
min( k2( ki ), i-1 )
2076 IF( mod( istart-1, hbl ).GE.hbl-2 )
THEN
2087 DO 430 k = istart, istop
2089 v2 = work( vecsidx+( k-1 )*3+1 )
2090 v3 = work( vecsidx+( k-1 )*3+2 )
2091 t1 = work( vecsidx+( k-1 )*3+3 )
2092 nr =
min( 3, i-k+1 )
2093 IF( ( nr.EQ.3 ) .AND. ( kcol( ki ).LE.kp2col( ki ) ) )
2096 IF( ( k.LT.istop ) .AND.
2097 $ ( mod( k-1, hbl ).LT.hbl-2 ) )
THEN
2098 itmp1 =
min( istart+1, i ) - 1
2100 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
2101 itmp1 =
min( k+3, i )
2103 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
2104 itmp1 =
max( i1, k-1 ) - 1
2106 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2107 itmp1 =
max( i1, k-2 ) - 1
2110 IF( mod( k-1, hbl ).LT.hbl-2 )
THEN
2111 icol1 = kcol( ki ) + k - istart
2112 icol2 = kp2col( ki ) + k - istart
2115 icol2 = kp2col( ki )
2116 IF( k.GT.istart )
THEN
2117 IF( right.EQ.icurcol( ki ) )
THEN
2120 IF( mycol.EQ.icurcol( ki ) )
THEN
2125 CALL infog1l( i1, hbl, nprow, myrow, iafirst,
2127 irow2 = numroc( itmp1, hbl, myrow, iafirst, nprow )
2128 IF( ( mod( k-1, hbl ).EQ.hbl-2 ) .AND.
2129 $ ( npcol.GT.1 ) )
THEN
2130 IF( icol1.NE.icol2 )
THEN
2131 IF( istart.EQ.istop )
THEN
2132 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2133 $ a( ( icol1-1 )*lda+irow1 ),
2134 $ lda, myrow, right )
2138 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
2139 $ ( npcol.GT.1 ) )
THEN
2140 IF( icol1.EQ.icol2 )
THEN
2141 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2142 $ a( ( icol1-2 )*lda+irow1 ),
2143 $ lda, myrow, right )
2149 IF( ( wantz ) .AND. ( mod( k-1,
2150 $ hbl ).GE.hbl-2 ) .AND. ( npcol.GT.1 ) )
THEN
2156 IF( mod( k-1, hbl ).EQ.hbl-2 )
THEN
2157 IF( icol1.NE.icol2 )
THEN
2158 IF( istart.EQ.istop )
THEN
2159 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2160 $ z( ( icol1-1 )*ldz+
2161 $ irow1 ), ldz, myrow,
2166 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2167 IF( icol1.EQ.icol2 )
THEN
2168 CALL zgerv2d( contxt, irow2-irow1+1, 2,
2169 $ z( ( icol1-2 )*ldz+irow1 ),
2170 $ ldz, myrow, right )
2184 DO 530 ki = 1, ibulge
2185 istart =
max( k1( ki ), m )
2186 istop =
min( k2( ki ), i-1 )
2187 IF( mod( istart-1, hbl ).GE.hbl-2 )
THEN
2199 DO 520 k = istart, istop
2201 v2 = work( vecsidx+( k-1 )*3+1 )
2202 v3 = work( vecsidx+( k-1 )*3+2 )
2203 t1 = work( vecsidx+( k-1 )*3+3 )
2204 nr =
min( 3, i-k+1 )
2206 IF ( icurrow( ki ).EQ.myrow )
THEN
2209 IF ( icurcol( ki ).EQ.mycol )
THEN
2216 CALL infog1l( k, hbl, npcol, mycol, jafirst, liloh,
2219 CALL infog1l( 1, hbl, nprow, myrow, iafirst, itmp2,
2221 itmp1 = numroc( k+1, hbl, myrow, iafirst, nprow )
2222 IF( icurrow( ki ).EQ.myrow )
THEN
2223 IF( ( ispec.EQ.0 ) .OR. ( nprow.EQ.1 ) .OR.
2224 $ ( mod( k-1, hbl ).EQ.hbl-2 ) )
THEN
2226 DO 460 j = ( liloh-1 )*lda,
2227 $ ( lihih-1 )*lda, lda
2228 sum = dconjg( t1 )*a( itmp1+j ) +
2229 $ dconjg( t2 )*a( itmp1+1+j )
2230 a( itmp1+j ) = a( itmp1+j ) - sum
2231 a( itmp1+1+j ) = a( itmp1+1+j ) - sum*v2
2234 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2235 CALL zgerv2d( contxt, 1, lihih-liloh+1,
2236 $ work( irbuf+1 ), 1, up,
2238 DO 470 j = liloh, lihih
2240 $ work( irbuf+j-liloh+1 ) +
2241 $ dconjg( t2 )*a( ( j-1 )*lda+
2243 work( irbuf+j-liloh+1 ) = work( irbuf+
2245 a( ( j-1 )*lda+itmp1 ) = a( ( j-1 )*
2246 $ lda+itmp1 ) - sum*v2
2248 CALL zgesd2d( contxt, 1, lihih-liloh+1,
2249 $ work( irbuf+1 ), 1, up,
2254 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
2255 $ ( icurrow( ki ).EQ.down ) )
THEN
2256 CALL zgesd2d( contxt, 1, lihih-liloh+1,
2257 $ a( ( liloh-1 )*lda+itmp1 ),
2258 $ lda, down, mycol )
2259 CALL zgerv2d( contxt, 1, lihih-liloh+1,
2260 $ a( ( liloh-1 )*lda+itmp1 ),
2261 $ lda, down, mycol )
2268 CALL infog1l( i1, hbl, nprow, myrow, iafirst,
2270 lihih = numroc( i, hbl, myrow, iafirst, nprow )
2272 IF( icurcol( ki ).EQ.mycol )
THEN
2274 IF( ( ispec.EQ.0 ) .OR. ( npcol.EQ.1 ) .OR.
2275 $ ( mod( k-1, hbl ).EQ.hbl-2 ) )
THEN
2276 CALL infog1l( k, hbl, npcol, mycol, jafirst,
2278 itmp2 = numroc( k+1, hbl, mycol, jafirst,
2280 DO 480 j = liloh, lihih
2281 sum = t1*a( ( itmp1-1 )*lda+j ) +
2282 $ t2*a( itmp1*lda+j )
2283 a( ( itmp1-1 )*lda+j ) = a( ( itmp1-1 )*
2285 a( itmp1*lda+j ) = a( itmp1*lda+j ) -
2290 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2291 CALL zgerv2d( contxt, lihih-liloh+1, 1,
2293 $ lihih-liloh+1, myrow, left )
2294 DO 490 j = liloh, lihih
2295 sum = t1*work( icbuf+j ) +
2296 $ t2*a( ( itmp1-1 )*lda+j )
2297 work( icbuf+j ) = work( icbuf+j ) - sum
2298 a( ( itmp1-1 )*lda+j )
2299 $ = a( ( itmp1-1 )*lda+j ) -
2302 CALL zgesd2d( contxt, lihih-liloh+1, 1,
2304 $ lihih-liloh+1, myrow, left )
2308 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
2309 $ ( icurcol( ki ).EQ.right ) )
THEN
2311 CALL zgesd2d( contxt, lihih-liloh+1, 1,
2312 $ a( ( itmp1-1 )*lda+liloh ),
2313 $ lda, myrow, right )
2314 CALL infog1l( k, hbl, npcol, mycol, jafirst,
2316 itmp2 = numroc( k+1, hbl, mycol, jafirst,
2318 CALL zgerv2d( contxt, lihih-liloh+1, 1,
2319 $ a( ( itmp1-1 )*lda+liloh ),
2320 $ lda, myrow, right )
2328 IF( icurcol( ki ).EQ.mycol )
THEN
2330 IF( ( ispec.EQ.0 ) .OR. ( npcol.EQ.1 ) .OR.
2331 $ ( mod( k-1, hbl ).EQ.hbl-2 ) )
THEN
2332 itmp1 = kcol( ki ) + k - istart
2333 itmp1 = ( itmp1-1 )*ldz
2334 DO 500 j = liloz, lihiz
2335 sum = t1*z( j+itmp1 ) +
2336 $ t2*z( j+itmp1+ldz )
2337 z( j+itmp1 ) = z( j+itmp1 ) - sum
2338 z( j+itmp1+ldz ) = z( j+itmp1+ldz ) -
2344 IF( mod( k-1, hbl ).EQ.hbl-1 )
THEN
2345 CALL zgerv2d( contxt, lihiz-liloz+1, 1,
2346 $ work( izbuf+1 ), ldz,
2348 itmp1 = ( itmp1-1 )*ldz
2349 DO 510 j = liloz, lihiz
2350 sum = t1*work( izbuf+j ) +
2352 work( izbuf+j ) = work( izbuf+j ) -
2354 z( j+itmp1 ) = z( j+itmp1 ) -
2357 CALL zgesd2d( contxt, lihiz-liloz+1, 1,
2358 $ work( izbuf+1 ), ldz,
2366 IF( ( mod( k-1, hbl ).EQ.hbl-1 ) .AND.
2367 $ ( icurcol( ki ).EQ.right ) )
THEN
2369 itmp1 = ( itmp1-1 )*ldz
2370 CALL zgesd2d( contxt, lihiz-liloz+1, 1,
2371 $ z( liloz+itmp1 ), ldz,
2373 CALL zgerv2d( contxt, lihiz-liloz+1, 1,
2374 $ z( liloz+itmp1 ), ldz,
2384 IF( nprow.EQ.1 )
THEN
2385 krow( ki ) = krow( ki ) + k2( ki ) - k1( ki ) + 1
2386 kp2row( ki ) = kp2row( ki ) + k2( ki ) - k1( ki ) + 1
2388 IF( ( mod( k1( ki )-1, hbl ).LT.hbl-2 ) .AND.
2389 $ ( icurrow( ki ).EQ.myrow ) .AND. ( nprow.GT.1 ) )
2391 krow( ki ) = krow( ki ) + k2( ki ) - k1( ki ) + 1
2393 IF( ( mod( k2( ki ), hbl ).LT.hbl-2 ) .AND.
2394 $ ( icurrow( ki ).EQ.myrow ) .AND. ( nprow.GT.1 ) )
2396 kp2row( ki ) = kp2row( ki ) + k2( ki ) - k1( ki ) + 1
2398 IF( ( mod( k1( ki )-1, hbl ).GE.hbl-2 ) .AND.
2399 $ ( ( myrow.EQ.icurrow( ki ) ) .OR. ( down.EQ.
2400 $ icurrow( ki ) ) ) .AND. ( nprow.GT.1 ) )
THEN
2401 CALL infog1l( k2( ki )+1, hbl, nprow, myrow, iafirst,
2402 $ krow( ki ), itmp2 )
2404 IF( ( mod( k2( ki ), hbl ).GE.hbl-2 ) .AND.
2405 $ ( ( myrow.EQ.icurrow( ki ) ) .OR. ( up.EQ.
2406 $ icurrow( ki ) ) ) .AND. ( nprow.GT.1 ) )
THEN
2407 kp2row( ki ) = numroc( k2( ki )+3, hbl, myrow,
2410 IF( npcol.EQ.1 )
THEN
2411 kcol( ki ) = kcol( ki ) + k2( ki ) - k1( ki ) + 1
2412 kp2col( ki ) = kp2col( ki ) + k2( ki ) - k1( ki ) + 1
2414 IF( ( mod( k1( ki )-1, hbl ).LT.hbl-2 ) .AND.
2415 $ ( icurcol( ki ).EQ.mycol ) .AND. ( npcol.GT.1 ) )
2417 kcol( ki ) = kcol( ki ) + k2( ki ) - k1( ki ) + 1
2419 IF( ( mod( k2( ki ), hbl ).LT.hbl-2 ) .AND.
2420 $ ( icurcol( ki ).EQ.mycol ) .AND. ( npcol.GT.1 ) )
2422 kp2col( ki ) = kp2col( ki ) + k2( ki ) - k1( ki ) + 1
2424 IF( ( mod( k1( ki )-1, hbl ).GE.hbl-2 ) .AND.
2425 $ ( ( mycol.EQ.icurcol( ki ) ) .OR. ( right.EQ.
2426 $ icurcol( ki ) ) ) .AND. ( npcol.GT.1 ) )
THEN
2427 CALL infog1l( k2( ki )+1, hbl, npcol, mycol, jafirst,
2428 $ kcol( ki ), itmp2 )
2430 IF( ( mod( k2( ki ), hbl ).GE.hbl-2 ) .AND.
2431 $ ( ( mycol.EQ.icurcol( ki ) ) .OR. ( left.EQ.
2432 $ icurcol( ki ) ) ) .AND. ( npcol.GT.1 ) )
THEN
2433 kp2col( ki ) = numroc( k2( ki )+3, hbl, mycol,
2436 k1( ki ) = k2( ki ) + 1
2437 istop =
min( k1( ki )+rotn-mod( k1( ki ), rotn ), i-2 )
2438 istop =
min( istop, k1( ki )+hbl-3-
2439 $ mod( k1( ki )-1, hbl ) )
2440 istop =
min( istop, i2-2 )
2441 istop =
max( istop, k1( ki ) )
2442 IF( ( mod( k1( ki )-1, hbl ).EQ.hbl-2 ) .AND.
2443 $ ( istop.LT.
min( i-2, i2-2 ) ) )
THEN
2447 IF( k1( ki ).LE.istop )
THEN
2448 IF( ( mod( k1( ki )-1, hbl ).EQ.hbl-2 ) .AND.
2449 $ ( i-k1( ki ).GT.1 ) )
THEN
2453 icurrow( ki ) = mod( icurrow( ki )+1, nprow )
2454 icurcol( ki ) = mod( icurcol( ki )+1, npcol )
2459 IF( k2( ibulge ).LE.i-1 )
2476 CALL infog2l( i, i, desca, nprow, npcol, myrow, mycol, irow,
2477 $ icol, itmp1, itmp2 )
2478 IF( ( myrow.EQ.itmp1 ) .AND. ( mycol.EQ.itmp2 ) )
THEN
2479 w( i ) = a( ( icol-1 )*lda+irow )
2483 ELSE IF( l.EQ.i-1 )
THEN
2487 CALL pzlacp3( 2, i-1, a, desca, s1, 2*iblk, -1, -1, 0 )
2488 CALL zlanv2( s1( 1, 1 ), s1( 1, 2 ), s1( 2, 1 ), s1( 2, 2 ),
2489 $ w( i-1 ), w( i ), cs, sn )
2490 CALL pzlacp3( 2, i-1, a, desca, s1, 2*iblk, 0, 0, 1 )
2492 IF( node.NE.0 )
THEN
2503 CALL pzrot( i2-i, a, i-1, i+1, desca, n, a, i, i+1,
2504 $ desca, n, cs, sn )
2506 CALL pzrot( i-i1-1, a, i1, i-1, desca, 1, a, i1, i, desca,
2507 $ 1, cs, dconjg( sn ) )
2513 CALL pzrot( nz, z, iloz, i-1, descz, 1, z, iloz, i, descz,
2514 $ 1, cs, dconjg( sn ) )
2522 IF( jblk.LE.2*iblk )
THEN
2523 CALL pzlacp3( i-l+1, l, a, desca, s1, 2*iblk, 0, 0, 0 )
2524 CALL zlahqr2( .false., .false., jblk, 1, jblk, s1, 2*iblk,
2525 $ w( l ), 1, jblk, z, ldz, ierr )
2526 IF( node.NE.0 )
THEN
2545 CALL zgsum2d( contxt,
'All',
' ', n, 1, w, n, -1, -1 )