HPL_pdpanrlN(3)

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

πŸ’– HPL_pdpanrlN β€” right-looking panel factorization (yes bestie, we're doing linear algebra today)

ok so this is a page from the HPL library functions manual, and honestly? it's giving main character energy for a routine that nobody outside HPC has ever heard of. let's get into it. 🫢


✨ NAME ✨

HPL_pdpanrlN β€” Right-looking panel factorization. that's it, that's the whole vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "hpl.h"

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

copy it exactly like that, no cap. ✨


🌸 DESCRIPTION 🌸

So HPL_pdpanrlN factorizes a panel of columns that's a sub-array of a larger one-dimensional panel A, using the Right-looking variant of the usual one-dimensional algorithm. and the lower triangular N0-by-N0 upper block of the panel is stored in no-transpose form β€” aka literally just like the input matrix itself. iconic. no transformation, we're keeping it natural. πŸ’–

Bi-directional exchange is used to perform the swap::broadcast operations all at once for one column in the panel. the way that works out? you get a lower number of slightly larger messages than usual. slay. πŸŽ€

Now here's the math part, and I need you to focus bestie because it's actually so pretty. On P processes, assuming bi-directional links, the running time of this function can be approximated by (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. 🧚

and the recursive algorithm? it literally allows you to almost achieve Level 3 BLAS performance in the panel factorization. obsessed. BUT β€” and this is the important plot twist β€” 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. 😭 so if you were counting on the bandwidth being the bottleneck, surprise, it's not.

heads up: Mono-directional links will double this communication cost. so like, if that's your setup, prepare to suffer, fr fr. πŸ’€

Also note: 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. why? because this allows you to bring the current column only once through cache at each step. efficiency queen behavior. πŸ‘‘

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. and fun fact: this idea has been suggested to us by Fred Gustavson, IBM T.J. Watson Research Center. giving credit where it's due, we love to see it. 🫢


🌈 ARGUMENTS 🌈

  • PANEL (local input/output) β€” HPL_T_panel *

On entry, PANEL points to the data structure containing the panel information. it's the whole personality of this call, honestly. ✨

  • M (local input) β€” const int

On entry, M specifies the local number of rows of sub(A). πŸ“

  • N (local input) β€” const int

On entry, N specifies the local number of columns of sub(A). πŸ“

  • ICOFF (global input) β€” const int

On entry, ICOFF specifies the row and column offset of sub(A) in A. so it's the little coordinate telling you where your sub-array is chilling inside the big one. πŸ“

  • WORK (local workspace) β€” double *

On entry, WORK is a workarray of size at least 2*(4+2*N0). do not skimp on this, bestie, give it the space it deserves. πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, obviously:

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

and that's the page!! πŸŽ€ this was HPL 2.2, dated February 24, 2016 β€” yeah she's a little vintage but she still ate. go factorize some panels, bestie, you've got this. πŸ’–βœ¨πŸ¦‹


πŸ“¦ where this page comes from