Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
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?gecon

Estimates the reciprocal of the condition number of a general distributed matrix in either the 1-norm or the infinity-norm.

Syntax

void psgecon (char *norm , MKL_INT *n , float *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *anorm , float *rcond , float *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );

void pdgecon (char *norm , MKL_INT *n , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *anorm , double *rcond , double *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );

void pcgecon (char *norm , MKL_INT *n , MKL_Complex8 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *anorm , float *rcond , MKL_Complex8 *work , MKL_INT *lwork , float *rwork , MKL_INT *lrwork , MKL_INT *info );

void pzgecon (char *norm , MKL_INT *n , MKL_Complex16 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *anorm , double *rcond , MKL_Complex16 *work , MKL_INT *lwork , double *rwork , MKL_INT *lrwork , MKL_INT *info );

Include Files

  • mkl_scalapack.h

Description

The p?gecon function estimates the reciprocal of the condition number of a general distributed real/complex matrix sub(A) = A(ia:ia+n-1, ja:ja+n-1) in either the 1-norm or infinity-norm, using the LU factorization computed by p?getrf.

An estimate is obtained for ||(sub(A))-1||, and the reciprocal of the condition number is computed as


Equation

Input Parameters

norm

(global) Must be '1' or 'O' or 'I'.

Specifies whether the 1-norm condition number or the infinity-norm condition number is required.

If norm = '1' or 'O', then the 1-norm is used;

If norm = 'I', then the infinity-norm is used.

n

(global) The order of the distributed matrix sub(A) (n 0).

a

(local)

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

The array a contains the local pieces of the factors L and U from the factorization sub(A) = P*L*U; the unit diagonal elements of L are not stored.

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.

anorm

(global)

If norm = '1' or 'O', the 1-norm of the original distributed matrix sub(A);

If norm = 'I', the infinity-norm of the original distributed matrix sub(A).

work

(local)

The array work of size lwork is a workspace array.

lwork

(local or global) The size of the array work.

For real flavors:

lwork must be at least

lwork 2*LOCr(n+mod(ia-1,mb_a))+2*LOCc(n+mod(ja-1,nb_a))+max(2, max(nb_a*max(1, iceil(NPROW-1, NPCOL)), LOCc(n+mod(ja-1,nb_a)) + nb_a*max(1, iceil(NPCOL-1, NPROW)))).

For complex flavors:

lwork must be at least

lwork 2*LOCr(n+mod(ia-1,mb_a))+max(2, max(nb_a*iceil(NPROW-1, NPCOL), LOCc(n+mod(ja-1,nb_a))+ nb_a*iceil(NPCOL-1, NPROW))).

LOCr and LOCc values can be computed using the ScaLAPACK tool function numroc; NPROW and NPCOL can be determined by calling the function blacs_gridinfo.

NOTE:

iceil(x,y) is the ceiling of x/y, and mod(x,y) is the integer remainder of x/y.

iwork

(local) Workspace array of size liwork. Used in real flavors only.

liwork

(local or global) The size of the array iwork; used in real flavors only. Must be at least

liworkLOCr(n+mod(ia-1,mb_a)).

rwork

(local)

Workspace array of size lrwork. Used in complex flavors only.

lrwork

(local or global) The size of the array rwork; used in complex flavors only. Must be at least

lrwork max(1, 2*LOCc(n+mod(ja-1,nb_a))).

Output Parameters

rcond

(global)

The reciprocal of the condition number of the distributed matrix sub(A). See Description.

work[0]

On exit, work[0] contains the minimum value of lwork required for optimum performance.

iwork[0]

On exit, iwork[0] contains the minimum value of liwork required for optimum performance (for real flavors).

rwork[0]

On exit, rwork[0] contains the minimum value of lrwork required for optimum performance (for complex flavors).

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.

See Also