p?geequ
p?geequ
Computes row and column scaling factors intended to equilibrate a general rectangular distributed matrix and reduce its condition number.
Syntax
void
psgeequ
(
MKL_INT
*m
,
MKL_INT
*n
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*r
,
float
*c
,
float
*rowcnd
,
float
*colcnd
,
float
*amax
,
MKL_INT
*info
);
void
pdgeequ
(
MKL_INT
*m
,
MKL_INT
*n
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*r
,
double
*c
,
double
*rowcnd
,
double
*colcnd
,
double
*amax
,
MKL_INT
*info
);
void
pcgeequ
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*r
,
float
*c
,
float
*rowcnd
,
float
*colcnd
,
float
*amax
,
MKL_INT
*info
);
void
pzgeequ
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*r
,
double
*c
,
double
*rowcnd
,
double
*colcnd
,
double
*amax
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The , and the array . These factors are chosen to try to make the largest element in each row and column of the matrix =** have absolute value 1.
p?geequ
function
computes row and column scalings intended to equilibrate an m
-by-n
distributed matrix sub(A
) = A
(ia
:ia
+m
-1, ja
:ja
+n
-1) and reduce its condition number. The output array r
returns the row scale factors r
i
c
returns the column scale factors c
j
B
with elements b
i
j
r
i
a
i
j
c
j
r
i
c
j
SMLNUM
= smallest safe number and BIGNUM
= largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of sub(A
) but works well in practice.SMLNUM
and
BIGNUM
are parameters representing machine precision. You can use the
?lamch
routines to compute them. For example, compute single precision values of
SMLNUM
and
BIGNUM
as follows:
SMLNUM = slamch ('s') BIGNUM = 1 / SMLNUM
The auxiliary function p?laqge uses scaling factors computed by
p?geequ
to scale a general rectangular matrix. Input Parameters
- m
- (global) The number of rows to be operated on, that is, the number of rows of the distributed matrix sub(A)(.m≥0)
- n
- (global) The number of columns to be operated on, that is, the number of columns of the distributed matrix sub(A)(.n≥0)
- a
- (local)Pointer into the local memory to an array of local size.lld_a*LOCc(ja+n-1)The arrayacontains the local pieces of them-by-ndistributed matrix whose equilibration factors are to be computed.
- 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.
Output Parameters
- r,c
- (local)Arrays of sizesandLOCr(m_a), respectively.LOCc(n_a)If, orinfo= 0,info>ia+m-1the row scale factors for sub(r[i] containA)for.ia-1≤i<ia+m-1ris aligned with the distributed matrixA, and replicated across every process column.ris tied to the distributed matrixA.If,info= 0the column scale factors for sub(c[i] containA)for.ja-1≤i<ja+n-1cis aligned with the distributed matrixA, and replicated down every process row.cis tied to the distributed matrixA.
- rowcnd,colcnd
- (global)Iforinfo= 0,info>ia+m-1rowcndcontains the ratio of the smallestto the largestri(iria≤i≤ia+m-1). Ifandrowcnd≥0.1amaxis neither too large nor too small, it is not worth scaling by.riIf,info= 0colcndcontains the ratio of the smallestto the largestcj(cjja≤j≤ja+n-1).If, it is not worth scaling bycolcnd≥0.1.cj
- amax
- (global)Absolute value of the largest matrix element. Ifamaxis very close to overflow or very close to underflow, the matrix should be scaled.
- 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.:info>0Ifinfo=iandi≤m, thei-th row of the distributed matrixsub(A) is exactly zero;i>m, the (i-m)-th column of the distributedmatrix sub(A) is exactly zero.