1 SUBROUTINE pzpotrs( UPLO, N, NRHS, A, IA, JA, DESCA, B, IB, JB,
11 INTEGER IA, IB, INFO, JA, JB, N, NRHS
14 INTEGER DESCA( * ), DESCB( * )
15 COMPLEX*16 A( * ), B( * )
146 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
147 $ lld_, mb_, m_, nb_, n_, rsrc_
148 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
149 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
150 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
152 parameter( one = 1.0d+0 )
156 INTEGER IAROW, IBROW, ICTXT, IROFFA, IROFFB, ICOFFA,
157 $ mycol, myrow, npcol, nprow
160 INTEGER IDUM1( 1 ), IDUM2( 1 )
169 EXTERNAL indxg2p, lsame
178 ictxt = desca( ctxt_ )
179 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
184 IF( nprow.EQ.-1 )
THEN
187 CALL chk1mat( n, 2, n, 2, ia, ja, desca, 7, info )
188 CALL chk1mat( n, 2, nrhs, 3, ib, jb, descb, 11, info )
189 upper = lsame( uplo,
'U' )
191 iarow = indxg2p( ia, desca( mb_ ), myrow, desca( rsrc_ ),
193 ibrow = indxg2p( ib, descb( mb_ ), myrow, descb( rsrc_ ),
195 iroffa = mod( ia-1, desca( mb_ ) )
196 iroffb = mod( ib-1, descb( mb_ ) )
197 icoffa = mod( ja-1, desca( nb_ ) )
198 IF ( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
200 ELSE IF( iroffa.NE.0 )
THEN
202 ELSE IF( icoffa.NE.0 )
THEN
204 ELSE IF( desca( mb_ ).NE.desca( nb_ ) )
THEN
206 ELSE IF( iroffb.NE.0 .OR. ibrow.NE.iarow )
THEN
208 ELSE IF( descb( mb_ ).NE.desca( nb_ ) )
THEN
213 idum1( 1 ) = ichar(
'U' )
215 idum1( 1 ) = ichar(
'L' )
218 CALL pchk2mat( n, 2, n, 2, ia, ja, desca, 7, n, 2, nrhs,
219 $ 3, ib, jb, descb, 11, 1, idum1, idum2, info )
223 CALL pxerbla( ictxt,
'PZPOTRS', -info )
229 IF( n.EQ.0 .OR. nrhs.EQ.0 )
238 CALL pztrsm(
'Left',
'Upper',
'Conjugate transpose',
239 $
'Non-unit', n, nrhs, one, a, ia, ja, desca, b, ib,
244 CALL pztrsm(
'Left',
'Upper',
'No transpose',
'Non-unit', n,
245 $ nrhs, one, a, ia, ja, desca, b, ib, jb, descb )
252 CALL pztrsm(
'Left',
'Lower',
'No transpose',
'Non-unit', n,
253 $ nrhs, one, a, ia, ja, desca, b, ib, jb, descb )
257 CALL pztrsm(
'Left',
'Lower',
'Conjugate transpose',
258 $
'Non-unit', n, nrhs, one, a, ia, ja, desca, b, ib,