Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

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

Document Table of Contents

?stegr2a

Computes selected eigenvalues and initial representations needed for eigenvector computations.

Syntax

void sstegr2a(char* jobz, char* range, MKL_INT* n, float* d, float* e, float* vl, float* vu, MKL_INT* il, MKL_INT* iu, MKL_INT* m, float* w, float* z, MKL_INT* ldz, MKL_INT* nzc, float* work, MKL_INT* lwork, MKL_INT* iwork, MKL_INT* liwork, MKL_INT* dol, MKL_INT* dou, MKL_INT* needil, MKL_INT* neediu, MKL_INT* inderr, MKL_INT* nsplit, float* pivmin, float* scale, float* wl, float* wu, MKL_INT* info);

void dstegr2a(char* jobz, char* range, MKL_INT* n, double* d, double* e, double* vl, double* vu, MKL_INT* il, MKL_INT* iu, MKL_INT* m, double* w, double* z, MKL_INT* ldz, MKL_INT* nzc, double* work, MKL_INT* lwork, MKL_INT* iwork, MKL_INT* liwork, MKL_INT* dol, MKL_INT* dou, MKL_INT* needil, MKL_INT* neediu, MKL_INT* inderr, MKL_INT* nsplit, double* pivmin, double* scale, double* wl, double* wu, MKL_INT* info);

Include Files
  • mkl_scalapack.h
Description

?stegr2a computes selected eigenvalues and initial representations needed for eigenvector computations in ?stegr2b. It is invoked in the ScaLAPACK MRRR driver p?syevr and the corresponding Hermitian version when both eigenvalues and eigenvectors are computed in parallel on multiple processors. For this case, ?stegr2a implements the first part of the MRRR algorithm, parallel eigenvalue computation and finding the root RRR. At the end of ?stegr2a, other processors might have a part of the spectrum that is needed to continue the computation locally. Once this eigenvalue information has been received by the processor, the computation can then proceed by calling the second part of the parallel MRRR algorithm, ?stegr2b.

Please note:

  • The calling sequence has two additional integer parameters, (compared to LAPACK's stegr), these are dol and dou and should satisfy mdoudol1. These parameters are only relevant for the case jobz = 'V'.

    Globally invoked over all processors, ?stegr2a computes all the eigenvalues specified by range.

    ?stegr2a locally only computes the eigenvalues corresponding to eigenvalues dol through dou in w, indexed dol-1 through dou-1. (That is, instead of computing the eigenvectors belonging to w([0] through w[m-1], only the eigenvectors belonging to eigenvalues w[dol-1] through w[dou-1] are computed. In this case, only the eigenvalues dol through dou are guaranteed to be fully accurate.

  • m is not the number of eigenvalues specified by range, but it is m = dou - dol + 1. Instead, m refers to the number of eigenvalues computed on this processor.

  • While no eigenvectors are computed in ?stegr2a itself (this is done later in ?stegr2b), the interface

    If jobz = 'V' then, depending on range and dol, dou, ?stegr2a might need more workspace in z then the original ?stegr. In particular, the arrays w and z might not contain all the wanted eigenpairs locally, instead this information is distributed over other processors.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201

Input Parameters
jobz

= 'N': Compute eigenvalues only;

= 'V': Compute eigenvalues and eigenvectors.

range

= 'A': all eigenvalues will be found.

= 'V': all eigenvalues in the half-open interval (vl,vu] will be found.

= 'I': eigenvalues of the entire matrix with the indices in a given range will be found.

n

The order of the matrix. n 0.

d

Array of size n

The n diagonal elements of the tridiagonal matrix T. Overwritten on exit.

e

Array of size n

On entry, the (n-1) subdiagonal elements of the tridiagonal matrix T in elements 0 to n-2 of e. e[n-1] need not be set on input, but is used internally as workspace. Overwritten on exit.

vl, vu

If range='V', the lower and upper bounds of the interval to be searched for eigenvalues. vl < vu.

Not referenced if range = 'A' or 'I'.

il, iu

If range='I', the indices (in ascending order) of the smallest eigenvalue, to be returned in w[il-1], and largest eigenvalue, to be returned in w[iu-1]. 1 iliun, if n > 0.

Not referenced if range = 'A' or 'V'.

ldz

The leading dimension of the array z. ldz 1, and if jobz = 'V', then ldz max(1,n).

nzc

The number of eigenvectors to be held in the array z.

If range = 'A', then nzc max(1,n).

If range = 'V', then nzc the number of eigenvalues in (vl,vu].

If range = 'I', then nzciu-il+1.

If nzc = -1, then a workspace query is assumed; the function calculates the number of columns of the matrix stored in array z that are needed to hold the eigenvectors. This value is returned as the first entry of the z array, and no error message related to nzc is issued.

lwork

The size of the array work. lwork max(1,18*n) if jobz = 'V', and lwork max(1,12*n) if jobz = 'N'.

If lwork = -1, then a workspace query is assumed; the function only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.

liwork

The size of the array iwork. liwork max(1,10*n) if the eigenvectors are desired, and liwork max(1,8*n) if only the eigenvalues are to be computed.

If liwork = -1, then a workspace query is assumed; the function only calculates the optimal size of the iwork array, returns this value as the first entry of the iwork array, and no error message related to liwork is issued.

dol, dou

From all the eigenvalues w[0] through w[m-1], only eigenvalues w[dol-1] through w[dou-1] are computed.

OUTPUT Parameters
m

Globally summed over all processors, m equals the total number of eigenvalues found. 0 mn.

If range = 'A', m = n, and if range = 'I', m = iu-il+1.

The local output equals m = dou - dol + 1.

w

Array of size n

The first m elements contain approximations to the selected eigenvalues in ascending order. Note that immediately after exiting this function, only the eigenvalues indexed dol-1 through dou-1 are reliable on this processor because the eigenvalue computation is done in parallel. The other entries are very crude preliminary approximations. Other processors hold reliable information on these other parts of the w array.

This information is communicated in the ScaLAPACK driver.

z

Array of size ldz * max(1,m).

?stegr2a does not compute eigenvectors, this is done in ?stegr2b. The argument z as well as all related other arguments only appear to keep the interface consistent and to signal to the user that this function is meant to be used when eigenvectors are computed.

work

On exit, if info = 0, work[0] returns the optimal (and minimal) lwork.

iwork

On exit, if info = 0, iwork[0] returns the optimal liwork.

needil, neediu

The indices of the leftmost and rightmost eigenvalues needed to accurately compute the relevant part of the representation tree. This information can be used to find out which processors have the relevant eigenvalue information needed so that it can be communicated.

inderr

inderr points to the place in the work space where the eigenvalue uncertainties (errors) are stored.

nsplit

The number of blocks into which T splits. 1 nsplitn.

pivmin

The minimum pivot in the sturm sequence for T.

scale

The scaling factor for the tridiagonal T.

wl, wu

The interval (wl, wu] contains all the wanted eigenvalues.

It is either given by the user or computed in ?larre2a.

info

On exit, info = 0: successful exit

other: if info = -i, the i-th argument had an illegal value

if info = 10x, internal error in ?larre2a,

Here, the digit x = abs( iinfo ) < 10, where iinfo is the nonzero error code returned by ?larre2a.

See Also