1 SUBROUTINE pcpotrf( UPLO, N, A, IA, JA, DESCA, INFO )
10 INTEGER IA, INFO, JA, N
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 )
144 parameter( one = 1.0e+0 )
146 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
150 CHARACTER COLBTOP, ROWBTOP
151 INTEGER I, ICOFF, ICTXT, IROFF, J, JB, JN, MYCOL,
152 $ MYROW, NPCOL, NPROW
155 INTEGER IDUM1( 1 ), IDUM2( 1 )
159 $ pb_topset,
pcpotf2, pcherk, pctrsm,
165 EXTERNAL iceil, lsame
168 INTRINSIC ichar,
min, mod
174 ictxt = desca( ctxt_ )
175 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
180 IF( nprow.EQ.-1 )
THEN
183 CALL chk1mat( n, 2, n, 2, ia, ja, desca, 6, info )
184 upper = lsame( uplo,
'U' )
186 iroff = mod( ia-1, desca( mb_ ) )
187 icoff = mod( ja-1, desca( nb_ ) )
188 IF ( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
190 ELSE IF( iroff.NE.0 )
THEN
192 ELSE IF( icoff.NE.0 )
THEN
194 ELSE IF( desca( mb_ ).NE.desca( nb_ ) )
THEN
199 idum1( 1 ) = ichar(
'U' )
201 idum1( 1 ) = ichar(
'L' )
204 CALL pchk1mat( n, 2, n, 2, ia, ja, desca, 6, 1, idum1, idum2,
209 CALL pxerbla( ictxt,
'PCPOTRF', -info )
218 CALL pb_topget( ictxt,
'Broadcast',
'Rowwise', rowbtop )
219 CALL pb_topget( ictxt,
'Broadcast',
'Columnwise', colbtop )
226 CALL pb_topset( ictxt,
'Broadcast',
'Rowwise',
' ' )
227 CALL pb_topset( ictxt,
'Broadcast',
'Columnwise',
'S-ring' )
233 jn =
min( iceil( ja, desca( nb_ ) )*desca(nb_), ja+n-1 )
238 CALL pcpotf2( uplo, jb, a, ia, ja, desca, info )
246 CALL pctrsm(
'Left', uplo,
'Conjugate transpose',
247 $
'Non-Unit', jb, n-jb, cone, a, ia, ja, desca,
248 $ a, ia, ja+jb, desca )
252 CALL pcherk( uplo,
'Conjugate transpose', n-jb, jb, -one, a,
253 $ ia, ja+jb, desca, one, a, ia+jb, ja+jb, desca )
258 DO 10 j = jn+1, ja+n-1, desca( nb_ )
259 jb =
min( n-j+ja, desca( nb_ ) )
264 CALL pcpotf2( uplo, jb, a, i, j, desca, info )
270 IF( j-ja+jb+1.LE.n )
THEN
274 CALL pctrsm(
'Left', uplo,
'Conjugate transpose',
275 $
'Non-Unit', jb, n-j-jb+ja, cone, a, i, j,
276 $ desca, a, i, j+jb, desca )
280 CALL pcherk( uplo,
'Conjugate transpose', n-j-jb+ja, jb,
281 $ -one, a, i, j+jb, desca, one, a, i+jb,
291 CALL pb_topset( ictxt,
'Broadcast',
'Rowwise',
'S-ring' )
292 CALL pb_topset( ictxt,
'Broadcast',
'Columnwise',
' ' )
299 jn =
min( iceil( ja, desca( nb_ ) )*desca( nb_ ), ja+n-1 )
304 CALL pcpotf2( uplo, jb, a, ia, ja, desca, info )
312 CALL pctrsm(
'Right', uplo,
'Conjugate transpose',
313 $
'Non-Unit', n-jb, jb, cone, a, ia, ja, desca,
314 $ a, ia+jb, ja, desca )
318 CALL pcherk( uplo,
'No Transpose', n-jb, jb, -one, a, ia+jb,
319 $ ja, desca, one, a, ia+jb, ja+jb, desca )
323 DO 20 j = jn+1, ja+n-1, desca( nb_ )
324 jb =
min( n-j+ja, desca( nb_ ) )
329 CALL pcpotf2( uplo, jb, a, i, j, desca, info )
335 IF( j-ja+jb+1.LE.n )
THEN
339 CALL pctrsm(
'Right', uplo,
'Conjugate transpose',
340 $
'Non-Unit', n-j-jb+ja, jb, cone, a, i, j,
341 $ desca, a, i+jb, j, desca )
345 CALL pcherk( uplo,
'No Transpose', n-j-jb+ja, jb, -one,
346 $ a, i+jb, j, desca, one, a, i+jb, j+jb,
356 CALL pb_topset( ictxt,
'Broadcast',
'Rowwise', rowbtop )
357 CALL pb_topset( ictxt,
'Broadcast',
'Columnwise', colbtop )