1 SUBROUTINE pslared2d( N, IA, JA, DESC, BYROW, BYALL, WORK, LWORK )
9 INTEGER IA, JA, LWORK, N
13 REAL BYALL( * ), BYROW( * ), WORK( LWORK )
118 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
119 $ MB_, NB_, RSRC_, CSRC_, LLD_
120 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
121 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
122 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
125 INTEGER ALLI, BUFLEN, I, II, MB, MYCOL, MYROW, NPCOL,
133 EXTERNAL blacs_gridinfo, scopy, sgebr2d, sgebs2d
140 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
143 CALL blacs_gridinfo( desc( ctxt_ ), nprow, npcol, myrow, mycol )
146 DO 30 prow = 0, nprow - 1
147 buflen = numroc( n, mb, prow, 0, nprow )
148 IF( myrow.EQ.prow )
THEN
149 CALL scopy( buflen, byrow, 1, work, 1 )
150 CALL sgebs2d( desc( ctxt_ ),
'C',
' ', buflen, 1, work,
153 CALL sgebr2d( desc( ctxt_ ),
'C',
' ', buflen, 1, work,
154 $ buflen, prow, mycol )
158 DO 20 ii = 1, buflen, mb
159 DO 10 i = 1,
min( mb, buflen-ii+1 )
160 byall( alli+i ) = work( ii-1+i )
162 alli = alli + mb*nprow