HPL_logsort(3)

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

πŸ’– HPL_logsort(3) πŸ’–

okay bestie, welcome to the HPL Library Functions corner of the manual, and today's main character is literally HPL_logsort πŸ’…


✨ NAME ✨

HPL_logsort β€” sort the processes in logarithmic order πŸ¦‹


✨ SYNOPSIS ✨

#include "hpl.h"

void HPL_logsort( const int NPROCS, const int ICURROC, int * IPLEN, int
* IPMAP, int * IPMAPM1 );

✨ DESCRIPTION ✨

so HPL_logsort computes an array IPMAP and its inverse IPMAPM1, and those two contain the logarithmically sorted process ids with repect to the local number of rows of U that they own 🌸

why do we even care? because this is necessary to ensure that the logarithmic spreading of U is optimal in terms of number of steps and communication volume as well ✨ in other words β€” and this is the whole vibe β€” the larget pieces of U will be sent a minimal number of times πŸ‘‘

no cap, that's the entire point.


✨ ARGUMENTS ✨

  • NPROCS (global input) const int β€” On entry, NPROCS specifies the number of process rows in the process grid. NPROCS is at least one. so like, the absolute minimum is one, don't come at it with zero πŸ™ˆ
  • ICURROC (global input) const int β€” On entry, ICURROC is the source process row. πŸ“
  • IPLEN (global input/output) int * β€” On entry, IPLEN is an array of dimension NPROCS+1, such that IPLEN[0] is 0, and IPLEN[i] contains the number of rows of U, that process i-1 has. On exit, IPLEN[i] is the number of rows of U in the processes before process IPMAP[i] after the sort, with the convention that IPLEN[NPROCS] is the total number of rows of the panel. In other words, IPLEN[i+1] - IPLEN[i] is the number of rows of A that should be moved to the process IPMAP[i]. IPLEN is such that the number of rows of the source process row is IPLEN[1] - IPLEN[0], and the remaining entries of this array are sorted so that the quantities IPLEN[i+1]-IPLEN[i] are logarithmically sorted. 🧚
ngl this one does double duty β€” it comes in with one job and leaves with a whole new one. input and output, she's versatile πŸ’…
  • IPMAP (global output) int * β€” On entry, IPMAP is an array of dimension NPROCS. On exit, array contains the logarithmic mapping of the processes. In other words, IPMAP[myroc] is the corresponding sorted process coordinate. πŸ—ΊοΈ
  • IPMAPM1 (global output) int * β€” On entry, IPMAPM1 is an array of dimension NPROCS. On exit, this array contains the inverse of the logarithmic mapping contained in IPMAP: IPMAPM1[ IPMAP[i] ] = i, for all i in [0.. NPROCS). it's giving "undo button but make it a whole array" 😭

✨ SEE ALSO ✨

  • HPL_plindx1 (3)
  • HPL_plindx10 (3)
  • HPL_pdlaswp01N (3)
  • HPL_pdlaswp01T (3)

that's the whole page bestie, you ate it πŸ“ go forth and sort logarithmically, fr fr 🫢

HPL 2.2 πŸ’– February 24, 2016 πŸŽ€ β€” mwah, that's the version and the date, signed off with love, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from