|
|
| |
| # lines: |
836 | | # code: |
836 | | # comment: | 0 | |
# blank: | 0 |
| # Variables: | 88 |
| # Callers: | 0 |
| # Callings: | 5 |
| # Words: | 418 |
| # Keywords: | 259 |
|
|
|
|
|
..
.. Array Arguments ..
..
Purpose
=======
PZHEGVX computes all the eigenvalues, and optionally,
the eigenvectors
of a complex generalized Hermitian-definite eigenproblem, of the form
sub( A )*x=(lambda)*sub( B )*x, sub( A )*sub( B )x=(lambda)*x, or
sub( B )*sub( A )*x=(lambda)*x.
Here sub( A ) denoting A( IA:IA+N-1, JA:JA+N-1 ) is assumed to be
Hermitian, and sub( B ) denoting B( IB:IB+N-1, JB:JB+N-1 ) is assumed
to be Hermitian positive definite.
Notes
=====
Each global data object is described by an associated description
vector. This vector stores the information required to establish
the mapping between an object element and its corresponding process
and memory location.
Let A be a generic term for any 2D block cyclicly distributed array.
Such a global array has an associated description vector DESCA.
In the following comments, the character _ should be read as
"of the global array".
NOTATION STORED IN EXPLANATION
--------------- -------------- --------------------------------------
DTYPE_A(global) DESCA( DTYPE_ )The descriptor type. In this case,
DTYPE_A = 1.
CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
the BLACS process grid A is distribu-
ted over. The context itself is glo-
bal, but the handle (the integer
value) may vary.
M_A (global) DESCA( M_ ) The number of rows in the global
array A.
N_A (global) DESCA( N_ ) The number of columns in the global
array A.
MB_A (global) DESCA( MB_ ) The blocking factor used to distribute
the rows of the array.
NB_A (global) DESCA( NB_ ) The blocking factor used to distribute
the columns of the array.
RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
row of the array A is distributed.
CSRC_A (global) DESCA( CSRC_ ) The process column over which the
first column of the array A is
distributed.
LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
array. LLD_A >= MAX(1,LOCr(M_A)).
Let K be the number of rows or columns of a distributed matrix,
and assume that its process grid has dimension p x q.
LOCr( K ) denotes the number of elements of K that a process
would receive if K were distributed over the p processes of its
process column.
Similarly, LOCc( K ) denotes the number of elements of K that a
process would receive if K were distributed over the q processes of
its process row.
The values of LOCr() and LOCc() may be determined via a call to the
ScaLAPACK tool function, NUMROC:
LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ),
LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ).
An upper bound for these quantities may be computed by:
LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A
LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A
Arguments
=========
IBTYPE (global input) INTEGER
Specifies the problem type to be solved:
= 1: sub( A )*x = (lambda)*sub( B )*x
= 2: sub( A )*sub( B )*x = (lambda)*x
= 3: sub( B )*sub( A )*x = (lambda)*x
JOBZ (global input) CHARACTER*1
= 'N': Compute eigenvalues only;
= 'V': Compute eigenvalues and eigenvectors.
RANGE (global input) CHARACTER*1
= 'A': all eigenvalues will be found.
= 'V': all eigenvalues in the interval [VL,VU] will be found.
= 'I': the IL-th through IU-th eigenvalues will be found.
UPLO (global input) CHARACTER*1
= 'U': Upper triangles of sub( A ) and sub( B ) are stored;
= 'L': Lower triangles of sub( A ) and sub( B ) are stored.
N (global input) INTEGER
The order of the matrices sub( A ) and sub( B ). N >= 0.
A (local input/local output) COMPLEX*16 pointer into the
local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).
On entry, this array contains the local pieces of the
N-by-N Hermitian distributed matrix sub( A ). If UPLO = 'U',
the leading N-by-N upper triangular part of sub( A ) contains
the upper triangular part of the matrix. If UPLO = 'L', the
leading N-by-N lower triangular part of sub( A ) contains
the lower triangular part of the matrix.
On exit, if JOBZ = 'V', then if INFO = 0, sub( A ) contains
the distributed matrix Z of eigenvectors. The eigenvectors
are normalized as follows:
if IBTYPE = 1 or 2, Z**H*sub( B )*Z = I;
if IBTYPE = 3, Z**H*inv( sub( B ) )*Z = I.
If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
or the lower triangle (if UPLO='L') of sub( A ), including
the diagonal, is destroyed.
IA (global input) INTEGER
The row index in the global array A indicating the first
row of sub( A ).
JA (global input) INTEGER
The column index in the global array A indicating the
first column of sub( A ).
DESCA (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix A.
If DESCA( CTXT_ ) is incorrect, PZHEGVX cannot guarantee
correct error reporting.
B (local input/local output) COMPLEX*16 pointer into the
local memory to an array of dimension (LLD_B, LOCc(JB+N-1)).
On entry, this array contains the local pieces of the
N-by-N Hermitian distributed matrix sub( B ). If UPLO = 'U',
the leading N-by-N upper triangular part of sub( B ) contains
the upper triangular part of the matrix. If UPLO = 'L', the
leading N-by-N lower triangular part of sub( B ) contains
the lower triangular part of the matrix.
On exit, if INFO <= N, the part of sub( B ) containing the
matrix is overwritten by the triangular factor U or L from
the Cholesky factorization sub( B ) = U**H*U or
sub( B ) = L*L**H.
IB (global input) INTEGER
The row index in the global array B indicating the first
row of sub( B ).
JB (global input) INTEGER
The column index in the global array B indicating the
first column of sub( B ).
DESCB (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix B.
DESCB( CTXT_ ) must equal DESCA( CTXT_ )
VL (global input) DOUBLE PRECISION
If RANGE='V', the lower bound of the interval to be searched
for eigenvalues. Not referenced if RANGE = 'A' or 'I'.
VU (global input) DOUBLE PRECISION
If RANGE='V', the upper bound of the interval to be searched
for eigenvalues. Not referenced if RANGE = 'A' or 'I'.
IL (global input) INTEGER
If RANGE='I', the index (from smallest to largest) of the
smallest eigenvalue to be returned. IL >= 1.
Not referenced if RANGE = 'A' or 'V'.
IU (global input) INTEGER
If RANGE='I', the index (from smallest to largest) of the
largest eigenvalue to be returned. min(IL,N) <= IU <= N.
Not referenced if RANGE = 'A' or 'V'.
ABSTOL (global input) DOUBLE PRECISION
If JOBZ='V', setting ABSTOL to PDLAMCH( 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*PDLAMCH('S') not zero.
If this routine returns with ((MOD(INFO,2).NE.0) .OR.
(MOD(INFO/8,2).NE.0)), indicating that some eigenvalues or
eigenvectors did not converge, try setting ABSTOL to
2*PDLAMCH('S').
See "Computing Small Singular Values of Bidiagonal Matrices
with Guaranteed High Relative Accuracy," by Demmel and
Kahan, LAPACK Working Note #3.
See "On the correctness of Parallel Bisection in Floating
Point" by Demmel, Dhillon and Ren, LAPACK Working Note #70
M (global output) INTEGER
Total number of eigenvalues found. 0 <= M <= N.
NZ (global output) INTEGER
Total number of eigenvectors computed. 0 <= NZ <= M.
The number of columns of Z that are filled.
If JOBZ .NE. 'V', NZ is not referenced.
If JOBZ .EQ. 'V', NZ = M unless the user supplies
insufficient space and PZHEGVX is not able to detect this
before beginning computation. To get all the eigenvectors
requested, the user must supply both sufficient
space to hold the eigenvectors in Z (M .LE. DESCZ(N_))
and sufficient workspace to compute them. (See LWORK below.)
PZHEGVX is always able to detect insufficient space without
computation unless RANGE .EQ. 'V'.
W (global output) DOUBLE PRECISION array, dimension (N)
On normal exit, the first M entries contain the selected
eigenvalues in ascending order.
ORFAC (global input) DOUBLE PRECISION
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 10^-3 is used if ORFAC is negative.
ORFAC should be identical on all processes.
Z (local output) COMPLEX*16 array,
global dimension (N, N),
local dimension ( LLD_Z, LOCc(JZ+N-1) )
If JOBZ = 'V', then on normal exit the first M columns of Z
contain the orthonormal eigenvectors of the matrix
corresponding to the selected eigenvalues. If an eigenvector
fails to converge, then that column of Z contains the latest
approximation to the eigenvector, and the index of the
eigenvector is returned in IFAIL.
If JOBZ = 'N', then Z is not referenced.
IZ (global input) INTEGER
The row index in the global array Z indicating the first
row of sub( Z ).
JZ (global input) INTEGER
The column index in the global array Z indicating the
first column of sub( Z ).
DESCZ (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix Z.
DESCZ( CTXT_ ) must equal DESCA( CTXT_ )
WORK (local workspace/output) COMPLEX*16 array,
dimension (LWORK)
WORK(1) returns the optimal workspace.
LWORK (local input) INTEGER
Size of WORK array. If only eigenvalues are requested:
LWORK >= N + MAX( NB * ( NP0 + 1 ), 3 )
If eigenvectors are requested:
LWORK >= N + ( NP0 + MQ0 + NB ) * NB
with NQ0 = NUMROC( NN, NB, 0, 0, NPCOL ).
For optimal performance, greater workspace is needed, i.e.
LWORK >= MAX( LWORK, N + NHETRD_LWOPT,
NHEGST_LWOPT )
Where LWORK is as defined above, and
NHETRD_LWORK = 2*( ANB+1 )*( 4*NPS+2 ) +
( NPS + 1 ) * NPS
NHEGST_LWOPT = 2*NP0*NB + NQ0*NB + NB*NB
NB = DESCA( MB_ )
NP0 = NUMROC( N, NB, 0, 0, NPROW )
NQ0 = NUMROC( N, NB, 0, 0, NPCOL )
ICTXT = DESCA( CTXT_ )
ANB = PJLAENV( ICTXT, 3, 'PZHETTRD', 'L', 0, 0, 0, 0 )
SQNPC = SQRT( DBLE( NPROW * NPCOL ) )
NPS = MAX( NUMROC( N, 1, 0, 0, SQNPC ), 2*ANB )
NUMROC is a ScaLAPACK tool functions;
PJLAENV is a ScaLAPACK envionmental inquiry function
MYROW, MYCOL, NPROW and NPCOL can be determined by calling
the subroutine BLACS_GRIDINFO.
If LWORK = -1, then LWORK is global input and a workspace
query is assumed; the routine only calculates the optimal
size for all work arrays. Each of these values is returned
in the first entry of the correspondingwork array, and no
error message is issued by PXERBLA.
RWORK (local workspace/output) DOUBLE PRECISION array,
dimension max(3,LRWORK)
On return, RWORK(1) contains the amount of workspace
required for optimal efficiency
if JOBZ='N' RWORK(1) = optimal amount of workspace
required to compute eigenvalues efficiently
if JOBZ='V' RWORK(1) = optimal amount of workspace
required to compute eigenvalues and eigenvectors
efficiently with no guarantee on orthogonality.
If RANGE='V', it is assumed that all eigenvectors
may be required when computing optimal workspace.
LRWORK (local input) INTEGER
Size of RWORK
See below for definitions of variables used to define LRWORK.
If no eigenvectors are requested (JOBZ = 'N') then
LRWORK >= 5 * NN + 4 * N
If eigenvectors are requested (JOBZ = 'V' ) then
the amount of workspace required to guarantee that all
eigenvectors are computed is:
LRWORK >= 4*N + MAX( 5*NN, NP0 * MQ0 ) +
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 LRWORK:
(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),...,W(K+CLUSTERSIZE-1) |
W(J+1) <= W(J) + ORFAC*2*norm(A) }
Variable definitions:
NEIG = number of eigenvectors requested
NB = DESCA( MB_ ) = DESCA( NB_ ) = DESCZ( MB_ ) =
DESCZ( NB_ )
NN = MAX( N, NB, 2 )
DESCA( RSRC_ ) = DESCA( NB_ ) = DESCZ( RSRC_ ) =
DESCZ( CSRC_ ) = 0
NP0 = NUMROC( NN, NB, 0, 0, NPROW )
MQ0 = NUMROC( MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL )
ICEIL( X, Y ) is a ScaLAPACK function returning
ceiling(X/Y)
When LRWORK is too small:
If LRWORK is too small to guarantee orthogonality,
PZHEGVX attempts to maintain orthogonality in
the clusters with the smallest
spacing between the eigenvalues.
If LRWORK is too small to compute all the eigenvectors
requested, no computation is performed and INFO=-25
is returned. Note that when RANGE='V', PZHEGVX does
not know how many eigenvectors are requested until
the eigenvalues are computed. Therefore, when RANGE='V'
and as long as LRWORK is large enough to allow PZHEGVX to
compute the eigenvalues, PZHEGVX will compute the
eigenvalues and as many eigenvectors as it can.
Relationship between workspace, orthogonality & performance:
If CLUSTERSIZE >= N/SQRT(NPROW*NPCOL), then providing
enough space to compute all the eigenvectors
orthogonally will cause serious degradation in
performance. In the limit (i.e. CLUSTERSIZE = N-1)
PZSTEIN will perform no better than ZSTEIN on 1 processor.
For CLUSTERSIZE = N/SQRT(NPROW*NPCOL) reorthogonalizing
all eigenvectors will increase the total execution time
by a factor of 2 or more.
For CLUSTERSIZE > N/SQRT(NPROW*NPCOL) execution time will
grow as the square of the cluster size, all other factors
remaining equal and assuming enough workspace. Less
workspace means less reorthogonalization but faster
execution.
If LRWORK = -1, then LRWORK is global input and a workspace
query is assumed; the routine only 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 by PXERBLA.
IWORK (local workspace) INTEGER array
On return, IWORK(1) contains the amount of integer workspace
required.
LIWORK (local input) INTEGER
size of IWORK
LIWORK >= 6 * NNP
Where:
NNP = MAX( N, NPROW*NPCOL + 1, 4 )
If LIWORK = -1, then LIWORK is global input and a workspace
query is assumed; the routine only 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 by PXERBLA.
IFAIL (output) INTEGER array, dimension (N)
IFAIL provides additional information when INFO .NE. 0
If (MOD(INFO/16,2).NE.0) then IFAIL(1) indicates the order of
the smallest minor which is not positive definite.
If (MOD(INFO,2).NE.0) on exit, then IFAIL contains the
indices of the eigenvectors that failed to converge.
If neither of the above error conditions hold and JOBZ = 'V',
then the first M elements of IFAIL are set to zero.
ICLUSTR (global output) integer array, dimension (2*NPROW*NPCOL)
This array contains indices of eigenvectors corresponding to
a cluster of eigenvalues that could not be reorthogonalized
due to insufficient workspace (see LWORK, ORFAC and INFO).
Eigenvectors corresponding to clusters of eigenvalues indexed
ICLUSTR(2*I-1) to ICLUSTR(2*I), could not be
reorthogonalized due to lack of workspace. Hence the
eigenvectors corresponding to these clusters may not be
orthogonal. ICLUSTR() is a zero terminated array.
(ICLUSTR(2*K).NE.0 .AND. ICLUSTR(2*K+1).EQ.0) if and only if
K is the number of clusters
ICLUSTR is not referenced if JOBZ = 'N'
GAP (global output) DOUBLE PRECISION array,
dimension (NPROW*NPCOL)
This array contains the gap between eigenvalues whose
eigenvectors could not be reorthogonalized. The output
values in this array correspond to the clusters indicated
by the array ICLUSTR. As a result, the dot product between
eigenvectors correspoding to the I^th cluster may be as high
as ( C * n ) / GAP(I) where C is a small constant.
INFO (global output) INTEGER
= 0: successful exit
< 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.
> 0: if (MOD(INFO,2).NE.0), then one or more eigenvectors
failed to converge. Their indices are stored
in IFAIL. Send e-mail to scalapack@cs.utk.edu
if (MOD(INFO/2,2).NE.0),then eigenvectors corresponding
to one or more clusters of eigenvalues could not be
reorthogonalized because of insufficient workspace.
The indices of the clusters are stored in the array
ICLUSTR.
if (MOD(INFO/4,2).NE.0), then space limit prevented
PZHEGVX from computing all of the eigenvectors
between VL and VU. The number of eigenvectors
computed is returned in NZ.
if (MOD(INFO/8,2).NE.0), then PZSTEBZ failed to
compute eigenvalues.
Send e-mail to scalapack@cs.utk.edu
if (MOD(INFO/16,2).NE.0), then B was not positive
definite. IFAIL(1) indicates the order of
the smallest minor which is not positive definite.
Alignment requirements
======================
The distributed submatrices A(IA:*, JA:*), C(IC:IC+M-1,JC:JC+N-1),
and B( IB:IB+N-1, JB:JB+N-1 ) must verify some alignment properties,
namely the following expressions should be true:
DESCA(MB_) = DESCA(NB_)
IA = IB = IZ
JA = IB = JZ
DESCA(M_) = DESCB(M_) =DESCZ(M_)
DESCA(N_) = DESCB(N_)= DESCZ(N_)
DESCA(MB_) = DESCB(MB_) = DESCZ(MB_)
DESCA(NB_) = DESCB(NB_) = DESCZ(NB_)
DESCA(RSRC_) = DESCB(RSRC_) = DESCZ(RSRC_)
DESCA(CSRC_) = DESCB(CSRC_) = DESCZ(CSRC_)
MOD( IA-1, DESCA( MB_ ) ) = 0
MOD( JA-1, DESCA( NB_ ) ) = 0
MOD( IB-1, DESCB( MB_ ) ) = 0
MOD( JB-1, DESCB( NB_ ) ) = 0
=====================================================================
.. Parameters ..
|
|
|
|
001 SUBROUTINE PZHEGVX( IBTYPE , JOBZ , RANGE , UPLO , N , A , IA , JA ,
002 $DESCA , B , IB , JB , DESCB , VL , VU , IL , IU ,
003 $ABSTOL , M , NZ , W , ORFAC , Z , IZ , JZ , DESCZ ,
004 $WORK , LWORK , RWORK , LRWORK , IWORK , LIWORK ,
005 $IFAIL , ICLUSTR , GAP , INFO )
006
007 * -- ScaLAPACK routine(version 1.7) --
008 * University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
009 * and University of California , Berkeley.
010 * October 15 , 1999
011
012 * .. Scalar Arguments ..
013 CHARACTER JOBZ , RANGE , UPLO
014 INTEGER IA , IB , IBTYPE , IL , INFO , IU , IZ , JA , JB , JZ ,
015 $LIWORK , LRWORK , LWORK , M , N , NZ
016 DOUBLE PRECISION ABSTOL , ORFAC , VL , VU
017 INTEGER BLOCK_CYCLIC_2D , DLEN_ , DTYPE_ , CTXT_ , M_ , N_ ,
018 $MB_ , NB_ , RSRC_ , CSRC_ , LLD_
019 PARAMETER( BLOCK_CYCLIC_2D = 1 , DLEN_ = 9 , DTYPE_ = 1 ,
020 $CTXT_ = 2 , M_ = 3 , N_ = 4 , MB_ = 5 , NB_ = 6 ,
021 $RSRC_ = 7 , CSRC_ = 8 , LLD_ = 9 )
022 COMPLEX*16 ONE
023 PARAMETER( ONE = 1.0D + 0 )
024 DOUBLE PRECISION FIVE , ZERO
025 PARAMETER( FIVE = 5.0D + 0 , ZERO = 0.0D + 0 )
026 INTEGER IERRNPD
027 PARAMETER( IERRNPD = 16 )
028 * ..
029 * .. Local Scalars ..
030 LOGICAL ALLEIG , INDEIG , LQUERY , UPPER , VALEIG , WANTZ
031 CHARACTER TRANS
032 INTEGER ANB , IACOL , IAROW , IBCOL , IBROW , ICOFFA ,
033 $ICOFFB , ICTXT , IROFFA , IROFFB , LIWMIN , LRWMIN ,
034 $LRWOPT , LWMIN , LWOPT , MQ0 , MYCOL , MYROW , NB ,
035 $NEIG , NHEGST_LWOPT , NHETRD_LWOPT , NN , NP0 ,
036 $NPCOL , NPROW , NPS , NQ0 , SQNPC
037 DOUBLE PRECISION EPS , SCALE
038 * ..
039 * .. Local Arrays ..
040 INTEGER IDUM1( 5 ) , IDUM2( 5 )
041 * ..
042 * .. External Functions ..
043 LOGICAL LSAME
044 INTEGER ICEIL , INDXG2P , NUMROC , PJLAENV
045 DOUBLE PRECISION PDLAMCH
046 EXTERNAL LSAME , ICEIL , INDXG2P , NUMROC , PJLAENV , PDLAMCH
047 * ..
048 * .. External Subroutines ..
049 EXTERNAL BLACS_GRIDINFO , CHK1MAT , DGEBR2D , DGEBS2D ,
050 $DSCAL , PCHK1MAT , PCHK2MAT , PXERBLA , PZHEEVX ,
051 $PZHENGST , PZPOTRF , PZTRMM , PZTRSM
052 * ..
053 * .. Intrinsic Functions ..
054 INTRINSIC ABS , DBLE , DCMPLX , ICHAR , INT , MAX , MIN , MOD ,
055 $SQRT
056 * ..
057 * .. Executable Statements ..
058 * This is just to keep ftnchek and toolpack / 1 happy
059 IF( BLOCK_CYCLIC_2D*CSRC_*CTXT_*DLEN_*DTYPE_*LLD_*MB_*M_*NB_*N_*
059
060 $ RSRC_.LT.0 )RETURN
061
062 * Get grid parameters
063
064 ICTXT = DESCA( CTXT_ )
065 CALL BLACS_GRIDINFO( ICTXT , NPROW , NPCOL , MYROW , MYCOL )
066
067 * Test the input parameters
068
069 INFO = 0
070 IF( NPROW.EQ. - 1 ) THEN
070
071 INFO = - ( 900 + CTXT_ )
072 ELSE IF( DESCA( CTXT_ ).NE.DESCB( CTXT_ ) ) THEN
072
073 INFO = - ( 1300 + CTXT_ )
074 ELSE IF( DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) THEN
074
075 INFO = - ( 2600 + CTXT_ )
076 ELSE
077
078 * Get machine constants.
079
079
080 EPS = PDLAMCH( DESCA( CTXT_ ) , 'Precision' )
081
082 WANTZ = LSAME( JOBZ , 'V' )
083 UPPER = LSAME( UPLO , 'U' )
084 ALLEIG = LSAME( RANGE , 'A' )
085 VALEIG = LSAME( RANGE , 'V' )
086 INDEIG = LSAME( RANGE , 'I' )
087 CALL CHK1MAT( N , 4 , N , 4 , IA , JA , DESCA , 9 , INFO )
088 CALL CHK1MAT( N , 4 , N , 4 , IB , JB , DESCB , 13 , INFO )
089 CALL CHK1MAT( N , 4 , N , 4 , IZ , JZ , DESCZ , 26 , INFO )
090 IF( INFO.EQ.0 ) THEN
090
091 IF( MYROW.EQ.0 .AND. MYCOL.EQ.0 ) THEN
091
092 RWORK( 1 ) = ABSTOL
093 IF( VALEIG ) THEN
093
094 RWORK( 2 ) = VL
095 RWORK( 3 ) = VU
096 ELSE
096
097 RWORK( 2 ) = ZERO
098 RWORK( 3 ) = ZERO
099 END IF
100 CALL DGEBS2D( DESCA( CTXT_ ) , 'ALL' , ' ' , 3 , 1 , RWORK ,
101 $ 3 )
102 ELSE
102
103 CALL DGEBR2D( DESCA( CTXT_ ) , 'ALL' , ' ' , 3 , 1 , RWORK , 3 ,
104 $ 0 , 0 )
105 END IF
106 IAROW = INDXG2P( IA , DESCA( MB_ ) , MYROW , DESCA( RSRC_ ) ,
107 $ NPROW )
108 IBROW = INDXG2P( IB , DESCB( MB_ ) , MYROW , DESCB( RSRC_ ) ,
109 $ NPROW )
110 IACOL = INDXG2P( JA , DESCA( NB_ ) , MYCOL , DESCA( CSRC_ ) ,
111 $ NPCOL )
112 IBCOL = INDXG2P( JB , DESCB( NB_ ) , MYCOL , DESCB( CSRC_ ) ,
113 $ NPCOL )
114 IROFFA = MOD( IA - 1 , DESCA( MB_ ) )
115 ICOFFA = MOD( JA - 1 , DESCA( NB_ ) )
116 IROFFB = MOD( IB - 1 , DESCB( MB_ ) )
117 ICOFFB = MOD( JB - 1 , DESCB( NB_ ) )
118
119 * Compute the total amount of space needed
120
121 LQUERY = .FALSE.
122 IF( LWORK.EQ. - 1 .OR. LIWORK.EQ. - 1 .OR. LRWORK.EQ. - 1 )
122
123 $ LQUERY = .TRUE.
124
125 LIWMIN = 6*MAX( N ,( NPROW*NPCOL ) + 1 , 4 )
126
127 NB = DESCA( MB_ )
128 NN = MAX( N , NB , 2 )
129 NP0 = NUMROC( NN , NB , 0 , 0 , NPROW )
130
131 IF(( .NOT.WANTZ ) .OR.( VALEIG .AND.( .NOT.LQUERY ) ) )
131
132 $ THEN
133 LWMIN = N + MAX( NB*( NP0 + 1 ) , 3 )
134 LWOPT = LWMIN
135 LRWMIN = 5*NN + 4*N
136 IF( WANTZ ) THEN
136
137 MQ0 = NUMROC( MAX( N , NB , 2 ) , NB , 0 , 0 , NPCOL )
138 LRWOPT = 4*N + MAX( 5*NN , NP0*MQ0 )
139 ELSE
139
140 LRWOPT = LRWMIN
141 END IF
142 NEIG = 0
143 ELSE
143
144 IF( ALLEIG .OR. VALEIG ) THEN
144
145 NEIG = N
146 ELSE IF( INDEIG ) THEN
146
147 NEIG = IU - IL + 1
148 END IF
149 MQ0 = NUMROC( MAX( NEIG , NB , 2 ) , NB , 0 , 0 , NPCOL )
150 LWMIN = N + ( NP0 + MQ0 + NB )*NB
151 LWOPT = LWMIN
152 LRWMIN = 4*N + MAX( 5*NN , NP0*MQ0 ) +
153 $ ICEIL( NEIG , NPROW*NPCOL )*NN
154 LRWOPT = LRWMIN
155
156 END IF
157
158 * Compute how much workspace is needed to use the
159 * new TRD and GST algorithms
160
161 ANB = PJLAENV( ICTXT , 3 , 'PZHETTRD' , 'L' , 0 , 0 , 0 , 0 )
162 SQNPC = INT( SQRT( DBLE( NPROW*NPCOL ) ) )
163 NPS = MAX( NUMROC( N , 1 , 0 , 0 , SQNPC ) , 2*ANB )
164 NHETRD_LWOPT = 2*( ANB + 1 )*( 4*NPS + 2 ) + ( NPS + 4 )*NPS
165 NB = DESCA( MB_ )
166 NP0 = NUMROC( N , NB , 0 , 0 , NPROW )
167 NQ0 = NUMROC( N , NB , 0 , 0 , NPCOL )
168 NHEGST_LWOPT = 2*NP0*NB + NQ0*NB + NB*NB
169 LWOPT = MAX( LWOPT , N + NHETRD_LWOPT , NHEGST_LWOPT )
170
171 * Version 1.0 Limitations
172
173 IF( IBTYPE.LT.1 .OR. IBTYPE.GT.3 ) THEN
173
174 INFO = - 1
175 ELSE IF( .NOT.( WANTZ .OR. LSAME( JOBZ , 'N' ) ) ) THEN
175
176 INFO = - 2
177 ELSE IF( .NOT.( ALLEIG .OR. VALEIG .OR. INDEIG ) ) THEN
177
178 INFO = - 3
179 ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO , 'L' ) ) THEN
179
180 INFO = - 4
181 ELSE IF( N.LT.0 ) THEN
181
182 INFO = - 5
183 ELSE IF( IROFFA.NE.0 ) THEN
183
184 INFO = - 7
185 ELSE IF( ICOFFA.NE.0 ) THEN
185
186 INFO = - 8
187 ELSE IF( DESCA( MB_ ).NE.DESCA( NB_ ) ) THEN
187
188 INFO = - ( 900 + NB_ )
189 ELSE IF( DESCA( M_ ).NE.DESCB( M_ ) ) THEN
189
190 INFO = - ( 1300 + M_ )
191 ELSE IF( DESCA( N_ ).NE.DESCB( N_ ) ) THEN
191
192 INFO = - ( 1300 + N_ )
193 ELSE IF( DESCA( MB_ ).NE.DESCB( MB_ ) ) THEN
193
194 INFO = - ( 1300 + MB_ )
195 ELSE IF( DESCA( NB_ ).NE.DESCB( NB_ ) ) THEN
195
196 INFO = - ( 1300 + NB_ )
197 ELSE IF( DESCA( RSRC_ ).NE.DESCB( RSRC_ ) ) THEN
197
198 INFO = - ( 1300 + RSRC_ )
199 ELSE IF( DESCA( CSRC_ ).NE.DESCB( CSRC_ ) ) THEN
199
200 INFO = - ( 1300 + CSRC_ )
201 ELSE IF( DESCA( CTXT_ ).NE.DESCB( CTXT_ ) ) THEN
201
202 INFO = - ( 1300 + CTXT_ )
203 ELSE IF( DESCA( M_ ).NE.DESCZ( M_ ) ) THEN
203
204 INFO = - ( 2200 + M_ )
205 ELSE IF( DESCA( N_ ).NE.DESCZ( N_ ) ) THEN
205
206 INFO = - ( 2200 + N_ )
207 ELSE IF( DESCA( MB_ ).NE.DESCZ( MB_ ) ) THEN
207
208 INFO = - ( 2200 + MB_ )
209 ELSE IF( DESCA( NB_ ).NE.DESCZ( NB_ ) ) THEN
209
210 INFO = - ( 2200 + NB_ )
211 ELSE IF( DESCA( RSRC_ ).NE.DESCZ( RSRC_ ) ) THEN
211
212 INFO = - ( 2200 + RSRC_ )
213 ELSE IF( DESCA( CSRC_ ).NE.DESCZ( CSRC_ ) ) THEN
213
214 INFO = - ( 2200 + CSRC_ )
215 ELSE IF( DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) THEN
215
216 INFO = - ( 2200 + CTXT_ )
217 ELSE IF( IROFFB.NE.0 .OR. IBROW.NE.IAROW ) THEN
217
218 INFO = - 11
219 ELSE IF( ICOFFB.NE.0 .OR. IBCOL.NE.IACOL ) THEN
219
220 INFO = - 12
221 ELSE IF( VALEIG .AND. N.GT.0 .AND. VU.LE.VL ) THEN
221
222 INFO = - 15
223 ELSE IF( INDEIG .AND.( IL.LT.1 .OR. IL.GT.MAX( 1 , N ) ) )
223
224 $ THEN
225 INFO = - 16
226 ELSE IF( INDEIG .AND.( IU.LT.MIN( N , IL ) .OR. IU.GT.N ) )
226
227 $ THEN
228 INFO = - 17
229 ELSE IF( VALEIG .AND.( ABS( RWORK( 2 ) - VL ).GT.FIVE*EPS*
229
230 $ ABS( VL ) ) ) THEN
231 INFO = - 14
232 ELSE IF( VALEIG .AND.( ABS( RWORK( 3 ) - VU ).GT.FIVE*EPS*
232
233 $ ABS( VU ) ) ) THEN
234 INFO = - 15
235 ELSE IF( ABS( RWORK( 1 ) - ABSTOL ).GT.FIVE*EPS*
235
236 $ ABS( ABSTOL ) ) THEN
237 INFO = - 18
238 ELSE IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
238
239 INFO = - 28
240 ELSE IF( LRWORK.LT.LRWMIN .AND. .NOT.LQUERY ) THEN
240
241 INFO = - 30
242 ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN
242
243 INFO = - 32
244 END IF
245 END IF
246 IDUM1( 1 ) = IBTYPE
247 IDUM2( 1 ) = 1
248 IF( WANTZ ) THEN
248
249 IDUM1( 2 ) = ICHAR( 'V' )
250 ELSE
250
251 IDUM1( 2 ) = ICHAR( 'N' )
252 END IF
253 IDUM2( 2 ) = 2
254 IF( UPPER ) THEN
254
255 IDUM1( 3 ) = ICHAR( 'U' )
256 ELSE
256
257 IDUM1( 3 ) = ICHAR( 'L' )
258 END IF
259 IDUM2( 3 ) = 3
260 IF( ALLEIG ) THEN
260
261 IDUM1( 4 ) = ICHAR( 'A' )
262 ELSE IF( INDEIG ) THEN
262
263 IDUM1( 4 ) = ICHAR( 'I' )
264 ELSE
264
265 IDUM1( 4 ) = ICHAR( 'V' )
266 END IF
267 IDUM2( 4 ) = 4
268 IF( LQUERY ) THEN
268
269 IDUM1( 5 ) = - 1
270 ELSE
270
271 IDUM1( 5 ) = 1
272 END IF
273 IDUM2( 5 ) = 5
274 CALL PCHK2MAT( N , 4 , N , 4 , IA , JA , DESCA , 9 , N , 4 , N , 4 , IB ,
275 $ JB , DESCB , 13 , 5 , IDUM1 , IDUM2 , INFO )
276 CALL PCHK1MAT( N , 4 , N , 4 , IZ , JZ , DESCZ , 26 , 0 , IDUM1 , IDUM2 ,
277 $ INFO )
278 END IF
279
280 IWORK( 1 ) = LIWMIN
281 WORK( 1 ) = DCMPLX( DBLE( LWOPT ) )
282 RWORK( 1 ) = DBLE( LRWOPT )
283
284 IF( INFO.NE.0 ) THEN
284
285 CALL PXERBLA( ICTXT , 'PZHEGVX ' , - INFO )
286 RETURN
287 ELSE IF( LQUERY ) THEN
287
288 RETURN
289 END IF
290
291 * Form a Cholesky factorization of sub( B ).
292
293 CALL PZPOTRF ( UPLO , N , B , IB , JB , DESCB , INFO )
294 IF( INFO.NE.0 ) THEN
294
295 IWORK( 1 ) = LIWMIN
296 WORK( 1 ) = DCMPLX( DBLE( LWOPT ) )
297 RWORK( 1 ) = DBLE( LRWOPT )
298 IFAIL( 1 ) = INFO
299 INFO = IERRNPD
300 RETURN
301 END IF
302
303 * Transform problem to standard eigenvalue problem and solve.
304
305 CALL PZHENGST ( IBTYPE , UPLO , N , A , IA , JA , DESCA , B , IB , JB ,
306 $ DESCB , SCALE , WORK , LWORK , INFO )
307 CALL PZHEEVX ( JOBZ , RANGE , UPLO , N , A , IA , JA , DESCA , VL , VU , IL ,
308 $ IU , ABSTOL , M , NZ , W , ORFAC , Z , IZ , JZ , DESCZ , WORK ,
309 $ LWORK , RWORK , LRWORK , IWORK , LIWORK , IFAIL , ICLUSTR ,
310 $ GAP , INFO )
311
312 IF( WANTZ ) THEN
313
314 * Backtransform eigenvectors to the original problem.
315
315
316 NEIG = M
317 IF( IBTYPE.EQ.1 .OR. IBTYPE.EQ.2 ) THEN
318
319 * For sub( A )*x =(lambda)*sub( B )*x and
320 * sub( A )*sub( B )*x =(lambda)*x ; backtransform eigenvectors :
321 * x = inv(L)'*y or inv(U)*y
322
322
323 IF( UPPER ) THEN
323
324 TRANS = 'N'
325 ELSE
325
326 TRANS = 'C'
327 END IF
328
329 CALL PZTRSM( 'Left' , UPLO , TRANS , 'Non - unit' , N , NEIG , ONE ,
330 $ B , IB , JB , DESCB , Z , IZ , JZ , DESCZ )
331
332 ELSE IF( IBTYPE.EQ.3 ) THEN
333
334 * For sub( B )*sub( A )*x =(lambda)*x ;
335 * backtransform eigenvectors : x = L*y or U'*y
336
336
337 IF( UPPER ) THEN
337
338 TRANS = 'C'
339 ELSE
339
340 TRANS = 'N'
341 END IF
342
343 CALL PZTRMM( 'Left' , UPLO , TRANS , 'Non - unit' , N , NEIG , ONE ,
344 $ B , IB , JB , DESCB , Z , IZ , JZ , DESCZ )
345 END IF
346 END IF
347
348 IF( SCALE.NE.ONE ) THEN
348
349 CALL DSCAL( N , SCALE , W , 1 )
350 END IF
351
352 IWORK( 1 ) = LIWMIN
353 WORK( 1 ) = DCMPLX( DBLE( LWOPT ) )
354 RWORK( 1 ) = DBLE( LRWOPT )
355 RETURN
356
357 * End of PZHEGVX
358
359 END39
70
|
|
Variables in Routine PZHEGVX()
| Summary Report |
| Data Type | Quantity | Size(byte) |
| CHARACTER | 4 | 4 |
| COMPLEX*16 | 1 | ? |
| DOUBLE PRECISION | 9 | 36 |
| INTEGER | 65 | 296 |
| LOGICAL | 7 | 7 |
| REAL | 2 | 8 |
| TOTAL | 88 | 351 |
List of Variables
CHARACTER
COMPLEX*16
DOUBLE PRECISION
| ABSTOL | EPS | FIVE | ORFAC | PDLAMCH |
| SCALE | VL | VU | ZERO | |
INTEGER
| ANB | BLOCK_CYCLIC_2D | CSRC_ | CTXT_ | DLEN_ |
| DTYPE_ | IA | IACOL | IAROW | IB |
| IBCOL | IBROW | IBTYPE | ICEIL | ICOFFA |
| ICOFFB | ICTXT | IDUM1( 5 ) | IDUM2( 5 ) | IERRNPD |
| IFAIL | IL | INDXG2P | INFO | IROFFA |
| IROFFB | IU | IWORK | IZ | JA |
| JB | JZ | LIWMIN | LIWORK | LLD_ |
| LRWMIN | LRWOPT | LRWORK | LWMIN | LWOPT |
| LWORK | M | M_ | MB_ | MQ0 |
| MYCOL | MYROW | N | N_ | NB |
| NB_ | NEIG | NHEGST_LWOPT | NHETRD_LWOPT | NN |
| NP0 | NPCOL | NPROW | NPS | NQ0 |
| NUMROC | NZ | PJLAENV | RSRC_ | SQNPC |
LOGICAL
| ALLEIG | INDEIG | LQUERY | LSAME | UPPER |
| VALEIG | WANTZ | | | |
REAL
Variables Dependence Graph Put the mouse over a right hand side variable to display the corresponding line of the dependence | | - | | - | - | | ALLEIG | <--- | LSAMEALLEIG = LSAME( RANGE, 'A' ), RANGEALLEIG = LSAME( RANGE, 'A' ) |
| ANB | <--- | ICTXTANB = PJLAENV( ICTXT, 3, 'PZHETTRD', 'L', 0, 0, 0, 0 ), PJLAENVANB = PJLAENV( ICTXT, 3, 'PZHETTRD', 'L', 0, 0, 0, 0 ) |
| EPS | <--- | CTXT_EPS = PDLAMCH( DESCA( CTXT_ ), 'Precision' ), PDLAMCHEPS = PDLAMCH( DESCA( CTXT_ ), 'Precision' ) |
| IACOL | <--- | INDXG2PIACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ),, JAIACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ),, CSRC_IACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ),, MYCOLIACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ),, NB_IACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ),, NPCOLIACOL = INDXG2P( JA, DESCA( NB_ ), MYCOL, DESCA( CSRC_ ), |
| IAROW | <--- | IAIAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ),, INDXG2PIAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ),, MB_IAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ),, MYROWIAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ),, NPROWIAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ),, RSRC_IAROW = INDXG2P( IA, DESCA( MB_ ), MYROW, DESCA( RSRC_ ), |
| IBCOL | <--- | INDXG2PIBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ),, JBIBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ),, CSRC_IBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ),, MYCOLIBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ),, NB_IBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ),, NPCOLIBCOL = INDXG2P( JB, DESCB( NB_ ), MYCOL, DESCB( CSRC_ ), |
| IBROW | <--- | IBIBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ),, INDXG2PIBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ),, MB_IBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ),, MYROWIBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ),, NPROWIBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ),, RSRC_IBROW = INDXG2P( IB, DESCB( MB_ ), MYROW, DESCB( RSRC_ ), |
| ICOFFA | <--- | JAICOFFA = MOD( JA-1, DESCA( NB_ ) ), NB_ICOFFA = MOD( JA-1, DESCA( NB_ ) ) |
| ICOFFB | <--- | JBICOFFB = MOD( JB-1, DESCB( NB_ ) ), NB_ICOFFB = MOD( JB-1, DESCB( NB_ ) ) |
| ICTXT | <--- | CTXT_ICTXT = DESCA( CTXT_ ) |
| IDUM1 | <--- | IBTYPEIDUM1( 1 ) = IBTYPE, NIDUM1( 2 ) = ICHAR( 'N' ) |
| IFAIL | <--- | INFOIFAIL( 1 ) = INFO |
| INDEIG | <--- | LSAMEINDEIG = LSAME( RANGE, 'I' ), RANGEINDEIG = LSAME( RANGE, 'I' ) |
| INFO | <--- | IERRNPDINFO = IERRNPD, CSRC_INFO = -( 1300+CSRC_ ){2INFO = -( 2200+CSRC_ )}, M_INFO = -( 1300+M_ ){2INFO = -( 2200+M_ )}, MB_INFO = -( 1300+MB_ ){2INFO = -( 2200+MB_ )}, N_INFO = -( 1300+N_ ){2INFO = -( 2200+N_ )}, NB_INFO = -( 900+NB_ ){2INFO = -( 1300+NB_ ), 3INFO = -( 2200+NB_ )}, CTXT_INFO = -( 1300+CTXT_ ){2INFO = -( 2200+CTXT_ ), 3INFO = -( 900+CTXT_ ), 4INFO = -( 1300+CTXT_ ), 5INFO = -( 2600+CTXT_ )}, RSRC_INFO = -( 1300+RSRC_ ){2INFO = -( 2200+RSRC_ )} |
| IROFFA | <--- | IAIROFFA = MOD( IA-1, DESCA( MB_ ) ), MB_IROFFA = MOD( IA-1, DESCA( MB_ ) ) |
| IROFFB | <--- | IBIROFFB = MOD( IB-1, DESCB( MB_ ) ), MB_IROFFB = MOD( IB-1, DESCB( MB_ ) ) |
| IWORK | <--- | LIWMINIWORK( 1 ) = LIWMIN{2IWORK( 1 ) = LIWMIN, 3IWORK( 1 ) = LIWMIN} |
| LIWMIN | <--- | NLIWMIN = 6*MAX( N, ( NPROW*NPCOL )+1, 4 ), NPCOLLIWMIN = 6*MAX( N, ( NPROW*NPCOL )+1, 4 ), NPROWLIWMIN = 6*MAX( N, ( NPROW*NPCOL )+1, 4 ) |
| LRWMIN | <--- | ICEILLRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +, MQ0LRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +, NLRWMIN = 5*NN + 4*N{2LRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +}, NEIGLRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +, NNLRWMIN = 5*NN + 4*N{2LRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +}, NP0LRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +, NPCOLLRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) +, NPROWLRWMIN = 4*N + MAX( 5*NN, NP0*MQ0 ) + |
| LRWOPT | <--- | LRWMINLRWOPT = LRWMIN{2LRWOPT = LRWMIN}, MQ0LRWOPT = 4*N + MAX( 5*NN, NP0*MQ0 ), NLRWOPT = 4*N + MAX( 5*NN, NP0*MQ0 ), NNLRWOPT = 4*N + MAX( 5*NN, NP0*MQ0 ), NP0LRWOPT = 4*N + MAX( 5*NN, NP0*MQ0 ) |
| LWMIN | <--- | MQ0LWMIN = N + ( NP0+MQ0+NB )*NB, NLWMIN = N + MAX( NB*( NP0+1 ), 3 ){2LWMIN = N + ( NP0+MQ0+NB )*NB}, NBLWMIN = N + MAX( NB*( NP0+1 ), 3 ){2LWMIN = N + ( NP0+MQ0+NB )*NB}, NP0LWMIN = N + MAX( NB*( NP0+1 ), 3 ){2LWMIN = N + ( NP0+MQ0+NB )*NB} |
| LWOPT | <--- | LWMINLWOPT = LWMIN{2LWOPT = LWMIN}, LWOPTLWOPT = MAX( LWOPT, N+NHETRD_LWOPT, NHEGST_LWOPT ), NLWOPT = MAX( LWOPT, N+NHETRD_LWOPT, NHEGST_LWOPT ), NHEGST_LWOPTLWOPT = MAX( LWOPT, N+NHETRD_LWOPT, NHEGST_LWOPT ), NHETRD_LWOPTLWOPT = MAX( LWOPT, N+NHETRD_LWOPT, NHEGST_LWOPT ) |
| MQ0 | <--- | NMQ0 = NUMROC( MAX( N, NB, 2 ), NB, 0, 0, NPCOL ), NBMQ0 = NUMROC( MAX( N, NB, 2 ), NB, 0, 0, NPCOL ){2MQ0 = NUMROC( MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL )}, NEIGMQ0 = NUMROC( MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL ), NPCOLMQ0 = NUMROC( MAX( N, NB, 2 ), NB, 0, 0, NPCOL ){2MQ0 = NUMROC( MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL )}, NUMROCMQ0 = NUMROC( MAX( N, NB, 2 ), NB, 0, 0, NPCOL ){2MQ0 = NUMROC( MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL )} |
| NB | <--- | MB_NB = DESCA( MB_ ){2NB = DESCA( MB_ )} |
| NEIG | <--- | ILNEIG = IU - IL + 1, IUNEIG = IU - IL + 1, MNEIG = M, NNEIG = N |
| NHEGST_LWOPT | <--- | NBNHEGST_LWOPT = 2*NP0*NB + NQ0*NB + NB*NB, NP0NHEGST_LWOPT = 2*NP0*NB + NQ0*NB + NB*NB, NQ0NHEGST_LWOPT = 2*NP0*NB + NQ0*NB + NB*NB |
| NHETRD_LWOPT | <--- | ANBNHETRD_LWOPT = 2*( ANB+1 )*( 4*NPS+2 ) + ( NPS+4 )*NPS, NPSNHETRD_LWOPT = 2*( ANB+1 )*( 4*NPS+2 ) + ( NPS+4 )*NPS |
| NN | <--- | NNN = MAX( N, NB, 2 ), NBNN = MAX( N, NB, 2 ) |
| NP0 | <--- | NNP0 = NUMROC( N, NB, 0, 0, NPROW ), NBNP0 = NUMROC( NN, NB, 0, 0, NPROW ){2NP0 = NUMROC( N, NB, 0, 0, NPROW )}, NNNP0 = NUMROC( NN, NB, 0, 0, NPROW ), NPROWNP0 = NUMROC( NN, NB, 0, 0, NPROW ){2NP0 = NUMROC( N, NB, 0, 0, NPROW )}, NUMROCNP0 = NUMROC( NN, NB, 0, 0, NPROW ){2NP0 = NUMROC( N, NB, 0, 0, NPROW )} |
| NPS | <--- | ANBNPS = MAX( NUMROC( N, 1, 0, 0, SQNPC ), 2*ANB ), NNPS = MAX( NUMROC( N, 1, 0, 0, SQNPC ), 2*ANB ), NUMROCNPS = MAX( NUMROC( N, 1, 0, 0, SQNPC ), 2*ANB ), SQNPCNPS = MAX( NUMROC( N, 1, 0, 0, SQNPC ), 2*ANB ) |
| NQ0 | <--- | NNQ0 = NUMROC( N, NB, 0, 0, NPCOL ), NBNQ0 = NUMROC( N, NB, 0, 0, NPCOL ), NPCOLNQ0 = NUMROC( N, NB, 0, 0, NPCOL ), NUMROCNQ0 = NUMROC( N, NB, 0, 0, NPCOL ) |
| RWORK | <--- | ABSTOLRWORK( 1 ) = ABSTOL, LRWOPTRWORK( 1 ) = DBLE( LRWOPT ){2RWORK( 1 ) = DBLE( LRWOPT ), 3RWORK( 1 ) = DBLE( LRWOPT )}, VLRWORK( 2 ) = VL, VURWORK( 3 ) = VU, ZERORWORK( 2 ) = ZERO{2RWORK( 3 ) = ZERO} |
| SQNPC | <--- | NPCOLSQNPC = INT( SQRT( DBLE( NPROW*NPCOL ) ) ), NPROWSQNPC = INT( SQRT( DBLE( NPROW*NPCOL ) ) ) |
| TRANS | <--- | NTRANS = 'N'{2TRANS = 'N'} |
| UPPER | <--- | LSAMEUPPER = LSAME( UPLO, 'U' ), UPLOUPPER = LSAME( UPLO, 'U' ) |
| VALEIG | <--- | LSAMEVALEIG = LSAME( RANGE, 'V' ), RANGEVALEIG = LSAME( RANGE, 'V' ) |
| WANTZ | <--- | JOBZWANTZ = LSAME( JOBZ, 'V' ), LSAMEWANTZ = LSAME( JOBZ, 'V' ) |
| WORK | <--- | LWOPTWORK( 1 ) = DCMPLX( DBLE( LWOPT ) ){2WORK( 1 ) = DCMPLX( DBLE( LWOPT ) ), 3WORK( 1 ) = DCMPLX( DBLE( LWOPT ) )} |
|
|
Analysis elements of the routine PZHEGVX() Put the mouse over each element to display detailed matching information
Assigned variables |
| | | ALLEIG , ANB , BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DLEN_ , DTYPE_ , EPS , FIVE , IACOL , IAROW , IBCOL , IBROW , ICOFFA , ICOFFB , ICTXT , IDUM1 , IDUM2 , IERRNPD , IFAIL , INDEIG , INFO , IROFFA , IROFFB , IWORK , LIWMIN , LLD_ , LQUERY , LRWMIN , LRWOPT , LWMIN , LWOPT , M_ , MB_ , MQ0 , N_ , NB , NB_ , NEIG , NHEGST_LWOPT , NHETRD_LWOPT , NN , NP0 , NPS , NQ0 , ONE , RSRC_ , RWORK , SQNPC , TRANS , UPPER , VALEIG , WANTZ , WORK , ZERO |
|
Active variables |
| | | A , ABSTOL , ALLEIG , ANB , B , BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DESCA , DESCB , DESCZ , DLEN_ , DTYPE_ , EPS , FIVE , GAP , IA , IACOL , IAROW , IB , IBCOL , IBROW , IBTYPE , ICEIL , ICLUSTR , ICOFFA , ICOFFB , ICTXT , IDUM1 , IDUM2 , IERRNPD , IFAIL , IL , INDEIG , INDXG2P , INFO , IROFFA , IROFFB , IU , IWORK , IZ , JA , JB , JOBZ , JZ , LIWMIN , LIWORK , LLD_ , LQUERY , LRWMIN , LRWOPT , LRWORK , LSAME , LWMIN , LWOPT , LWORK , M , M_ , MB_ , MQ0 , MYCOL , MYROW , N , N_ , NB , NB_ , NEIG , NHEGST_LWOPT , NHETRD_LWOPT , NN , NP0 , NPCOL , NPROW , NPS , NQ0 , NUMROC , NZ , ONE , ORFAC , PDLAMCH , PJLAENV , RANGE , RSRC_ , RWORK , SCALE , SQNPC , TRANS , UPLO , UPPER , VALEIG , VL , VU , W , WANTZ , WORK , Z , ZERO |
|
Accessed arrays [ array name : associated index ] |
| | DESCA | : CSRC_ , CSRC_ , CSRC_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , M_ , M_ , MB_ , MB_ , MB_ , MB_ , MB_ , MB_ , MB_ , N_ , N_ , NB_ , NB_ , NB_ , NB_ , NB_ , RSRC_ , RSRC_ , RSRC_ |
| | DESCB | : CSRC_ , CSRC_ , CTXT_ , CTXT_ , M_ , MB_ , MB_ , MB_ , N_ , NB_ , NB_ , NB_ , RSRC_ , RSRC_ |
| | DESCZ | : CSRC_ , CTXT_ , CTXT_ , M_ , MB_ , N_ , NB_ , RSRC_ |
| | ICEIL | : NEIG, NPROW*NPCOL |
| | IDUM1 | : 1 , 2 , 2 , 3 , 3 , 4 , 4 , 4 , 5 , 5 , 5 |
| | IDUM2 | : 1 , 2 , 3 , 4 , 5 , 5 |
| | IFAIL | : 1 |
| | IWORK | : 1 , 1 , 1 |
| | LSAME | : JOBZ, 'N' , JOBZ, 'V' , RANGE, 'A' , RANGE, 'I' , RANGE, 'V' , UPLO, 'L' , UPLO, 'U' |
| | NUMROC | : MAX( N, NB, 2 ), NB, 0, 0, NPCOL , MAX( NEIG, NB, 2 ), NB, 0, 0, NPCOL , N, 1, 0, 0, SQNPC , N, NB, 0, 0, NPCOL , N, NB, 0, 0, NPROW , NN, NB, 0, 0, NPROW |
| | PDLAMCH | : DESCA( CTXT_ ), 'Precision' |
| | PJLAENV | : ICTXT, 3, 'PZHETTRD', 'L', 0, 0, 0, 0 |
| | RWORK | : 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 |
| | WORK | : 1 , 1 , 1 |
|
Conditional statements [ statement : associated predicate ] |
| | for | : ( sub( A )*x = (lambda)*sub( B )*x and ) , ( sub( B )*sub( A )*x = (lambda)*x ; ) |
| | if | : ( BLOCK_CYCLIC_2D*CSRC_*CTXT_*DLEN_*DTYPE_*LLD_*MB_*M_*NB_*N_* ) , ( NPROW.EQ. - 1 ) , ( (DESCA( CTXT_ ).NE.DESCB( CTXT_ ) ) ) , ( (DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) ) , ( INFO.EQ.0 ) , ( MYROW.EQ.0 .AND. MYCOL.EQ.0 ) , ( VALEIG ) , ( LWORK.EQ. - 1 .OR. LIWORK.EQ. - 1 .OR. LRWORK.EQ. - 1 ) , ( (( .NOT.WANTZ ) .OR. ( VALEIG .AND. ( .NOT.LQUERY ) ) ) ) , ( WANTZ ) , ( ALLEIG .OR. VALEIG ) , ( INDEIG ) , ( IBTYPE.LT.1 .OR. IBTYPE.GT.3 ) , ( (.NOT.( WANTZ .OR. LSAME( JOBZ , 'N' ) ) ) ) , ( (.NOT.( ALLEIG .OR. VALEIG .OR. INDEIG ) ) ) , ( (.NOT.UPPER .AND. .NOT.LSAME( UPLO , 'L' ) ) ) , ( N.LT.0 ) , ( IROFFA.NE.0 ) , ( ICOFFA.NE.0 ) , ( (DESCA( MB_ ).NE.DESCA( NB_ ) ) ) , ( (DESCA( M_ ).NE.DESCB( M_ ) ) ) , ( (DESCA( N_ ).NE.DESCB( N_ ) ) ) , ( (DESCA( MB_ ).NE.DESCB( MB_ ) ) ) , ( (DESCA( NB_ ).NE.DESCB( NB_ ) ) ) , ( (DESCA( RSRC_ ).NE.DESCB( RSRC_ ) ) ) , ( (DESCA( CSRC_ ).NE.DESCB( CSRC_ ) ) ) , ( (DESCA( CTXT_ ).NE.DESCB( CTXT_ ) ) ) , ( (DESCA( M_ ).NE.DESCZ( M_ ) ) ) , ( (DESCA( N_ ).NE.DESCZ( N_ ) ) ) , ( (DESCA( MB_ ).NE.DESCZ( MB_ ) ) ) , ( (DESCA( NB_ ).NE.DESCZ( NB_ ) ) ) , ( (DESCA( RSRC_ ).NE.DESCZ( RSRC_ ) ) ) , ( (DESCA( CSRC_ ).NE.DESCZ( CSRC_ ) ) ) , ( (DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) ) , ( IROFFB.NE.0 .OR. IBROW.NE.IAROW ) , ( ICOFFB.NE.0 .OR. IBCOL.NE.IACOL ) , ( VALEIG .AND. N.GT.0 .AND. VU.LE.VL ) , ( (INDEIG .AND. ( IL.LT.1 .OR. IL.GT.MAX( 1 , N ) ) ) ) , ( (INDEIG .AND. ( IU.LT.MIN( N , IL ) .OR. IU.GT.N ) ) ) , ( (VALEIG .AND. ( ABS( RWORK( 2 ) - VL ).GT.FIVE*EPS* ) , ( (VALEIG .AND. ( ABS( RWORK( 3 ) - VU ).GT.FIVE*EPS* ) , ( (ABS( RWORK( 1 ) - ABSTOL ).GT.FIVE*EPS* ) , ( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) , ( LRWORK.LT.LRWMIN .AND. .NOT.LQUERY ) , ( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) , ( WANTZ ) , ( UPPER ) , ( ALLEIG ) , ( INDEIG ) , ( LQUERY ) , ( INFO.NE.0 ) , ( LQUERY ) , ( INFO.NE.0 ) , ( WANTZ ) , ( IBTYPE.EQ.1 .OR. IBTYPE.EQ.2 ) , ( UPPER ) , ( IBTYPE.EQ.3 ) , ( UPPER ) , ( SCALE.NE.ONE ) |
|
| List of variables | ABSTOL ALLEIG ANB BLOCK_CYCLIC_2D CSRC_ CTXT_ DLEN_
| DTYPE_ EPS FIVE IA IACOL IAROW IB IBCOL
| IBROW IBTYPE ICEIL ICOFFA ICOFFB ICTXT IDUM1( 5 ) IDUM2( 5 )
| IERRNPD IFAIL IL INDEIG INDXG2P INFO IROFFA IROFFB
| IU IWORK IZ JA JB JOBZ JZ LIWMIN
| LIWORK LLD_ LQUERY LRWMIN LRWOPT LRWORK LSAME LWMIN
| LWOPT LWORK M M_ MB_ MQ0 MYCOL MYROW
| N N_ NB NB_ NEIG NHEGST_LWOPT NHETRD_LWOPT NN
| NP0 NPCOL NPROW NPS NQ0 NUMROC NZ ONE
| ORFAC PDLAMCH PJLAENV RANGE RSRC_ RWORK SCALE SQNPC
| TRANS UPLO UPPER VALEIG VL VU WANTZ WORK
| ZERO | | close
| |
ABSTOL
ALLEIG
ANB
BLOCK_CYCLIC_2D
CSRC_
CTXT_
DLEN_
DTYPE_
EPS
FIVE
IA
IACOL
IAROW
IB
IBCOL
IBROW
IBTYPE
ICEIL
ICOFFA
ICOFFB
ICTXT
IDUM1( 5 )
IDUM2( 5 )
IERRNPD
IFAIL
IL
INDEIG
INDXG2P
INFO
IROFFA
IROFFB
IU
IWORK
IZ
JA
JB
JOBZ
JZ
LIWMIN
LIWORK
LLD_
LQUERY
LRWMIN
LRWOPT
LRWORK
LSAME
LWMIN
LWOPT
LWORK
M
M_
MB_
MQ0
MYCOL
MYROW
N
N_
NB
NB_
NEIG
NHEGST_LWOPT
NHETRD_LWOPT
NN
NP0
NPCOL
NPROW
NPS
NQ0
NUMROC
NZ
ONE
ORFAC
PDLAMCH
PJLAENV
RANGE
RSRC_
RWORK
SCALE
SQNPC
TRANS
UPLO
UPPER
VALEIG
VL
VU
WANTZ
WORK
ZERO
313#219#565#506#502
| |