PSLASMSUB(l)
β¨ PSLASMSUB β NAME β¨
okay bestie, gather round, because this is PSLASMSUB from LAPACK version 1.5 (the (l) is just the manual section, don't worry about it π
), and its whole entire job is: look for a small subdiagonal element from the bottom of the matrix that it can safely set to zero.
that's it. that's the gig. tiny task, big responsibility. π
π¦ SYNOPSIS π¦
SUBROUTINE PSLASMSUB( A, DESCA, I, L, K, SMLNUM, BUF, LWORK )
INTEGER I, K, L, LWORK
REAL SMLNUM
INTEGER DESCA( * )
REAL A( * ), BUF( * )
π PURPOSE π
so like, PSLASMSUB looks for a small subdiagonal element from the bottom of the matrix that it can safely set to zero. yes, the NAME and the PURPOSE are saying the same thing, and honestly? iconic of them.
πΈ Notes πΈ
every global data object out here is described by an associated description vector. this vector stores the information you need 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". iykyk.
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. lowkey chaotic but okay.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 π
Aβ (global input) REAL array, dimension(DESCA(LLD_),*). on entry, the Hessenberg matrix whose tridiagonal part is being scanned. unchanged on exit. she's just sitting there being scanned, minding her business. β¨DESCAβ (global and local input) INTEGER array of dimensionDLEN_. the array descriptor for the distributed matrixA.Iβ (global input) INTEGER. the global location of the bottom of the unreduced submatrix ofA. unchanged on exit.Lβ (global input) INTEGER. the global location of the top of the unreduced submatrix ofA. unchanged on exit.Kβ (global output) INTEGER. on exit, this yields the bottom portion of the unreduced submatrix. this will satisfy:L <= M <= I-1.SMLNUMβ (global input) REAL. on entry, a "small number" for the given matrix. unchanged on exit.BUFβ (local output) REAL array of sizeLWORK.LWORKβ (global input) INTEGER. on exit,LWORKis the size of the work buffer. this must be at least2*Ceil( Ceil( (I-L)/HBL ) / LCM(NPROW,NPCOL) )β here LCM is least common multiple, andNPROWxNPCOLis the logical grid size.
π Notes: π
this routine does a global maximum and must be called by all processes. no solo missions, bestie. everyone's in the group chat for this one. π«Ά
this code is basically a parallelization of the following snippet of LAPACK code from SLAHQR:
Look for a single small subdiagonal element.
DO 20 K = I, L + 1, -1
TST1 = ABS( H( K-1, K-1 ) ) + ABS( H( K, K ) )
IF( TST1.EQ.ZERO )
$ TST1 = SLANHS( '1', I-L+1, H( L, L ), LDH, WORK )
IF( ABS( H( K, K-1 ) ).LE.MAX( ULP*TST1, SMLNUM ) )
$ GO TO 30
20 CONTINUE
30 CONTINUE
implemented by: G. Henry, November 17, 1996. an absolute legend, we love to see it. π
fr fr, that's the whole page β go forth and zero out those subdiagonal elements safely. no cap. π
LAPACK version 1.5, dated 12 May 1997 β that's the version and the date this page shipped with, and yes she's vintage, she's retro, she's still slaying. π¦β¨
π¦ 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