Description Usage Arguments Details Author(s) Examples
Re-distribute a shaq so that the data is "balanced" (in one of two ways; see Details section for more information). This can be useful when, for example, reading data onto multiple MPI ranks from a parallel file system, and then broadcasting/redistributing the data out to the other ranks.
1 2 3 4 5 6 7 | balance.info(X.gbd, comm = 0, gbd.major = 1L, method = "llb")
.balance(X.gbd, bal.info = NULL, gbd.major = 1L)
unbalance(x, bal.info)
balance(x, method = "llb")
|
X.gbd |
A matrix. |
comm |
An MPI communicator number. |
gbd.major |
1 for row-major storage, 2 for column-major. |
method |
One of "llb" (locally load balanced) "bc" (block-cyclic). |
bal.info |
A returned object from |
x |
A shaq. |
There are two separate interfaces. The functions balance()
and
unbalance()
are the "high level" interface, and are appropriate for
most use cases. However, for custom redistributions, the functions
balance.info()
and .balance()
can be used. Use at your own
risk.
balance()
will rearrange the data distributed across the MPI ranks in
one of two ways. The first is in a "locally load balanced" (llb) way. This
means that each rank is given roughly the same amount of data. For example,
balancing 6 rows across 4 MPI ranks would leave 2 rows on ranks 0 and 1 and
1 row on ranks 3 and 4. The other method of distribution is "block-cyclic"
(bc). This will put the data into a 1-dimensional block-cyclic distribution
so that the data could be handed off to pbdDMAT. See that package's
documentation for more details.
Wei-Chen Chen and Drew Schmidt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.