Contents

# p?sygvx

Computes selected eigenvalues and, optionally, eigenvectors of a real generalized symmetric definite eigenproblem.

## Syntax

Include Files
• mkl_scalapack.h
Description
The
p?sygvx
function
computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
sub(
A
)*
x
=
λ
*sub(
B
)*
x
,
sub(
A
) sub(
B
)*
x
=
λ*
x
, or
sub(
B
)*sub(
A
)*
x
=
λ*
x
.
Here
x
denotes eigen vectors, λ (
lambda
) denotes eigenvalues,
sub(
A
)
denoting
A(
ia
:
ia
+
n
-1,
ja
:
ja
+
n
-1)
is assumed to symmetric, and sub(
B
) denoting
B
(
ib
:
ib
+
n
-1,
jb
:
jb
+
n
-1)
is also positive definite.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.
Notice revision #20201201
Input Parameters
ibtype
(global) Must be 1 or 2 or 3.
Specifies the problem type to be solved:
If
ibtype
= 1
, the problem type is
sub(
A
)*
x
=
lambda
*sub(
B
)
*x
;
If
ibtype
= 2
, the problem type is
sub(
A
)*sub(
B
)
*x
=
lambda
*x
;
If
ibtype
= 3
, the problem type is
sub(
B
)*sub(
A
)
*x
=
lambda
*
x
.
jobz
(global) Must be
'N'
or
'V'
.
If
jobz
=
'N'
, then compute eigenvalues only.
If
jobz
=
'V'
, then compute eigenvalues and eigenvectors.
range
(global) Must be
'A'
or
'V'
or
'I'
.
If
range
=
'A'
, the
function
computes all eigenvalues.
If
range
=
'V'
, the
function
computes eigenvalues in the interval:
[
vl
,
vu
]
If
range
=
'I'
, the
function
computes eigenvalues with indices
il
through
iu
.
uplo
(global) Must be
'U'
or
'L'
.
If
uplo
=
'U'
, arrays
a
and
b
store the upper triangles of sub(
A
) and sub (
B
);
If
uplo
=
'L'
, arrays
a
and
b
store the lower triangles of sub(
A
) and sub (
B
).
n
(global) The order of the matrices sub(
A
) and sub (
B
),
n
0
.
a
(local)
Pointer into the local memory to an array of size
lld_a
*
LOCc
(
ja
+
n
-1)
. On entry, this array contains the local pieces of the
n
-by-
n
symmetric distributed matrix sub(
A
).
If
uplo
=
'U'
n
-by-
n
upper triangular part of sub(
A
) contains the upper triangular part of the matrix.
If
uplo
=
'L'
n
-by-
n
lower triangular part of sub(
A
) contains the lower triangular part of the 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?sygvx
cannot guarantee correct error reporting.
b
(local).
Pointer into the local memory to an array of size
lld_b
*
LOCc
(
jb
+
n
-1)
. On entry, this array contains the local pieces of the
n
-by-
n
symmetric distributed matrix sub(
B
).
If
uplo
=
'U'
n
-by-
n
upper triangular part of sub(
B
) contains the upper triangular part of the matrix.
If
uplo
=
'L'
n
-by-
n
lower triangular part of sub(
A
) contains the lower triangular part of the matrix.
ib
,
jb
(global) The row and column indices in the global matrix
B
indicating the first row and the first column of the submatrix
B
, respectively.
descb
(global and local) array of size
dlen_
. The array descriptor for the distributed matrix
B
.
descb
[
ctxt_
- 1]
must be equal to
desca
[
ctxt_
- 1]
.
vl
,
vu
(global)
If
range
=
'V'
, the lower and upper bounds of the interval to be searched for eigenvalues.
If
range
=
'A'
or
'I'
,
vl
and
vu
are not referenced.
il
,
iu
(global)
If
range
=
'I'
, the indices in ascending order of the smallest and largest eigenvalues to be returned. Constraint:
il
≥ 1, min(
il
,
n
)≤
iu
n
If
range
=
'A'
or
'V'
,
il
and
iu
are not referenced.
abstol
(global)
If
jobz
=
'V'
, setting
abstol
to
p?lamch
(
context
,
'U'
) yields the most orthogonal eigenvectors.
The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval
[
a
,
b
]
of width less than or equal to
abstol
+
eps
*
max
(|
a
|,|
b
|)
,
where
eps
is the machine precision. If
abstol
is less than or equal to zero, then
eps
*norm(
T
)
will be used in its place, where
norm(
T
)
is the 1-norm of the tridiagonal matrix obtained by reducing
A
to tridiagonal form.
Eigenvalues will be computed most accurately when
abstol
is set to twice the underflow threshold
2*
p?lamch
('S')
not zero. If this
function
returns with
((
mod
(
info
,2)
0)
or
(
mod
(
info
/8,2)
0))
, indicating that some eigenvalues or eigenvectors did not converge, try setting
abstol
to
2*
p?lamch
('S')
.
mod(
x
,
y
)
is the integer remainder of
x
/
y
.
orfac
(global).
Specifies which eigenvectors should be reorthogonalized. Eigenvectors that correspond to eigenvalues which are within
tol
=
orfac
*norm(
A
)
of each other are to be reorthogonalized. However, if the workspace is insufficient (see
lwork
),
tol
may be decreased until all eigenvectors to be reorthogonalized can be stored in one process. No reorthogonalization will be done if
orfac
equals zero. A default value of 1.0e-3 is used if
orfac
is negative.
orfac
should be identical on all processes.
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)
Workspace array of size
lwork
lwork
(local)
Size of the array
work
. See below for definitions of variables used to define
lwork
.
If no eigenvectors are requested (
jobz
=
'N'
), then
lwork
≥ 5*
n
+
max
(5*
nn
,
NB
*(
np
0 + 1))
.
If eigenvectors are requested (
jobz
=
'V'
), then the amount of workspace required to guarantee that all eigenvectors are computed is:
lwork
≥ 5*
n
+
max
(5*
nn
,
np
0*
mq
0 + 2*
nb
*
nb
) +
iceil
(
neig
,
NPROW
*
NPCOL
)*
nn.
The computed eigenvectors may not be orthogonal if the minimal workspace is supplied and
orfac
is too small. If you want to guarantee orthogonality at the cost of potentially poor performance you should add the following to
lwork
:
(
clustersize
-1)*
n
,
where
clustersize
is the number of eigenvalues in the largest cluster, where a cluster is defined as a set of close eigenvalues:
{
w
[
k
- 1],...,
w
[
k
+
clustersize
- 2]|
w
[
j
] ≤
w
[
j
- 1] +
orfac
*2*norm(
A
)}
Variable definitions:
neig
= number of eigenvectors requested,
nb
=
desca
[
mb_
- 1] =
desca
[
nb_
- 1] =
descz
[
mb_
- 1] =
descz
[
nb_
- 1]
,
nn
=
max
(
n
,
nb
, 2)
,
desca
[
rsrc_
- 1] =
desca
[
nb_
- 1] =
descz
[
rsrc_
- 1] =
descz
[
csrc_
- 1] = 0
,
np
0 =
numroc
(
nn
,
nb
, 0, 0,
NPROW
),
mq
0 =
numroc
(
max
(
neig
,
nb
, 2),
nb
, 0, 0,
NPCOL
)
iceil
(
x
,
y
) is a ScaLAPACK function returning ceiling(
x
/
y
)
If
lwork
is too small to guarantee orthogonality,
p?syevx
attempts to maintain orthogonality in the clusters with the smallest spacing between the eigenvalues.
If
lwork
is too small to compute all the eigenvectors requested, no computation is performed and
info
= -23 is returned.
Note that when
range
=
'V'
,
number of requested eigenvectors are not known until the eigenvalues are computed. In this case and if
lwork
is large enough to compute the eigenvalues,
p?sygvx
computes the eigenvalues and as many eigenvectors as possible.
Greater performance can be achieved if adequate workspace is provided. In some situations, performance can decrease as the provided workspace increases above the workspace amount shown below:
lwork
max
(
lwork
, 5*
n
+
nsytrd_lwopt
,
nsygst_lwopt
),
where
lwork
, as defined previously, depends upon the number of eigenvectors requested, and
nsytrd_lwopt
=
n
+ 2*(
anb
+1)*(4*
nps
+2) + (
nps
+3)