1 SUBROUTINE pzlaqge( M, N, A, IA, JA, DESCA, R, C, ROWCND, COLCND,
12 DOUBLE PRECISION AMAX, COLCND, ROWCND
16 DOUBLE PRECISION C( * ), R( * )
156 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
157 $ lld_, mb_, m_, nb_, n_, rsrc_
158 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
159 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
160 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
161 DOUBLE PRECISION ONE, THRESH
162 parameter( one = 1.0d+0, thresh = 0.1d+0 )
165 INTEGER I, IACOL, IAROW, ICOFF, ICTXT, IIA, IOFFA,
166 $ iroff, j, jja, lda, mp, mycol, myrow, npcol,
168 DOUBLE PRECISION CJ, LARGE, SMALL
171 EXTERNAL blacs_gridinfo,
infog2l
175 DOUBLE PRECISION PDLAMCH
176 EXTERNAL numroc, pdlamch
185 IF( m.LE.0 .OR. n.LE.0 )
THEN
192 ictxt = desca( ctxt_ )
193 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
194 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
196 iroff = mod( ia-1, desca( mb_ ) )
197 icoff = mod( ja-1, desca( nb_ ) )
198 mp = numroc( m+iroff, desca( mb_ ), myrow, iarow, nprow )
199 nq = numroc( n+icoff, desca( nb_ ), mycol, iacol, npcol )
208 small = pdlamch( ictxt,
'Safe minimum' ) /
209 $ pdlamch( ictxt,
'Precision' )
212 IF( rowcnd.GE.thresh .AND. amax.GE.small .AND. amax.LE.large )
217 IF( colcnd.GE.thresh )
THEN
228 DO 20 j = jja, jja+nq-1
230 DO 10 i = iia, iia+mp-1
231 a( ioffa + i ) = cj*a( ioffa + i )
238 ELSE IF( colcnd.GE.thresh )
THEN
243 DO 40 j = jja, jja+nq-1
244 DO 30 i = iia, iia+mp-1
245 a( ioffa + i ) = r( i )*a( ioffa + i )
256 DO 60 j = jja, jja+nq-1
258 DO 50 i = iia, iia+mp-1
259 a( ioffa + i ) = cj*r( i )*a( ioffa + i )