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?lahqr

Computes the Schur decomposition and/or eigenvalues of a matrix already in Hessenberg form.

Syntax

void pslahqr (MKL_INT *wantt, MKL_INT *wantz, MKL_INT *n, MKL_INT *ilo, MKL_INT *ihi, float *a, MKL_INT *desca, float *wr, float *wi, MKL_INT *iloz, MKL_INT *ihiz, float *z, MKL_INT *descz, float *work, MKL_INT *lwork, MKL_INT *iwork, MKL_INT *ilwork, MKL_INT *info );

void pdlahqr (MKL_INT *wantt, MKL_INT *wantz, MKL_INT *n, MKL_INT *ilo, MKL_INT *ihi, double *a, MKL_INT *desca, double *wr, double *wi, MKL_INT *iloz, MKL_INT *ihiz, double *z, MKL_INT *descz, double *work, MKL_INT *lwork, MKL_INT *iwork, MKL_INT *ilwork, MKL_INT *info );

void pclahqr (const MKL_INT *wantt, const MKL_INT *wantz, const MKL_INT *n, const MKL_INT *ilo, const MKL_INT *ihi, MKL_Complex8 *a, const MKL_INT *desca, MKL_Complex8 *w, const MKL_INT *iloz, const MKL_INT *ihiz, MKL_Complex8 *z, const MKL_INT *descz, MKL_Complex8 *work, const MKL_INT *lwork, const MKL_INT *iwork, const MKL_INT *ilwork, MKL_INT *info );

void pzlahqr (const MKL_INT *wantt, const MKL_INT *wantz, const MKL_INT *n, const MKL_INT *ilo, const MKL_INT *ihi, MKL_Complex16 *a, const MKL_INT *desca, MKL_Complex16 *w, const MKL_INT *iloz, const MKL_INT *ihiz, MKL_Complex16 *z, const MKL_INT *descz, MKL_Complex16 *work, const MKL_INT *lwork, const MKL_INT *iwork, const MKL_INT *ilwork, MKL_INT *info );

Include Files

  • mkl_scalapack.h

Description

This is an auxiliary function used to find the Schur decomposition and/or eigenvalues of a matrix already in Hessenberg form from columns ilo and ihi.

NOTE:

These restrictions apply to the use of p?lahqr:

  • The code requires the distributed block size to be square and at least 6.

  • The code requires A and Z to be distributed identically and have identical contexts.

  • The matrix A must be in upper Hessenberg form. If elements below the subdiagonal are non-zero, the resulting transformations can be nonsimilar.

  • All eigenvalues are distributed to all the nodes.

Input Parameters

wantt

(global)

If wantt 0, the full Schur form T is required;

If wantt = 0, only eigenvalues are required.

wantz

(global)

If wantz 0, the matrix of Schur vectors Z is required;

If wantz = 0, Schur vectors are not required.

n

(global) The order of the Hessenberg matrix A (and z if wantz is non-zero). n≥0.

ilo, ihi

(global)

It is assumed that A is already upper quasi-triangular in rows and columns ihi+1:n, and that A(ilo, ilo-1) = 0 (unless ilo = 1). p?lahqr works primarily with the Hessenberg submatrix in rows and columns ilo to ihi, but applies transformations to all of H if wantt is non-zero. 1≤ilo≤max(1,ihi); ihin.

a

(global)

Array, of size lld_a * LOCc(n) . On entry, the upper Hessenberg matrix A.

desca

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

iloz, ihiz

(global) Specify the rows of the matrix Z to which transformations must be applied if wantz is non-zero. 1≤ilozilo; ihiihizn.

z

(global )

Array. If wantz is non-zero, on entry z must contain the current matrix Z of transformations accumulated by pdhseqr. If wantz is zero, z is not referenced.

descz

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

work

(local)

Workspace array with size lwork.

lwork

(local) The size of work. lwork is assumed big enough so that lwork≥3*n + max(2*max(lld_z,lld_a) + 2*LOCq(n), 7*ceil(n/hbl)/lcm(NPROW,NPCOL))).

If lwork = -1, then work[0] gets set to the above number and the code returns immediately.

iwork

(global and local) array of size ilwork. Not referenced and can be NULL pointer.

ilwork

(local) This holds some of the iblk integer arrays. Not referenced and can be NULL pointer.

Output Parameters

a

On exit, if wantt is non-zero, A is upper quasi-triangular in rows and columns ilo:ihi, with any 2-by-2 or larger diagonal blocks not yet in standard form. If wantt is zero, the contents of A are unspecified on exit.

work[0]

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

wr, wi

(global replicated output)

Arrays of size n each. The real and imaginary parts, respectively, of the computed eigenvalues ilo to ihiare stored in the corresponding elements of wr and wi. If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of wr and wi, say the i-th and (i+1)-th, with wi[i-1]> 0 and wi[i] < 0. If wantt is zero, the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in A. A may be returned with larger diagonal blocks until the next release.

w

(global replicated output)

Array of size n. The computed eigenvalues ilo to ihi are stored in the corresponding elements of w. If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of w, say the i-th and (i+1)-th, with w[i-1]> 0 and w[i] < 0. If wantt is zero, the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in A. A may be returned with larger diagonal blocks until the next release.

z

On exit z has been updated; transformations are applied only to the submatrix Z(iloz:ihiz, ilo:ihi).

info

(global)

= 0: the execution is successful.

< 0: the parameter number - info is incorrect or inconsistent

> 0: p?lahqr failed to compute all the eigenvalues ilo to ihi in a total of 30*(ihi-ilo+1) iterations; if info = i, elements i+1: ihi of wr and wi contain the eigenvalues that have been successfully computed.

See Also