public subroutine OwnedRun(offsetElem, r, first, last, a, b)
The run of elements that rank r-1 owns and that also lies in [first,last]: a..b, empty when
b < a. offsetElem is a decomposition's contiguous ownership table, so rank r-1 owns
offsetElem(r)+1 .. offsetElem(r+1).
Both halves of the migration schedule are this one intersection, evaluated from replicated
tables: my receive run from peer r-1 is (my window) n (r-1's old range), and my send run to
peer r-1 is (r-1's window) n (my old range). Factored out so that the sender and the
receiver cannot drift apart, and so a serial test can exercise the arithmetic the exchange
actually uses rather than a copy of it.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
subroutine OwnedRun(offsetElem,r,first,last,a,b)!! The run of elements that rank r-1 owns and that also lies in [first,last]: a..b, empty when!! b < a. offsetElem is a decomposition's contiguous ownership table, so rank r-1 owns!! offsetElem(r)+1 .. offsetElem(r+1).!!!! Both halves of the migration schedule are this one intersection, evaluated from replicated!! tables: my receive run from peer r-1 is (my window) n (r-1's old range), and my send run to!! peer r-1 is (r-1's window) n (my old range). Factored out so that the sender and the!! receiver cannot drift apart, and so a serial test can exercise the arithmetic the exchange!! actually uses rather than a copy of it.implicit noneinteger,intent(in)::offsetElem(:)integer,intent(in)::r!! 1-based table index; the rank is r-1integer,intent(in)::firstinteger,intent(in)::lastinteger,intent(out)::ainteger,intent(out)::ba=max(first,offsetElem(r)+1)b=min(last,offsetElem(r+1))endsubroutine OwnedRun