PDLACON(l)
π 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 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 gridAis 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)).
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 vectorsVandX.N >= 0. π¦Vβ (local workspace) DOUBLE PRECISION pointer into the local memory to an array of dimensionLOCr(N+MOD(IV-1,MB_V)). on the final return,V = A*W, whereEST = norm(V)/norm(W)(and no,Wis not returned, sorry bestie π).IVβ (global input) INTEGER. the row index in the global arrayVindicating the first row ofsub( V ).JVβ (global input) INTEGER. the column index in the global arrayVindicating the first column ofsub( V ).DESCVβ (global and local input) INTEGER array of dimensionDLEN_. the array descriptor for the distributed matrixV.Xβ (local input/local output) DOUBLE PRECISION pointer into the local memory to an array of dimensionLOCr(N+MOD(IX-1,MB_X)). on an intermediate return,Xshould be overwritten byA * X, ifKASE=1, orA' * X, ifKASE=2. and thenPDLACONmust 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 arrayXindicating the first row ofsub( X ).JXβ (global input) INTEGER. the column index in the global arrayXindicating the first column ofsub( X ).DESCXβ (global and local input) INTEGER array of dimensionDLEN_. the array descriptor for the distributed matrixX.ISGNβ (local workspace) INTEGER array, dimensionLOCr(N+MOD(IX-1,MB_X)).ISGNis aligned withXandV.ESTβ (global output) DOUBLE PRECISION. an estimate (a lower bound) fornorm(A). πKASEβ (local input/local output) INTEGER. on the initial call toPDLACON,KASEshould be0. on an intermediate return,KASEwill be1or2, indicating whetherXshould be overwritten byA * XorA' * X. on the final return fromPDLACON,KASEwill again be0. 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:ESTis a lower bound fornorm(A), andXis straight-up expected to get clobbered byA * XorA' * Xmid-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
- 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