1 SUBROUTINE pdpotf2( UPLO, N, A, IA, JA, DESCA, INFO )
10 INTEGER IA, INFO, JA, N
14 DOUBLE PRECISION A( * )
138 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
139 $ LLD_, MB_, M_, NB_, N_, RSRC_
140 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
141 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
142 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
143 DOUBLE PRECISION ONE, ZERO
144 parameter( one = 1.0d+0, zero = 0.0d+0 )
148 CHARACTER COLBTOP, ROWBTOP
149 INTEGER IACOL, IAROW, ICOFF, ICTXT, ICURR, IDIAG, IIA,
150 $ IOFFA, IROFF, J, JJA, LDA, MYCOL, MYROW,
155 EXTERNAL blacs_abort, blacs_gridinfo,
chk1mat, dgemv,
156 $ dscal, igebr2d, igebs2d,
infog2l, pb_topget,
164 DOUBLE PRECISION DDOT
171 ictxt = desca( ctxt_ )
172 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
177 IF( nprow.EQ.-1 )
THEN
180 CALL chk1mat( n, 2, n, 2, ia, ja, desca, 6, info )
182 upper = lsame( uplo,
'U' )
183 iroff = mod( ia-1, desca( mb_ ) )
184 icoff = mod( ja-1, desca( nb_ ) )
185 IF ( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
187 ELSE IF( n+icoff.GT.desca( nb_ ) )
THEN
189 ELSE IF( iroff.NE.0 )
THEN
191 ELSE IF( icoff.NE.0 )
THEN
193 ELSE IF( desca( mb_ ).NE.desca( nb_ ) )
THEN
200 CALL pxerbla( ictxt,
'PDPOTF2', -info )
201 CALL blacs_abort( ictxt, 1 )
212 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
214 CALL pb_topget( ictxt,
'Broadcast',
'Rowwise', rowbtop )
215 CALL pb_topget( ictxt,
'Broadcast',
'Columnwise', colbtop )
221 IF( myrow.EQ.iarow )
THEN
222 IF( mycol.EQ.iacol )
THEN
227 idiag = iia + ( jja - 1 ) * lda
235 $ ddot( j-ja, a( ioffa ), 1, a( ioffa ), 1 )
236 IF( ajj.LE.zero )
THEN
246 IF( j.LT.ja+n-1 )
THEN
248 CALL dgemv(
'Transpose', j-ja, ja+n-j-1, -one,
249 $ a( ioffa+lda ), lda, a( ioffa ), 1,
250 $ one, a( icurr ), lda )
251 CALL dscal( n-j+ja-1, one / ajj, a( icurr ), lda )
253 idiag = idiag + lda + 1
261 CALL igebs2d( ictxt,
'Rowwise', rowbtop, 1, 1, info, 1 )
265 CALL igebr2d( ictxt,
'Rowwise', rowbtop, 1, 1, info, 1,
271 CALL igebs2d( ictxt,
'Columnwise', colbtop, 1, 1, info, 1 )
275 CALL igebr2d( ictxt,
'Columnwise', colbtop, 1, 1, info, 1,
284 IF( mycol.EQ.iacol )
THEN
285 IF( myrow.EQ.iarow )
THEN
290 idiag = iia + ( jja - 1 ) * lda
298 $ ddot( j-ja, a( ioffa ), lda, a( ioffa ), lda )
299 IF ( ajj.LE.zero )
THEN
309 IF( j.LT.ja+n-1 )
THEN
311 CALL dgemv(
'No transpose', ja+n-j-1, j-ja, -one,
312 $ a( ioffa+1 ), lda, a( ioffa ), lda,
313 $ one, a( icurr ), 1 )
314 CALL dscal( ja+n-j-1, one / ajj, a( icurr ), 1 )
316 idiag = idiag + lda + 1
324 CALL igebs2d( ictxt,
'Columnwise', colbtop, 1, 1, info,
329 CALL igebr2d( ictxt,
'Columnwise', colbtop, 1, 1, info,
336 CALL igebs2d( ictxt,
'Rowwise', rowbtop, 1, 1, info, 1 )
340 CALL igebr2d( ictxt,
'Rowwise', rowbtop, 1, 1, info, 1,