1 SUBROUTINE pctrti2( UPLO, DIAG, N, A, IA, JA, DESCA, INFO )
10 INTEGER IA, INFO, JA, N
128 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
129 $ LLD_, MB_, M_, NB_, N_, RSRC_
130 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
131 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
132 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
134 parameter( one = 1.0e+0 )
137 LOGICAL NOUNIT, UPPER
138 INTEGER IACOL, IAROW, ICTXT, ICURR, IDIAG, IIA, IOFFA,
139 $ JJA, LDA, MYCOL, MYROW, NA, NPCOL, NPROW
143 EXTERNAL blacs_abort, blacs_gridinfo,
chk1mat, cscal,
154 ictxt = desca( ctxt_ )
155 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
160 IF( nprow.EQ.-1 )
THEN
163 CALL chk1mat( n, 3, n, 3, ia, ja, desca, 7, info )
164 upper = lsame( uplo,
'U' )
165 nounit = lsame( diag,
'N' )
166 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
168 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
174 CALL pxerbla( ictxt,
'PCTRTI2', -info )
175 CALL blacs_abort( ictxt, 1 )
181 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
184 IF( myrow.EQ.iarow .AND. mycol.EQ.iacol )
THEN
190 ioffa = iia + ( jja - 1 ) * lda
197 a( ioffa ) = one / a( ioffa )
200 a( idiag ) = one / a( idiag )
205 CALL ctrmv(
'Upper',
'No transpose', diag, na,
206 $ a( ioffa ), lda, a( icurr ), 1 )
207 CALL cscal( na, ajj, a( icurr ), 1 )
208 idiag = idiag + lda + 1
220 CALL ctrmv(
'Upper',
'No transpose', diag, na,
221 $ a( ioffa ), lda, a( icurr ), 1 )
222 CALL cscal( na, -one, a( icurr ), 1 )
230 icurr = iia + n - 1 + ( jja + n - 2 ) * lda
237 a( icurr ) = one / a( icurr )
240 a( idiag ) = one / a( idiag )
245 CALL ctrmv(
'Lower',
'No transpose', diag, na,
246 $ a( icurr ), lda, a( ioffa ), 1 )
247 CALL cscal( na, ajj, a( ioffa ), 1 )
249 idiag = idiag - lda - 1
261 CALL ctrmv(
'Lower',
'No transpose', diag, na,
262 $ a( icurr ), lda, a( ioffa ), 1 )
263 CALL cscal( na, -one, a( ioffa ), 1 )
264 icurr = icurr - lda - 1