p?gbtrs
p?gbtrs
Solves a system of distributed linear equations with a general band matrix, using the
LU
factorization computed by p?gbtrf
.Syntax
void
psgbtrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*bwl
,
MKL_INT
*bwu
,
MKL_INT
*nrhs
,
float
*a
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
float
*b
,
MKL_INT
*ib
,
MKL_INT
*descb
,
float
*af
,
MKL_INT
*laf
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pdgbtrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*bwl
,
MKL_INT
*bwu
,
MKL_INT
*nrhs
,
double
*a
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
double
*b
,
MKL_INT
*ib
,
MKL_INT
*descb
,
double
*af
,
MKL_INT
*laf
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pcgbtrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*bwl
,
MKL_INT
*bwu
,
MKL_INT
*nrhs
,
MKL_Complex8
*a
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
MKL_Complex8
*b
,
MKL_INT
*ib
,
MKL_INT
*descb
,
MKL_Complex8
*af
,
MKL_INT
*laf
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pzgbtrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*bwl
,
MKL_INT
*bwu
,
MKL_INT
*nrhs
,
MKL_Complex16
*a
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
MKL_Complex16
*b
,
MKL_INT
*ib
,
MKL_INT
*descb
,
MKL_Complex16
*af
,
MKL_INT
*laf
,
MKL_Complex16
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?gbtrs
function
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(*X = sub(
A
)T
B
) (transpose), sub(*
A
)H
X
= sub(B
) (conjugate transpose),where sub(
B
) = B
(ib
:ib
+n
-1, 1:nrhs
).Input Parameters
- trans
- (global) Must be'N'or'T'or'C'.Indicates the form of the equations:If, then sub(trans='N'A)*X= sub(B) is solved forX.If, then sub(trans='T'A)*TX= sub(B) is solved forX.If, then sub(trans='C'A)*HX= sub(B) is solved forX.
- n
- (global) The number of linear equations; the order of the distributed matrix sub(A)(.n≥0)
- bwl
- (global) The number of sub-diagonals within the band ofA( 0 ≤.bwl≤n-1)
- bwu
- (global) The number of super-diagonals within the band ofA( 0 ≤.bwu≤n-1)
- nrhs
- (global) The number of right hand sides; the number of columns of the distributed matrix sub(B)(.nrhs≥0)
- a,b
- (local)Pointers into the local memory to arrays of local sizesandlld_a*LOCc(ja+n-1), respectively.lld_b*LOCc(nrhs)The arrayacontains details of theLUfactorization of the distributed band matrixA.On entry, the arraybcontains the local pieces of the right hand sidesB(ib:ib+n-1, 1:nrhs).
- ja
- (global) The index in the global matrixAindicating the start of the matrix to be operated on ( which may be either all ofAor a submatrix ofA).
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.If, thendtype_a= 501;dlen_≥7else if, thendtype_a= 1.dlen_≥9
- ib
- (global) The index in the global matrixAindicating the start of the matrix to be operated on (which may be either all ofAor a submatrix ofA).
- descb
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.If, thendtype_b= 502;dlen_≥7else if, thendtype_b= 1.dlen_≥9
- laf
- (local) The size of the arrayaf.Must belaf≥nb_a*(bwl+bwu)+6*(bwl+bwu)*(bwl+2*bwu).Iflafis not large enough, an error code will be returned and the minimum acceptable size will be returned inaf[0].
- work
- (local) Same type asa. Workspace array of sizelwork.
- lwork
- (local or global) The size of theworkarray, must be at least.lwork≥nrhs*(nb_a+2*bwl+4*bwu)
Output Parameters
- ipiv
- (local) array.The size ofipivmust be.≥nb_aContains 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 matrixX.
- af
- (local)Array of sizelaf.Auxiliary Fill-in space. The fill-in space is created in a call to the factorizationfunctionp?gbtrfand is stored inaf.Note that if a linear system is to be solved using p?gbtrs after the factorizationfunction,afmust not be altered after the factorization.
- work[0]
- On exit,contains the minimum value ofwork[0]lworkrequired for optimum performance.
- info
- If, the execution is successful.info=0:info< 0If thei-th argument is an array and thej-th entry, indexedhad an illegal value, thenj- 1,info= -(i*100+j); if thei-th argument is a scalar and had an illegal value, theninfo=-i.