1 SUBROUTINE infog2l( GRINDX, GCINDX, DESC, NPROW, NPCOL, MYROW,
2 $ MYCOL, LRINDX, LCINDX, RSRC, CSRC )
10 INTEGER CSRC, GCINDX, GRINDX, LRINDX, LCINDX, MYCOL,
11 $ myrow, npcol, nprow, rsrc
123 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
124 $ lld_, mb_, m_, nb_, n_, rsrc_
125 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
126 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
127 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
130 INTEGER CBLK, GCCPY, GRCPY, RBLK
140 rblk = grcpy / desc(mb_)
141 cblk = gccpy / desc(nb_)
142 rsrc = mod( rblk + desc(rsrc_), nprow )
143 csrc = mod( cblk + desc(csrc_), npcol )
145 lrindx = ( rblk / nprow + 1 ) * desc(mb_) + 1
146 lcindx = ( cblk / npcol + 1 ) * desc(nb_) + 1
148 IF( mod( myrow+nprow-desc(rsrc_), nprow ) .GE.
149 $ mod( rblk, nprow ) )
THEN
151 $ lrindx = lrindx + mod( grcpy, desc(mb_) )
152 lrindx = lrindx - desc(mb_)
155 IF( mod( mycol+npcol-desc(csrc_), npcol ) .GE.
156 $ mod( cblk, npcol ) )
THEN
158 $ lcindx = lcindx + mod( gccpy, desc(nb_) )
159 lcindx = lcindx - desc(nb_)