PDSYGST(l)
π PDSYGST(l) β bestie edition π
ok so this is PDSYGST, a LAPACK routine, version 1.5, and she is that girl. sit down, grab a strawberry, and let's get into it πβ¨
β¨ NAME β¨
PDSYGST β reduce a real symmetric-definite generalized eigenproblem to standard form. yes. that's the whole job. she does one thing and she does it well π
πΈ SYNOPSIS πΈ
SUBROUTINE PDSYGST( IBTYPE, UPLO, N, A, IA, JA, DESCA, B, IB, JB, DESCB,
SCALE, INFO )
CHARACTER UPLO
INTEGER IA, IB, IBTYPE, INFO, JA, JB, N
DOUBLE PRECISION SCALE
INTEGER DESCA( * ), DESCB( * )
DOUBLE PRECISION A( * ), B( * )
(yes, DOUBLE PRECISION SCALE has a whole vibe gap in the middle of it. iconic. not touching it. π)
π PURPOSE π
PDSYGST reduces a real symmetric-definite generalized eigenproblem to standard form. literally her whole personality.
so in the following, sub( A ) means A( IA:IA+N-1, JA:JA+N-1 ) and sub( B ) means B( IB:IB+N-1, JB:JB+N-1 ). got it? good. π«Ά
- If
IBTYPE = 1, the problem issub( A )*x = lambda*sub( B )*x, andsub( A )is overwritten byinv(U**T)*sub( A )*inv(U)orinv(L)*sub( A )*inv(L**T) - If
IBTYPE = 2or3, the problem issub( A )*sub( B )*x = lambda*xorsub( B )*sub( A )*x = lambda*x, andsub( A )is overwritten byU*sub( A )*U**TorL**T*sub( A )*L.
π¨ okay important bestie moment:sub( B )must have been previously factorized asU**T*UorL*L**TbyPDPOTRF. do not skip this step. do not pass go. she will not do it for you. π
π§ Notes π§
π the descriptor thing (iykyk) π
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".
ok so here's the lore, laid out for you because the original did a whole table and I'm giving you the same tea in list form:
DTYPE_A(global) β stored inDESCA( DTYPE_ )β The descriptor type. In this case,DTYPE_A = 1.CTXT_A(global) β stored inDESCA( CTXT_ )β The BLACS context handle, indicating the BLACS process grid A is distributed over. The context itself is global, but the handle (the integer value) may vary.M_A(global) β stored inDESCA( M_ )β The number of rows in the global arrayA.N_A(global) β stored inDESCA( N_ )β The number of columns in the global arrayA.MB_A(global) β stored inDESCA( MB_ )β The blocking factor used to distribute the rows of the array.NB_A(global) β stored inDESCA( NB_ )β The blocking factor used to distribute the columns of the array.RSRC_A(global) β stored inDESCA( RSRC_ )β The process row over which the first row of the arrayAis distributed.CSRC_A(global) β stored inDESCA( CSRC_ )β The process column over which the first column of the arrayAis distributed.LLD_A(local) β stored inDESCA( LLD_ )β The leading dimension of the local array.LLD_A >= MAX(1,LOCr(M_A)).
π LOCr and LOCc, the math besties π
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 ofKthat a process would receive ifKwere distributed over thepprocesses of its process column.- Similarly,
LOCc( K )denotes the number of elements ofKthat a process would receive ifKwere distributed over theqprocesses 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 π
ok this is the part where you actually pay attention. every single one. no skimming. π
IBTYPEβ (global input)INTEGER= 1: computeinv(U**T)*sub( A )*inv(U)orinv(L)*sub( A )*inv(L**T);= 2or3: computeU*sub( A )*U**TorL**T*sub( A )*L.
UPLOβ (global input)CHARACTER= 'U': Upper triangle ofsub( A )is stored andsub( B )is factored asU**T*U;= 'L': Lower triangle ofsub( A )is stored andsub( B )is factored asL*L**T.
Nβ (global input)INTEGERThe order of the matricessub( A )andsub( B ).N >= 0.Aβ (local input/local output)DOUBLE PRECISIONpointer into the local memory to an array of dimension(LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of theN-by-Nsymmetric distributed matrixsub( A ). IfUPLO = 'U', the leadingN-by-Nupper triangular part ofsub( A )contains the upper triangular part of the matrix, and its strictly lower triangular part is not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofsub( A )contains the lower triangular part of the matrix, and its strictly upper triangular part is not referenced.
On exit, if INFO = 0, the transformed matrix, stored in the same format as sub( A ).
IAβ (global input)INTEGERA's global row index, which points to the beginning of the submatrix which is to be operated on.JAβ (global input)INTEGERA's global column index, which points to the beginning of the submatrix which is to be operated on.DESCAβ (global and local input)INTEGERarray of dimensionDLEN_. The array descriptor for the distributed matrixA.Bβ (local input)DOUBLE PRECISIONpointer 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 triangular factor from the Cholesky factorization ofsub( B ), as returned byPDPOTRF.IBβ (global input)INTEGERB's global row index, which points to the beginning of the submatrix which is to be operated on.JBβ (global input)INTEGERB's global column index, which points to the beginning of the submatrix which is to be operated on.DESCBβ (global and local input)INTEGERarray of dimensionDLEN_. The array descriptor for the distributed matrixB.SCALEβ (global output)DOUBLE PRECISIONAmount by which the eigenvalues should be scaled to compensate for the scaling performed in this routine. At present,SCALEis always returned as1.0, it is returned here to allow for future enhancement.INFOβ (global output)INTEGER= 0: successful exit< 0: If thei-th argument is an array and thej-entry had an illegal value, thenINFO = -(i*100+j), if thei-th argument is a scalar and had an illegal value, thenINFO = -i.
that's the whole page, bestie. every flag, every formula, nothing skipped, no cap. go forth and reduce those eigenproblems. you ate. π«Άπβ¨
LAPACK version 1.5, dated 12 May 1997 β shoutout to the legends who wrote her, and to you for reading all the way to the bottom. mwah. π
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms