Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

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

Document Table of Contents

p?poequ

Computes row and column scaling factors intended to equilibrate a symmetric (Hermitian) positive definite distributed matrix and reduce its condition number.

Syntax

void pspoequ (MKL_INT *n , float *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *sr , float *sc , float *scond , float *amax , MKL_INT *info );

void pdpoequ (MKL_INT *n , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *sr , double *sc , double *scond , double *amax , MKL_INT *info );

void pcpoequ (MKL_INT *n , MKL_Complex8 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *sr , float *sc , float *scond , float *amax , MKL_INT *info );

void pzpoequ (MKL_INT *n , MKL_Complex16 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *sr , double *sc , double *scond , double *amax , MKL_INT *info );

Include Files

  • mkl_scalapack.h

Description

The p?poequ function computes row and column scalings intended to equilibrate a real symmetric or complex Hermitian positive definite distributed matrix sub(A) = A(ia:ia+n-1, ja:ja+n-1) and reduce its condition number (with respect to the two-norm). The output arrays sr and sc return the row and column scale factors


Equation

These factors are chosen so that the scaled distributed matrix B with elements bij=s(i)*aij*s(j) has ones on the diagonal.

This choice of sr and sc puts the condition number of B within a factor n of the smallest possible condition number over all possible diagonal scalings.

The auxiliary function p?laqsy uses scaling factors computed by p?geequ to scale a general rectangular matrix.

Input Parameters

n

(global) The number of rows and columns to be operated on, that is, the order of the distributed matrix sub(A) (n0).

a

(local)

Pointer into the local memory to an array of local size lld_a*LOCc(ja+n-1).

The array a contains the n-by-n symmetric/Hermitian positive definite distributed matrix sub(A) whose scaling factors are to be computed. Only the diagonal elements of sub(A) are referenced.

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

sr, sc

(local)

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

If info = 0, the array sr(ia:ia+n-1) contains the row scale factors for sub(A). sr is aligned with the distributed matrix A, and replicated across every process column. sr is tied to the distributed matrix A.

If info = 0, the array sc(ja:ja+n-1) contains the column scale factors for sub(A). sc is aligned with the distributed matrix A, and replicated down every process row. sc is tied to the distributed matrix A.

scond

(global)

If info = 0, scond contains the ratio of the smallest sr[i] ( or sc[j]) to the largest sr[i] ( or sc[j]), with

ia-1≤i<ia+n-1 and ja-1≤j<ja+n-1.

If scond 0.1 and amax is neither too large nor too small, it is not worth scaling by sr ( or sc ).

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 = k, the k-th diagonal entry of sub(A) is nonpositive.

 

See Also