1 SUBROUTINE pdlatran( N, NB, A, IA, JA, DESCA, WORK )
13 DOUBLE PRECISION A( * ), WORK( * )
82 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
83 $ MB_, NB_, RSRC_, CSRC_, LLD_
84 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
85 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
86 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
89 INTEGER I, ICTXT, IRECV, ISEND, J, JJ, JRECV, JSEND,
90 $ LDA, MAXIRECV, MAXISEND, MAXJRECV, MAXJSEND,
91 $ MINIRECV, MINISEND, MINJRECV, MINJSEND, MYCOL,
92 $ MYROW, NP, NPCOL, NPROW, NQ, RECVNB, SENDNB,
96 EXTERNAL blacs_gridinfo, dtrrv2d, dtrsd2d
107 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
137 ictxt = desca( ctxt_ )
139 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
142 np = numroc( n, 1, myrow, 0, nprow )
143 nq = numroc( n, 1, mycol, 0, npcol )
146 IF( myrow.EQ.mycol )
THEN
150 a( j+( i-1 )*lda ) = a( i+( j-1 )*lda )
155 IF( myrow.GT.mycol )
THEN
159 IF( myrow.EQ.mycol )
THEN
168 DO 50 jj = 1,
max( np, nq ), nb
169 minjsend = startcol + jj - 1
170 minjrecv = startrow + jj - 1
171 maxjsend =
min( minjsend+nb-1, nq )
172 maxjrecv =
min( minjrecv+nb-1, np )
174 sendnb = maxjsend - minjsend + 1
175 recvnb = maxjrecv - minjrecv + 1
179 maxisend =
min( np, jj+sendnb-1 )
180 maxirecv =
min( nq, jj+recvnb-1 )
182 isend = maxisend - minisend + 1
183 irecv = maxirecv - minirecv + 1
184 jsend = maxjsend - minjsend + 1
185 jrecv = maxjrecv - minjrecv + 1
189 DO 40 j = minjrecv, maxjrecv
190 DO 30 i = minirecv, maxirecv + j - maxjrecv
191 work( i+( j-minjrecv )*irecv ) = a( j+( i-1 )*lda )
195 IF( irecv.GT.0 .AND. jrecv.GT.0 )
196 $
CALL dtrsd2d( ictxt,
'U',
'N', irecv, jrecv, work, irecv,
199 IF( isend.GT.0 .AND. jsend.GT.0 )
200 $
CALL dtrrv2d( ictxt,
'U',
'N', isend, jsend,
201 $ a( minisend+( minjsend-1 )*lda ), lda,