PDLAEVSWP(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– 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 in DESCA( DTYPE_ ) β€” the descriptor type. In this case, DTYPE_A = 1.
  • NOTATION: CTXT_A (global) β€” stored in DESCA( 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 in DESCA( M_ ) β€” the number of rows in the global array A.
  • NOTATION: N_A (global) β€” stored in DESCA( N_ ) β€” the number of columns in the global array A.
  • NOTATION: MB_A (global) β€” stored in DESCA( MB_ ) β€” the blocking factor used to distribute the rows of the array.
  • NOTATION: NB_A (global) β€” stored in DESCA( NB_ ) β€” the blocking factor used to distribute the columns of the array.
  • NOTATION: RSRC_A (global) β€” stored in DESCA( RSRC_ ) β€” the process row over which the first row of the array A is distributed.
  • NOTATION: CSRC_A (global) β€” stored in DESCA( CSRC_ ) β€” the process column over which the first column of the array A is distributed.
  • NOTATION: LLD_A (local) β€” stored in 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 πŸ”₯

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 PRECISION array, dimension ( LDZI, NVS(iam) ). The eigenvectors on input. Each eigenvector resides entirely in one process. Each process holds a contiguous set of NVS(iam) eigenvectors. The first eigenvector which the process holds is: sum for i=[0,iam-1) of NVS(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 PRECISION array. 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 of NB.
  • 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) INTEGER array of dimension DLEN_. The array descriptor for the distributed matrix Z.
  • NVS β€” (global input) INTEGER array, 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) INTEGER array, dimension ( N ). Indicates the actual index (after sorting) for each of the eigenvectors.
  • WORK β€” (local workspace) DOUBLE PRECISION array, dimension (LWORK).
  • LWORK β€” (local input) INTEGER dimension of WORK.

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