Default computational grid for 2-D block-cyclic distributed arrays
grid = codistributor2dbc.defaultLabGrid()
grid = codistributor2dbc.defaultLabGrid() returns a vector,
grid = [nrow ncol], defining a computational grid of
ncol workers in the open parallel
pool, such that
The grid defined by
codistributor2dbc.defaultLabGrid is as
close to a square as possible. The following rules define
numlabs is a perfect square,
nrow = ncol =
numlabs is an odd power of 2, then
ncol/2 = sqrt(numlabs/2).
nrow <= ncol.
numlabs is a prime,
nrow = 1,
ncol = numlabs.
nrow is the greatest integer less than or equal to
sqrt(numlabs) for which
numlabs/nrow is also an integer.
View the computational grid layout of the default distribution scheme for the open parallel pool.
spmd grid = codistributor2dbc.defaultLabGrid end