PDLAEVSWP(l)
π PDLAEVSWP π
okay bestie, sit down, hydrate, and let me tell you about PDLAEVSWP β a LAPACK routine, version 1.5, and honestly? it's giving glow-up era for your eigenvectors. β¨
β¨ NAME β¨
PDLAEVSWP β move the eigenvectors (potentially unsorted) from where they are computed, to a ScaLAPACK standard block cyclic array, sorted so that the corresponding eigenvalues are sorted. π¦
πΈ SYNOPSIS πΈ
SUBROUTINE PDLAEVSWP( N, ZIN, LDZI, Z, IZ, JZ, DESCZ, NVS, KEY, WORK,
LWORK )
INTEGER IZ, JZ, LDZI, LWORK, N
INTEGER DESCZ( * ), KEY( * ), NVS( * )
DOUBLE PRECISION WORK( * ), Z( * ), ZIN( LDZI, * )
π PURPOSE π
PDLAEVSWP moves the eigenvectors (potentially unsorted) from where they are computed, to a ScaLAPACK standard block cyclic array, sorted so that the corresponding eigenvalues are sorted. literally the whole personality of this routine.
π 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". π
Here's the whole notation tea, laid out for you (not me keeping a table, just vibes as a list, but every single detail is still here, no cap):
- NOTATION:
DTYPE_A(global) β stored inDESCA( DTYPE_ )β the descriptor type. In this case,DTYPE_A = 1. - NOTATION:
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. - NOTATION:
M_A(global) β stored inDESCA( M_ )β the number of rows in the global array A. - NOTATION:
N_A(global) β stored inDESCA( N_ )β the number of columns in the global array A. - NOTATION:
MB_A(global) β stored inDESCA( MB_ )β the blocking factor used to distribute the rows of the array. - NOTATION:
NB_A(global) β stored inDESCA( NB_ )β the blocking factor used to distribute the columns of the array. - NOTATION:
RSRC_A(global) β stored inDESCA( RSRC_ )β the process row over which the first row of the array A is distributed. - NOTATION:
CSRC_A(global) β stored inDESCA( CSRC_ )β the process column over which the first column of the array A is distributed. - NOTATION:
LLD_A(local) β stored inDESCA( 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 π₯
NP = the number of rows local to a given process. NQ = the number of columns local to a given process. π
Nβ (global input)INTEGER. The order of the matrix A.N >= 0.ZINβ (local input)DOUBLE PRECISIONarray, dimension( LDZI, NVS(iam) ). The eigenvectors on input. Each eigenvector resides entirely in one process. Each process holds a contiguous set ofNVS(iam)eigenvectors. The first eigenvector which the process holds is: sum fori=[0,iam-1)ofNVS(i).LDZIβ (locl input)INTEGER. leading dimension of the ZIN array. (yes bestie, "locl" β that's how it's spelled here, we do not gatekeep typos, we honor them π)Zβ (local output)DOUBLE PRECISIONarray. global dimension(N, N), local dimension(DESCZ(DLEN_), NQ). The eigenvectors on output. The eigenvectors are distributed in a block cyclic manner in both dimensions, with a block size ofNB.IZβ (global input)INTEGER. Z's global row index, which points to the beginning of the submatrix which is to be operated on.JZβ (global input)INTEGER. Z's global column index, which points to the beginning of the submatrix which is to be operated on.DESCZβ (global and local input)INTEGERarray of dimensionDLEN_. The array descriptor for the distributed matrix Z.NVSβ (global input)INTEGERarray, dimension( nprocs+1 ).nvs(i)= number of processes number of eigenvectors held by processes[0,i-1);nvs(1)= number of eigen vectors held by[0,1-1)== 0;nvs(nprocs+1)= number of eigen vectors held by[0,nprocs)== total number of eigenvectors.KEYβ (global input)INTEGERarray, dimension( N ). Indicates the actual index (after sorting) for each of the eigenvectors.WORKβ (local workspace)DOUBLE PRECISIONarray, dimension(LWORK).LWORKβ (local input)INTEGERdimension ofWORK.
no notes, no warnings, no exit codes in this one β it's just clean eigenvector relocation energy. sort them, ship them, slay. π
and that's the whole page, bestie!! π this lil masterpiece comes from LAPACK routine version 1.5, dated 12 May 1997 β iconic behavior, honestly, it's been serving linear algebra since before some of us were born. π«Άβ¨ periodt. π
π¦ 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