Name

Synopsis

Description

HPL_logsort
computes an array IPMAP and its inverse IPMAPM1 that
contain the logarithmic sorted processes id with repect to the local
number of rows of U that they own. 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, the larget pieces
of U will be sent a minimal number of times.

Arguments

NPROCS (global input) const int
On entry, NPROCS specifies the number of process rows in the
process grid. NPROCS is at least one.

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.

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)