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?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 jobz = 'N', then only eigenvalues are computed.

If jobz = 'V', then eigenvalues and eigenvectors are computed.

uplo

(global) Must be 'U' or 'L'.

Specifies whether the upper or lower triangular part of the Hermitian matrix A is stored:

If uplo = 'U', a stores the upper triangular part of A.

If uplo = 'L', a stores the lower triangular part of A.

n

(global) The number of rows and columns of the matrix A(n 0).

a

(local).

Block cyclic array of global size n*n and local size lld_a*LOCc(ja+n-1). On entry, the symmetric matrix A.

If uplo = 'U', only the upper triangular part of A is used to define the elements of the symmetric matrix.

If uplo = 'L', only the lower triangular part of A is used to define the elements of the symmetric matrix.

ia, ja

(global) The row and column indices in the global matrix A indicating the first row and the first column of the submatrix A, respectively.

desca

(global and local) array of size dlen_. The array descriptor for the distributed matrix A. If desca[ctxt_ - 1] is incorrect, p?syevd cannot guarantee correct error reporting.

iz, jz

(global) The row and column indices in the global matrix Z indicating the first row and the first column of the submatrix Z, respectively.

descz

(global and local) array of size dlen_. The array descriptor for the distributed matrix Z. descz[ctxt_ - 1] must equal desca[ctxt_ - 1].

work

(local).

Array of size lwork.

lwork

(local) The size of the array work.

If eigenvalues are requested:

lwork max( 1+6*n + 2*np*nq, trilwmin) + 2*n

with trilwmin = 3*n + max( nb*( np + 1), 3*nb )

np = numroc( n, nb, myrow, iarow, NPROW)

nq = numroc( n, nb, mycol, iacol, NPCOL)

If lwork = -1, then lwork is global input and a workspace query is assumed; the function only 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 by pxerbla.

iwork

(local) Workspace array of size liwork.

liwork

(local) , size of iwork.

liwork = 7*n + 8*npcol + 2.

Output Parameters

a

On exit, the lower triangle (if uplo = 'L'), or the upper triangle (if uplo = 'U') of A, including the diagonal, is overwritten.

w

(global).

Array of size n. If info = 0, w contains the eigenvalues in the ascending order.

z

(local).

Array, global size (n, n), local size lld_z*LOCc(jz+n-1).

The z parameter contains the orthonormal eigenvectors of the matrix A.

work[0]

On exit, returns adequate workspace to allow optimal performance.

iwork[0]

(local).

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

info

(global)

If info = 0, the execution is successful.

If info < 0:

If the i-th argument is an array and the j-entry 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.

If info> 0:

The algorithm failed to compute the info/(n+1)-th eigenvalue while working on the submatrix lying in global rows and columns mod(info,n+1).

NOTE:

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

See Also