p?syevd
p?syevd
Computes all eigenvalues and eigenvectors of a real symmetric matrix by using a divide and conquer algorithm.
Syntax
void
pssyevd
(
char
*jobz
,
char
*uplo
,
MKL_INT
*n
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
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
pdsyevd
(
char
*jobz
,
char
*uplo
,
MKL_INT
*n
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
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
The
p?syevd
function
computes all eigenvalues and eigenvectors of a real symmetric matrix A
by using a divide and conquer algorithm.Input Parameters
np
= the number of rows local to a given process.nq
= the number of columns local to a given process.- jobz
- (global) Must be'N'or'V'.Specifies if it is necessary to compute the eigenvectors:If, then only eigenvalues are computed.jobz='N'If, then eigenvalues and eigenvectors are computed.jobz='V'
- uplo
- (global) Must be'U'or'L'.Specifies whether the upper or lower triangular part of the Hermitian matrixAis stored:If,uplo='U'astores the upper triangular part ofA.If,uplo='L'astores the lower triangular part ofA.
- n
- (global) The number of rows and columns of the matrixA(.n≥0)
- a
- (local).Block cyclic array of global sizeand local sizen*n. On entry, the symmetric matrixlld_a*LOCc(ja+n-1)A.If, only the upper triangular part ofuplo='U'Ais used to define the elements of the symmetric matrix.If, only the lower triangular part ofuplo='L'Ais used to define the elements of the symmetric matrix.
- ia,ja
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the submatrixA, respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA. Ifis incorrect,desca[ctxt_- 1]p?syevdcannot guarantee correct error reporting.
- iz,jz
- (global) The row and column indices in the global matrixZindicating the first row and the first column of the submatrixZ, respectively.
- descz
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixZ.must equaldescz[ctxt_- 1].desca[ctxt_- 1]
- work
- (local).Array of sizelwork.
- lwork
- (local) The size of the arraywork.If eigenvalues are requested:lwork≥max( 1+6*n+ 2*np*nq,trilwmin) + 2*nwithtrilwmin= 3*n+ max(nb*(np+ 1), 3*nb)np=numroc(n,nb,myrow,iarow,NPROW)nq=numroc(n,nb,mycol,iacol,NPCOL)If, thenlwork= -1lworkis global input and a workspace query is assumed; thefunctiononly calculates the size required for optimal performance for all work arrays. The required workspace is returned as the first element of the corresponding work arrays, and no error message is issued bypxerbla.
- iwork
- (local) Workspace array of sizeliwork.
- liwork
- (local) , size ofiwork..liwork= 7*n+ 8*npcol+ 2
Output Parameters
- a
- On exit, the lower triangle (if), or the upper triangle (ifuplo='L') ofuplo='U'A, including the diagonal, is overwritten.
- w
- (global).Array of sizen. If,info= 0wcontains the eigenvalues in the ascending order.
- z
- (local).Array, global size (n,n), local size.lld_z*LOCc(jz+n-1)Thezparameter contains the orthonormal eigenvectors of the matrixA.
- work[0]
- On exit, returns adequate workspace to allow optimal performance.
- iwork[0]
- (local).On exit, ifliwork> 0,iwork[0]returns the optimalliwork.
- info
- (global)If, the execution is successful.info= 0If:info< 0If thei-th argument is an array and thej-entry had an illegal value, then. If theinfo= -(i*100+j)i-th argument is a scalar and had an illegal value, then.info= -iIf:info>0The algorithm failed to compute the-th eigenvalue while working on the submatrix lying in global rows and columnsinfo/(n+1)mod(info,n+1).mod(is the integer remainder ofx,y).x/y