Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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 p?geequfunction 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 ri , and the array c returns the column scale factors cj . These factors are chosen to try to make the largest element in each row and column of the matrix B with elements bij=ri*aij*cj have absolute value 1.

ri and cj are restricted to be between 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 array a contains the local pieces of the m-by-n distributed matrix whose equilibration factors are to be computed.

ia, ja

(global) The row and column indices in the global matrix A indicating the first row and the first column of the matrix sub(A), respectively.

desca

(global and local) array of size dlen_. The array descriptor for the distributed matrix A.

Output Parameters
r, c

(local)

Arrays of sizes LOCr(m_a) and LOCc(n_a), respectively.

If info = 0, or info>ia+m-1, r[i] contain the row scale factors for sub(A) for ia-1≤ i<ia+m-1. r is aligned with the distributed matrix A, and replicated across every process column. r is tied to the distributed matrix A.

If info = 0, c[i] contain the column scale factors for sub(A) for ja-1≤ i<ja+n-1. c is aligned with the distributed matrix A, and replicated down every process row. c is tied to the distributed matrix A.

rowcnd, colcnd

(global)

If info = 0 or info>ia+m-1, rowcnd contains the ratio of the smallest ri to the largest ri (iaiia+m-1). If rowcnd 0.1 and amax is neither too large nor too small, it is not worth scaling by ri.

If info = 0, colcnd contains the ratio of the smallest cj to the largest cj (ja jja+n-1).

If colcnd 0.1, it is not worth scaling by cj.

amax

(global)

Absolute value of the largest matrix element. If amax is very close to overflow or very close to underflow, the matrix should be scaled.

info

(global) If info=0, the execution is successful.

info < 0:

If the i-th argument is an array and the j-th entry, indexed j - 1, 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.

info> 0:

If info = i and

im, the i-th row of the distributed matrix

sub(A) is exactly zero;

i>m, the (i - m)-th column of the distributed

matrix sub(A) is exactly zero.

See Also