Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 11/07/2023
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

call psgeequ(m, n, a, ia, ja, desca, r, c, rowcnd, colcnd, amax, info)

call pdgeequ(m, n, a, ia, ja, desca, r, c, rowcnd, colcnd, amax, info)

call pcgeequ(m, n, a, ia, ja, desca, r, c, rowcnd, colcnd, amax, info)

call pzgeequ(m, n, a, ia, ja, desca, r, c, rowcnd, colcnd, amax, info)

Include Files

Description

The p?geequroutine 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) INTEGER. The number of rows to be operated on, that is, the number of rows of the distributed matrix sub(A) (m 0).

n

(global) INTEGER. The number of columns to be operated on, that is, the number of columns of the distributed matrix sub(A) (n 0).

a

(local)

REAL for psgeequ

DOUBLE PRECISION for pdgeequ

COMPLEX for pcgeequ

DOUBLE COMPLEX for pzgeequ .

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) INTEGER. 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) INTEGER array of size dlen_. The array descriptor for the distributed matrix A.

Output Parameters

r, c

(local) REAL for single precision flavors;

DOUBLE PRECISION for double precision flavors.

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

If info = 0, or info>ia+m-1, the array r(ia:ia+m-1) contains the row scale factors for sub(A). 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, the array c (ja:ja+n-1) contains the column scale factors for sub(A). 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) REAL for single precision flavors;

DOUBLE PRECISION for double precision flavors.

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

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

If colcnd 0.1, it is not worth scaling by c(ja:ja+n-1).

amax

(global) REAL for single precision flavors;

DOUBLE PRECISION for double precision flavors.

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) INTEGER. If info=0, the execution is successful.

info < 0:

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

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