HPL_pdpanllN(3)

πŸ“¦ version 2.2, in fedora 43, fedora 44

πŸ’– HPL_pdpanllN β€” left-looking panel factorization, bestie πŸ’–

okay so you're in the HPL Library Functions corner of the man pages and you found HPL_pdpanllN(3). this is the one that does the left-looking panel factorization. she's giving ✨linear algebra✨ and honestly she's kinda iconic. let's get into it 🫢


✨ SYNOPSIS ✨

#include "hpl.h"

void HPL_pdpanllN( HPL_T_panel * PANEL, const int M, const int N, const
int ICOFF, double * WORK );

yes bestie, that's the whole signature. PANEL, M, N, ICOFF, WORK. five things. you got this πŸ’…


🌸 DESCRIPTION 🌸

so HPL_pdpanllN factorizes a panel of columns that's a sub-array of a bigger one-dimensional panel A, and it does it with the Left-looking variant of the usual one-dimensional algorithm. the lower triangular N0-by-N0 upper block of the panel is stored in no-transpose form β€” like, literally just like the input matrix itself. no fancy flipping, no games. πŸŽ€

bi-directional exchange is used to perform the swap::broadcast operations at once for one column in the panel. the way that this works is it results in a lower number of slightly larger messages than usual. so fewer messages, chunkier messages, we love that for us πŸ¦‹

on P processes and assuming bi-directional links, the running time of this function can be approximated by this (when N is equal to N0):

N0 * log_2( P ) * ( lat + ( 2*N0 + 4 ) / bdwth ) +
N0^2 * ( M - N0/3 ) * gam2-3

where M is the local number of rows of the panel, lat and bdwth are the latency and bandwidth of the network for double precision real words, and gam2-3 is an estimate of the Level 2 and Level 3 BLAS rate of execution. ngl the recursive algorithm allows indeed to almost achieve Level 3 BLAS performance in the panel factorization. on a large number of modern machines, this operation is however latency bound, meaning its cost can be estimated by only the latency portion:

N0 * log_2(P) * lat

mono-directional links will double this communication cost. so like, if you don't have bi-directional links, it's giving 2x. not slay. 😭

note that one iteration of the main loop is unrolled. the local computation of the absolute value max of the next column is performed just after its update by the current column. this allows to bring the current column only once through cache at each step β€” efficiency queen πŸ‘‘

the current implementation does not perform any blocking for this sequence of BLAS operations, however the design allows for plugging in an optimal (machine-specific) specialized BLAS-like kernel. this idea has been suggested to us by Fred Gustavson, IBM T.J. Watson Research Center. periodt, credit where credit is due πŸ’œ


🌈 ARGUMENTS 🌈

  • PANEL (local input/output) β€” HPL_T_panel * β€” on entry, PANEL points to the data structure containing the panel information. like, all the panel lore lives here πŸ“‹
  • M (local input) β€” const int β€” on entry, M specifies the local number of rows of sub(A). rows, bestie. the vertical situation. πŸ“
  • N (local input) β€” const int β€” on entry, N specifies the local number of columns of sub(A). columns. the horizontal vibe check. πŸ“
  • ICOFF (global input) β€” const int β€” on entry, ICOFF specifies the row and column offset of sub(A) in A. yeah it does both, she's multifunctional πŸ’…
  • WORK (local workspace) β€” double * β€” on entry, WORK is a workarray of size at least 2*(4+2*N0). don't skimp on the workspace, fr fr, she needs the room 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

the whole girl squad:

  • HPL_dlocmax (3)
  • HPL_dlocswpN (3)
  • HPL_dlocswpT (3)
  • HPL_pdmxswp (3)
  • HPL_pdpancrN (3)
  • HPL_pdpancrT (3)
  • HPL_pdpanllT (3)
  • HPL_pdpanrlN (3)
  • HPL_pdpanrlT (3)

go read them too, they're all part of the family 🌸


πŸ’€ heads up: that running-time estimate is just an approximation, and the latency-bound thing is real β€” on a lot of modern machines the cost is basically just N0 * log_2(P) * lat. plan accordingly, bestie.

okay that's the whole page!! this one's from HPL 2.2, dated February 24, 2016 β€” vintage but still serving πŸ’– go forth and factorize those panels, you absolute main character πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from