Skip to content

Commit 17d13e6

Browse files
committed
Merge pull request #64 from enthought/process-grid-description
Process grid description
2 parents b8d0b6b + 471dd73 commit 17d13e6

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

protocol.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,37 @@ Definitions
6868
-----------
6969

7070
process
71-
A "process" is the basic unit of execution and is equivalent to a
71+
A **process** is the basic unit of execution and is equivalent to a
7272
conventional OS process. Each process has an address space, has one or
7373
more namespaces that contain objects, and is able to communicate with other
7474
processes to send and receive data. Note that the protocol does not
7575
require any inter-process communication and makes no assumptions regarding
7676
communication libraries.
7777

78+
process rank
79+
An integer label that uniquely identifies a process. Ranks are assigned
80+
contiguously from the range ``0 ... N-1`` for ``N`` processes.
81+
82+
process grid
83+
The **process grid** is an N-dimensional Cartesian grid. Each coordinate
84+
uniquely identifies a process, and the process grid maps process ranks to
85+
grid coordinates. Process ranks are assigned to their corresponding grid
86+
coordinate in "C-order", i.e., the last index varies fastest when iterating
87+
through coordinates in rank order. The product of the number of processes in
88+
each dimension in the process grid shall be equal to the total number of
89+
processes.
90+
91+
For example, for an ``N`` by ``M`` process grid over ``N * M`` processes with
92+
ranks ``0, 1, ..., (N*M)-1``, process grid coordinate ``(i,j)`` corresponds
93+
to the process with rank ``i*M + j``.
94+
95+
(Note that the protocol's *process grid* is compatible with MPI's
96+
``MPI_Cart_create()`` command, and the MPI standard guarantees that Cartesian
97+
process coordinates are always assigned to ranks in the same way and are
98+
"C-order" by default [#mpivirtualtopologies]_. The protocol makes no
99+
assumption about which underlying communication library is being used, nor
100+
does it require subscribing packages to implement a communication layer.)
101+
78102
distributed array
79103
A single logical array of arbitrary dimensionality that is divided among
80104
multiple processes.
@@ -206,8 +230,6 @@ dictionary, with the associated value:
206230
to the process with rank ``i*M + j``. This generalizes in the conventional
207231
row-major way.
208232

209-
(The MPI standard guarantees that Cartesian process coordinates are always
210-
assigned to ranks in the same way [#mpivirtualtopologies]_.)
211233

212234
Optional key-value pairs
213235
````````````````````````

0 commit comments

Comments
 (0)