p?syevr
p?syevr
Computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix using Relatively Robust Representation.
Syntax
void pssyevr
(
char*
jobz
,
char*
range
,
char*
uplo
,
MKL_INT*
n
,
float*
a
,
MKL_INT*
ia
,
MKL_INT*
ja
,
MKL_INT*
desca
,
float*
vl
,
float*
vu
,
MKL_INT*
il
,
MKL_INT*
iu
,
MKL_INT*
m
,
MKL_INT*
nz
,
float*
w
,
float*
z
,
MKL_INT*
iz
,
MKL_INT*
jz
,
MKL_INT*
descz
,
float*
work
,
MKL_INT*
lwork
,
MKL_INT*
iwork
,
MKL_INT*
liwork
,
MKL_INT*
info
);
void pdsyevr
(
char*
jobz
,
char*
range
,
char*
uplo
,
MKL_INT*
n
,
double*
a
,
MKL_INT*
ia
,
MKL_INT*
ja
,
MKL_INT*
desca
,
double*
vl
,
double*
vu
,
MKL_INT*
il
,
MKL_INT*
iu
,
MKL_INT*
m
,
MKL_INT*
nz
,
double*
w
,
double*
z
,
MKL_INT*
iz
,
MKL_INT*
jz
,
MKL_INT*
descz
,
double*
work
,
MKL_INT*
lwork
,
MKL_INT*
iwork
,
MKL_INT*
liwork
,
MKL_INT*
info
);
Include Files
- mkl_scalapack.h
Description
p?syevr
computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A
distributed in 2D blockcyclic format by calling the recommended sequence of ScaLAPACK functions
. First, the matrix
A
is reduced to real symmetric tridiagonal form. Then, the eigenproblem is solved using the parallel MRRR algorithm. Last, if eigenvectors have been computed, a backtransformation is done. Upon successful completion, each processor stores a copy of all computed eigenvalues in
w
. The eigenvector matrix z
is stored in 2D block-cyclic format distributed over all processors. Note that subsets of eigenvalues/vectors can be selected by specifying a range of values or a range of indices for the desired eigenvalues.
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
- (global)Specifies whether or not to compute the eigenvectors:= 'N': Compute eigenvalues only.= 'V': Compute eigenvalues and eigenvectors.
- range
- (global)= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the interval [vl,vu] will be found.= 'I': theil-th throughiu-th eigenvalues will be found.
- uplo
- (global)Specifies whether the upper or lower triangular part of the symmetric matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
- n
- (global )The number of rows and columns of the matrixa.n≥0
- a
- Block cyclic array of global size, local sizen*n).lld_a*(LOCcja+n-1)This array contains the local pieces of the symmetric distributed matrixA. Ifuplo= 'U', only the upper triangular part ofais used to define the elements of the symmetric matrix. Ifuplo= 'L', only the lower triangular part ofais used to define the elements of the symmetric matrix.On exit, the lower triangle (ifuplo='L') or the upper triangle (ifuplo='U') ofa, including the diagonal, is destroyed.
- ia
- (global )Global row index in the global matrixAthat points to the beginning of the submatrix which is to be operated on. It should be set to 1 when operating on a full matrix.
- ja
- (global )Global column index in the global matrixAthat points to the beginning of the submatrix which is to be operated on. It should be set to 1 when operating on a full matrix.
- desca
- (global and local) array of sizedlen_=9.The array descriptor for the distributed matrixa.
- vl
- (global )Ifrange='V', the lower bound of the interval to be searched for eigenvalues. Not referenced ifrange= 'A' or 'I'.
- vu
- (global )Ifrange='V', the upper bound of the interval to be searched for eigenvalues. Not referenced ifrange= 'A' or 'I'.
- il
- (global )Ifrange='I', the index (from smallest to largest) of the smallest eigenvalue to be returned.il≥1.Not referenced ifrange= 'A'.
- iu
- (global )Ifrange='I', the index (from smallest to largest) of the largest eigenvalue to be returned. min(il,n)≤iu≤n.Not referenced ifrange= 'A'.
- iz
- (global )Global row index in the global matrixZthat points to the beginning of the submatrix which is to be operated on. It should be set to 1 when operating on a full matrix.
- jz
- (global )Global column index in the global matrixZthat points to the beginning of the submatrix which is to be operated on. It should be set to 1 when operating on a full matrix.
- descz
- array of sizedlen_.The array descriptor for the distributed matrixz.The contextdescz[must equalctxt_- 1]desca[. Also note the array alignment requirements specified below.ctxt_- 1]
- work
- (local workspace) array of sizelwork
- lwork
- (local )Size ofwork, must be at least 3.See below for definitions of variables used to definelwork.If no eigenvectors are requested (jobz= 'N') thenlwork≥2 + 5*n+ max( 12 *nn,neig* (np0+ 1 ) )If eigenvectors are requested (jobz= 'V' ) then the amount of workspace required is:lwork≥2 + 5*n+ max( 18*nn,np0*mq0+ 2 *neig*neig) + (2 +iceil(neig,nprow*npcol))*nnVariable definitions:neig= number of eigenvectors requestednb=desca[=mb_- 1]desca(nb_) =descz[=mb_- 1]descz(nb_)nn= max(n,neig, 2 )desca[=rsrc_- 1]desca[=csrc_nb_- 1]descz[=rsrc_- 1]descz[= 0csrc_- 1]np0=numroc(nn,neig, 0, 0,nprow)mq0=numroc( max(neig,neig, 2 ),neig, 0, 0,npcol)iceil(x,y) is a ScaLAPACK function returning ceiling(x/y), andnprowandnpcolcan be determined by calling thefunctionblacs_gridinfo.Iflwork= -1, thenlworkis global input and a workspace query is assumed; thefunctiononly calculates the size required for optimal performance for all work arrays. Each of these values is returned in the first entry of the corresponding work arrays, and no error message is issued by pxerbla.
- liwork
- (local )size ofiworkLetnnp= max(n,nprow*npcol+ 1, 4 ). Then:liwork≥12*nnp+ 2*nwhen the eigenvectors are desiredliwork≥10*nnp+ 2*nwhen only the eigenvalues have to be computedIfliwork= -1, thenliworkis global input and a workspace query is assumed; thefunctiononly calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued bypxerbla.
OUTPUT Parameters
- m
- (global )Total number of eigenvalues found. 0≤m≤n.
- nz
- (global )Total number of eigenvectors computed. 0≤nz≤m.The number of columns ofzthat are filled.Ifjobz≠'V',nzis not referenced.Ifjobz= 'V',nz=m
- w
- (global ) array of sizenUpon successful exit, the firstmentries contain the selected eigenvalues in ascending order.
- z
- Block-cyclic array, global size, local sizen*n.lld_z*(LOCcjz+n-1)On exit, contains local pieces of distributed matrixZ.
- work
- On return,work[0]contains the optimal amount of workspace required for efficient execution. Ifjobz='N'work[0]= optimal amount of workspace required to compute the eigenvalues. Ifjobz='V'work[0]= optimal amount of workspace required to compute eigenvalues and eigenvectors.
- iwork
- (local workspace) arrayOn return,iwork[0]contains the amount of integer workspace required.
- info
- (global )= 0: successful exit< 0: If thei-th argument is an array and thejth-entry had an illegal value, theninfo= -(i*100+j), if thei-th argument is a scalar and had an illegal value, theninfo= -i.
Application Notes
The distributed submatrices
a
(ia
:*, ja
:*) and z
(iz
:iz
+m
-1,jz
:jz
+n
-1) must satisfy the following alignment properties: - Identical (quadratic) dimension:desca[=m_- 1]descz[=m_- 1]desca[=n_- 1]descz[n_- 1]
- Quadratic conformal blocking:desca[=mb_- 1]desca[=nb_- 1]descz[=mb_- 1]descz[,nb_- 1]desca[=rsrc_- 1]descz[rsrc_- 1]
- mod(ia-1,mb_a) = mod(iz-1,mb_z) = 0
mod(
is the integer remainder of x
,y
)x
/y