p?gerfs
p?gerfs
Improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution.
Syntax
void
psgerfs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*af
,
MKL_INT
*iaf
,
MKL_INT
*jaf
,
MKL_INT
*descaf
,
MKL_INT
*ipiv
,
float
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
float
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
float
*ferr
,
float
*berr
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*iwork
,
MKL_INT
*liwork
,
MKL_INT
*info
);
void
pdgerfs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*af
,
MKL_INT
*iaf
,
MKL_INT
*jaf
,
MKL_INT
*descaf
,
MKL_INT
*ipiv
,
double
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
double
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
double
*ferr
,
double
*berr
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*iwork
,
MKL_INT
*liwork
,
MKL_INT
*info
);
void
pcgerfs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_Complex8
*af
,
MKL_INT
*iaf
,
MKL_INT
*jaf
,
MKL_INT
*descaf
,
MKL_INT
*ipiv
,
MKL_Complex8
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_Complex8
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
float
*ferr
,
float
*berr
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
float
*rwork
,
MKL_INT
*lrwork
,
MKL_INT
*info
);
void
pzgerfs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_Complex16
*af
,
MKL_INT
*iaf
,
MKL_INT
*jaf
,
MKL_INT
*descaf
,
MKL_INT
*ipiv
,
MKL_Complex16
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_Complex16
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
double
*ferr
,
double
*berr
,
MKL_Complex16
*work
,
MKL_INT
*lwork
,
double
*rwork
,
MKL_INT
*lrwork
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?gerfs
function
improves the computed solution to one of the systems of linear equations sub(
A
)*sub(X
) = sub(B
), sub(*sub(
A
)T
X
) = sub(B
), or sub(*sub(
A
)H
X
) = sub(B
) and provides error bounds and backward error estimates for the solution.Here sub(
A
) = A
(ia
:ia
+n
-1, ja
:ja
+n
-1), sub(B
) = B
(ib
:ib
+n
-1, jb
:jb
+nrhs
-1), and sub(X
) = X
(ix
:ix
+n
-1, jx
:jx
+nrhs
-1).Input Parameters
- trans
- (global) Must be'N'or'T'or'C'.Specifies the form of the system of equations:If, the system has the form sub(trans='N'A)*sub(X) = sub(B) (No transpose);If, the system has the form sub(trans='T'A)*sub(TX) = sub(B) (Transpose);If, the system has the form sub(trans='C'A)*sub(HX) = sub(B) (Conjugate transpose).
- n
- (global) The order of the distributed matrix sub(A)(.n≥0)
- nrhs
- (global) The number of right-hand sides, i.e., the number of columns of the matrices sub(B) and sub(X)(.nrhs≥0)
- a,af,b,x
- (local)Pointers into the local memory to arrays of local sizesa:lld_a*LOCc(ja+n-1),af:lld_af*LOCc(jaf+n-1),b:lld_b*LOCc(jb+nrhs-1),x:lld_x*LOCc(jx+nrhs-1).The arrayacontains the local pieces of the distributed matrix sub(A).The arrayafcontains the local pieces of the distributed factors of the matrixsub(as computed byA) =P*L*Up?getrf.The arraybcontains the local pieces of the distributed matrix of right hand sides sub(B).On entry, the arrayxcontains the local pieces of the distributed solution matrix sub(X).
- ia,ja
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the matrix sub(A), respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- iaf,jaf
- (global) The row and column indices in the global matrixAFindicating the first row and the first column of the matrix sub(AF), respectively.
- descaf
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixAF.
- ib,jb
- (global) The row and column indices in the global matrixBindicating the first row and the first column of the matrix sub(B), respectively.
- descb
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixB.
- ix,jx
- (global) The row and column indices in the global matrixXindicating the first row and the first column of the matrix sub(X), respectively.
- descx
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixX.
- ipiv
- (local)Array of size.LOCr(m_af) +mb_afThis array contains pivoting information as computed byp?getrf. Ifipiv[=i]j, then the local rowi+1was swapped with the global rowjwhere.i=0, ... ,- 1LOCr(m_af) +mb_afThis array is tied to the distributed matrixA.
- work
- (local)The arrayworkof sizelworkis a workspace array.
- lwork
- (local or global) The size of the arraywork.For real flavors:lworkmust be at leastlwork≥3*LOCr(n+mod(ia-1,mb_a))For complex flavors:lworkmust be at leastlwork≥2*LOCr(n+mod(ia-1,mb_a))mod(is the integer remainder ofx,y).x/y
- iwork
- (local) Workspace array, sizeliwork. Used in real flavors only.
- liwork
- (local or global) The size of the arrayiwork; used in real flavors only. Must be at least.liwork≥LOCr(n+mod(ib-1,mb_b))
- rwork
- (local)Workspace array, sizelrwork. Used in complex flavors only.
- lrwork
- (local or global) The size of the arrayrwork; used in complex flavors only. Must be at least.lrwork≥LOCr(n+mod(ib-1,mb_b)))
Output Parameters
- x
- On exit, contains the improved solution vectors.
- ferr,berr
- Arrays of sizeLOCc(jb+nrhs-1) each.The arrayferrcontains the estimated forward error bound for each solution vector of sub(X).IfXTRUEis the true solution corresponding to sub(X),ferris an estimated upper bound for the magnitude of the largest element in (sub(X) -XTRUE) divided by the magnitude of the largest element in sub(X). The estimate is as reliable as the estimate forrcond, and is almost always a slight overestimate of the true error.This array is tied to the distributed matrixX.The arrayberrcontains the component-wise relative backward error of each solution vector (that is, the smallest relative change in any entry of sub(A) or sub(B) that makes sub(X) an exact solution). This array is tied to the distributed matrixX.
- work[0]
- On exit,contains the minimum value ofwork[0]lworkrequired for optimum performance.
- iwork[0]
- On exit,contains the minimum value ofiwork[0]liworkrequired for optimum performance (for real flavors).
- rwork[0]
- On exit,contains the minimum value ofrwork[0]lrworkrequired for optimum performance (for complex flavors).
- info
- (global) 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.