p?gbtrs

Solves a system of distributed linear equations with a general band matrix, using the LU factorization computed by p?gbtrf.

Syntax

call psgbtrs(trans, n, bwl, bwu, nrhs, a, ja, desca, ipiv, b, ib, descb, af, laf, work, lwork, info)

call pdgbtrs(trans, n, bwl, bwu, nrhs, a, ja, desca, ipiv, b, ib, descb, af, laf, work, lwork, info)

call pcgbtrs(trans, n, bwl, bwu, nrhs, a, ja, desca, ipiv, b, ib, descb, af, laf, work, lwork, info)

call pzgbtrs(trans, n, bwl, bwu, nrhs, a, ja, desca, ipiv, b, ib, descb, af, laf, work, lwork, info)

Include Files

Description

The p?gbtrs routine solves a system of distributed linear equations with a general band distributed matrix sub(A) = A(1:n, ja:ja+n-1) using the LU factorization computed by p?gbtrf.

The system has one of the following forms specified by trans:

sub(A)*X = sub(B) (no transpose),

sub(A)T*X = sub(B) (transpose),

sub(A)H*X = sub(B) (conjugate transpose),

where sub(B) = B(ib:ib+n-1, 1:nrhs) .

Before calling this routine, you must call p?gbtrf to compute the LU factorization of sub(A).

Input Parameters

trans

(global) CHARACTER*1. Must be 'N' or 'T' or 'C'.

Indicates the form of the equations:

If trans = 'N', then sub(A)*X = sub(B) is solved for X.

If trans = 'T', then sub(A)T*X = sub(B) is solved for X.

If trans = 'C', then sub(A)H *X = sub(B) is solved for X.

n

(global) INTEGER. The number of linear equations; the order of the distributed submatrix sub(A) (n 0).

bwl

(global) INTEGER. The number of sub-diagonals within the band of A ( 0 ≤ bwln-1 ).

bwu

(global) INTEGER. The number of super-diagonals within the band of A ( 0 ≤ bwun-1 ).

nrhs

(global) INTEGER. The number of right hand sides; the number of columns of the distributed submatrix sub(B) (nrhs 0).

a, b

(global)

REAL for psgbtrs

DOUBLE PRECISION for pdgbtrs

COMPLEX for pcgbtrs

DOUBLE COMPLEX for pzgbtrs.

Pointers into the local memory to arrays of local dimension

a(lld_a,LOCc(ja+n-1)) and b(lld_b,LOCc(nrhs)), respectively.

The array a contains details of the LU factorization of the distributed band matrix A.

On entry, the array b contains the local pieces of the right hand sides B(ib:ib+n-1, 1:nrhs).

ja

(global) INTEGER. The index in the global array A that points to the start of the matrix to be operated on ( which may be either all of A or a submatrix of A).

desca

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.

If desca(dtype_) = 501, then dlen_ 7;

else if desca(dtype_) = 1, then dlen_ 9.

ib

(global) INTEGER. The index in the global array A that points to the start of the matrix to be operated on ( which may be either all of A or a submatrix of A).

descb

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.

If desca(dtype_) = 502 , then dlen_ 7;

else if desca(dtype_) = 1, then dlen_ 9.

laf

(local) INTEGER. The dimension of the array af.

Must be laf NB*(bwl+bwu)+6*(bwl+bwu)*(bwl+2*bwu).

If laf is not large enough, an error code will be returned and the minimum acceptable size will be returned in af(1).

work

(local) Same type as a. Workspace array of dimension lwork.

lwork

(local or global) INTEGER. The size of the work array, must be at least lwork nrhs*(NB+2*bwl+4*bwu).

Output Parameters

ipiv

(local) INTEGER array.

The dimension of ipiv must be desca(NB).

Contains pivot indices for local factorizations. Note that you should not alter the contents of this array between factorization and solve.

b

On exit, overwritten by the local pieces of the solution distributed matrix X.

af

(local)

REAL for psgbtrs

DOUBLE PRECISION for pdgbtrs

COMPLEX for pcgbtrs

DOUBLE COMPLEX for pzgbtrs.

Array, dimension (laf).

Auxiliary Fillin space. Fillin is created during the factorization routine p?gbtrf and this is stored in af.

Note that if a linear system is to be solved using p?gbtrs after the factorization routine, af must not be altered after the factorization.

work(1)

On exit, work(1) contains the minimum value of lwork required for optimum performance.

info

INTEGER. If info=0, the execution is successful.

info < 0:

If the i-th argument is an array and the jth entry had an illegal value, then info = -(i*100+j); if the i-th argument is a scalar and had an illegal value, then info = -i.


Submit feedback on this help topic