1 SUBROUTINE pslaqge( M, N, A, IA, JA, DESCA, R, C, ROWCND, COLCND,
12 REAL AMAX, COLCND, ROWCND
16 REAL A( * ), C( * ), R( * )
155 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
156 $ lld_, mb_, m_, nb_, n_, rsrc_
157 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
158 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
159 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
161 parameter( one = 1.0e+0, thresh = 0.1e+0 )
164 INTEGER I, IACOL, IAROW, ICOFF, ICTXT, IIA, IOFFA,
165 $ iroff, j, jja, lda, mp, mycol, myrow, npcol,
167 REAL CJ, LARGE, SMALL
170 EXTERNAL blacs_gridinfo,
infog2l
175 EXTERNAL numroc, pslamch
184 IF( m.LE.0 .OR. n.LE.0 )
THEN
191 ictxt = desca( ctxt_ )
192 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
193 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
195 iroff = mod( ia-1, desca( mb_ ) )
196 icoff = mod( ja-1, desca( nb_ ) )
197 mp = numroc( m+iroff, desca( mb_ ), myrow, iarow, nprow )
198 nq = numroc( n+icoff, desca( nb_ ), mycol, iacol, npcol )
207 small = pslamch( ictxt,
'Safe minimum' ) /
208 $ pslamch( ictxt,
'Precision' )
211 IF( rowcnd.GE.thresh .AND. amax.GE.small .AND. amax.LE.large )
216 IF( colcnd.GE.thresh )
THEN
227 DO 20 j = jja, jja+nq-1
229 DO 10 i = iia, iia+mp-1
230 a( ioffa + i ) = cj*a( ioffa + i )
237 ELSE IF( colcnd.GE.thresh )
THEN
242 DO 40 j = jja, jja+nq-1
243 DO 30 i = iia, iia+mp-1
244 a( ioffa + i ) = r( i )*a( ioffa + i )
255 DO 60 j = jja, jja+nq-1
257 DO 50 i = iia, iia+mp-1
258 a( ioffa + i ) = cj*r( i )*a( ioffa + i )