1 SUBROUTINE pielget( SCOPE, TOP, ALPHA, A, IA, JA, DESCA )
13 INTEGER A( * ), DESCA( * )
113 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
114 $ LLD_, MB_, M_, NB_, N_, RSRC_
115 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
116 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
117 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
119 parameter( zero = 0 )
122 INTEGER IACOL, IAROW, ICTXT, IIA, IOFFA, JJA, MYCOL,
123 $ MYROW, NPCOL, NPROW
126 EXTERNAL blacs_gridinfo, igebr2d, igebs2d,
infog2l
136 ictxt = desca( ctxt_ )
137 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
139 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
144 IF( lsame( scope,
'R' ) )
THEN
145 IF( myrow.EQ.iarow )
THEN
146 IF( mycol.EQ.iacol )
THEN
147 ioffa = iia+(jja-1)*desca( lld_ )
148 CALL igebs2d( ictxt, scope, top, 1, 1, a( ioffa ), 1 )
151 CALL igebr2d( ictxt, scope, top, 1, 1, alpha, 1,
155 ELSE IF( lsame( scope,
'C' ) )
THEN
156 IF( mycol.EQ.iacol )
THEN
157 IF( myrow.EQ.iarow )
THEN
158 ioffa = iia+(jja-1)*desca( lld_ )
159 CALL igebs2d( ictxt, scope, top, 1, 1, a( ioffa ), 1 )
162 CALL igebr2d( ictxt, scope, top, 1, 1, alpha, 1,
166 ELSE IF( lsame( scope,
'A' ) )
THEN
167 IF( ( myrow.EQ.iarow ).AND.( mycol.EQ.iacol ) )
THEN
168 ioffa = iia+(jja-1)*desca( lld_ )
169 CALL igebs2d( ictxt, scope, top, 1, 1, a( ioffa ), 1 )
172 CALL igebr2d( ictxt, scope, top, 1, 1, alpha, 1,
176 IF( myrow.EQ.iarow .AND. mycol.EQ.iacol )
177 $ alpha = a( iia+(jja-1)*desca( lld_ ) )