A writeHalo() method is a collective communication operation used to
fill the ghost cells or overlap regions surrounding the "physical"
segment of a distributed array.
The simplest versions have prototype
where the variable runs over all primitive types and Object,
and the notation # means a multiarray of arbitrary rank,
with elements of type .
More general forms of writeHalo allow to specify that only a subset
of the available ghost area is to be updated, or to select circular wraparound
for updating ghost cells at the extreme ends of the array:
and
Simplest form defines a schedule in which whole of the array ghost region is
updated using Adlib.EDGE mode:
In general forms, the integer vectors wlo, whi, and mode have
length ,
the rank of the argument source. The values wlo and whi specify
the widths at upper and lower ends of the bands to be updated.
The upper and lower widths in dimension are given by wlo [] and
whi []. These values are non-negative, and can only be non-zero if
array source actually has suitable ghost extensions in the dimension
concerned. More specifically, if the array source was created using a range
with ghost extensions
wlo,
whi
as its th dimension, ie
wlo
source.rng().loExtension()
whi
source.rng().hiExtension()
it is required that
whi []
whi
wlo []
wlo
The writeHalo method is implemented by a schedule object with HPspmd
class WriteHalo. Each primitive type and Object has
its own schedule class.
This class has two constructors with arguments identical to the method above,
and has one public method with no arguments called execute(),
which executes the schedule.
The effective public interface of the WriteHalo class is
The source array is the source.
In the second form the values wlo and whi specify
the widths at upper and lower ends of the bands to be updated.
The flag mode
specifies the type of shift. It takes one of the values Adlib.CYCL,
Adlib.EDGE, or Adlib.NONE.
Subsections