PDLACON(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– PDLACON πŸ’–

okay bestie, gather round, because we're about to talk about PDLACON β€” the LAPACK auxiliary routine that literally just estimates the 1-norm of a square, real distributed matrix A. that's the whole gig. no cap. 🫢


✨ SYNOPSIS ✨

SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN, EST,
                    KASE )

    INTEGER         IV, IX, JV, JX, KASE, N

    DOUBLE          PRECISION EST

    INTEGER         DESCV( * ), DESCX( * ), ISGN( * )

    DOUBLE          PRECISION V( * ), X( * )

πŸŽ€ PURPOSE πŸŽ€

so PDLACON estimates the 1-norm of a square, real distributed matrix A. reverse communication is used for evaluating matrix-vector products, which is a very fancy way of saying you do the multiplying and it just keeps asking you politely. πŸ’…

X and V are aligned with the distributed matrix A β€” that info is implicitly contained within IV, IX, DESCV, and DESCX. iykyk. ✨

🌸 Notes 🌸

every 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. iconic behaviour, honestly.

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".

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

  • N β€” (global input) INTEGER. the length of the distributed vectors V and X. N >= 0. πŸ¦‹
  • V β€” (local workspace) DOUBLE PRECISION pointer into the local memory to an array of dimension LOCr(N+MOD(IV-1,MB_V)). on the final return, V = A*W, where EST = norm(V)/norm(W) (and no, W is not returned, sorry bestie 😭).
  • IV β€” (global input) INTEGER. the row index in the global array V indicating the first row of sub( V ).
  • JV β€” (global input) INTEGER. the column index in the global array V indicating the first column of sub( V ).
  • DESCV β€” (global and local input) INTEGER array of dimension DLEN_. the array descriptor for the distributed matrix V.
  • X β€” (local input/local output) DOUBLE PRECISION pointer into the local memory to an array of dimension LOCr(N+MOD(IX-1,MB_X)). on an intermediate return, X should be overwritten by A * X, if KASE=1, or A' * X, if KASE=2. and then PDLACON must be re-called with all the other parameters unchanged. fr fr, don't touch the other params. πŸ™…
  • IX β€” (global input) INTEGER. the row index in the global array X indicating the first row of sub( X ).
  • JX β€” (global input) INTEGER. the column index in the global array X indicating the first column of sub( X ).
  • DESCX β€” (global and local input) INTEGER array of dimension DLEN_. the array descriptor for the distributed matrix X.
  • ISGN β€” (local workspace) INTEGER array, dimension LOCr(N+MOD(IX-1,MB_X)). ISGN is aligned with X and V.
  • EST β€” (global output) DOUBLE PRECISION. an estimate (a lower bound) for norm(A). πŸŽ€
  • KASE β€” (local input/local output) INTEGER. on the initial call to PDLACON, KASE should be 0. on an intermediate return, KASE will be 1 or 2, indicating whether X should be overwritten by A * X or A' * X. on the final return from PDLACON, KASE will again be 0. the way it loops back to zero is honestly so satisfying. πŸ”₯

πŸ” FURTHER DETAILS πŸ”

the serial version DLACON has been contributed by Nick Higham, University of Manchester. it was originally named SONEST, dated March 16, 1988. a true elder icon. πŸ‘‘

reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation", ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.


quick vibe check: EST is a lower bound for norm(A), and X is straight-up expected to get clobbered by A * X or A' * X mid-run. that's not a bug, that's the whole reverse-communication moment. 🌈

and that's the tea, bestie πŸ“ β€” this lil' page came to you straight out of LAPACK version 1.5, dated 12 May 1997. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from