You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,7 @@
9
9
## Introduction
10
10
11
11
`DistributedArrays.jl` uses the stdlib [`Distributed`][distributed-docs] to implement a *Global Array* interface.
12
-
A `DArray` is distributed accross a set of worker, but the entire array can be transparently
13
-
accessed from all workers.
12
+
A `DArray` is distributed across a set of workers. Each worker can read and write from its local portion of the array and each worker has read-only access to the portions of the array held by other workers.
Copy file name to clipboardExpand all lines: docs/src/index.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@
6
6
Distributed Arrays
7
7
------------------
8
8
9
-
Large computations are often organized around large arrays of data. In
10
-
these cases, a particularly natural way to obtain parallelism is to
11
-
distribute arrays among several processes. This combines the memory
12
-
resources of multiple machines, allowing use of arrays too large to fit
13
-
on one machine. Each process operates on the part of the array it
14
-
owns, providing a ready answer to the question of how a program should
15
-
be divided among machines.
9
+
Large computations are often organized around large arrays of data. In these
10
+
cases, a particularly natural way to obtain parallelism is to distribute arrays
11
+
among several processes. This combines the memory resources of multiple
12
+
machines, allowing use of arrays too large to fit on one machine. Each process
13
+
can read and write to the part of the array it owns and has read-only access to
14
+
the parts it doesn't own. This provides a ready answer to the question of how a
15
+
program should be divided among machines.
16
16
17
17
Julia distributed arrays are implemented by the `DArray` type. A
18
18
`DArray` has an element type and dimensions just like an `Array`.
@@ -241,17 +241,17 @@ Garbage Collection and DArrays
241
241
------------------------------
242
242
243
243
When a DArray is constructed (typically on the master process), the returned DArray objects stores information on how the
244
-
array is distributed, which procesor holds which indices and so on. When the DArray object
245
-
on the master process is garbage collected, all particpating workers are notified and
244
+
array is distributed, which processor holds which indices and so on. When the DArray object
245
+
on the master process is garbage collected, all participating workers are notified and
246
246
localparts of the DArray freed on each worker.
247
247
248
248
Since the size of the DArray object itself is small, a problem arises as `gc` on the master faces no memory pressure to
249
249
collect the DArray immediately. This results in a delay of the memory being released on the participating workers.
250
250
251
-
Therefore it is highly recommended to explcitly call `close(d::DArray)` as soon as user code
251
+
Therefore it is highly recommended to explicitly call `close(d::DArray)` as soon as user code
252
252
has finished working with the distributed array.
253
253
254
-
It is also important to note that the localparts of the DArray is collected from all particpating workers
254
+
It is also important to note that the localparts of the DArray is collected from all participating workers
255
255
when the DArray object on the process creating the DArray is collected. It is therefore important to maintain
256
256
a reference to a DArray object on the creating process for as long as it is being computed upon.
257
257
@@ -326,7 +326,7 @@ Tag `tag` should be used to differentiate between consecutive calls of the same
326
326
consecutive `bcast` calls.
327
327
328
328
`spmd` and spmd related functions are defined in submodule `DistributedArrays.SPMD`. You will need to
329
-
import it explcitly, or prefix functions that can can only be used in spmd mode with `SPMD.`, for example,
329
+
import it explicitly, or prefix functions that can can only be used in spmd mode with `SPMD.`, for example,
330
330
`SPMD.sendto`.
331
331
332
332
@@ -385,7 +385,7 @@ println(d_out)
385
385
SPMD Context
386
386
------------
387
387
388
-
Each SPMD run is implictly executed in a different context. This allows for multiple `spmd` calls to
388
+
Each SPMD run is implicitly executed in a different context. This allows for multiple `spmd` calls to
389
389
be active at the same time. A SPMD context can be explicitly specified via keyword arg `context` to `spmd`.
390
390
391
391
`context(pids=procs())` returns a new SPMD context.
@@ -396,7 +396,7 @@ key-value pairs between spmd runs under the same context.
396
396
`context_local_storage()` returns the dictionary associated with the context.
397
397
398
398
NOTE: Implicitly defined contexts, i.e., `spmd` calls without specifying a `context` create a context
399
-
which live only for the duration of the call. Explictly created context objects can be released
399
+
which live only for the duration of the call. Explicitly created context objects can be released
400
400
early by calling `close(ctxt::SPMDContext)`. This will release the local storage dictionaries
401
401
on all participating `pids`. Else they will be released when the context object is gc'ed
402
402
on the node that created it.
@@ -423,7 +423,7 @@ end
423
423
424
424
spmd(foo,....)
425
425
```
426
-
In the above example, `foo`, `bar` and `baz` are all functions wishing to leverage distributed computation. However, they themselves may be currenty part of a `spmd` call. A safe way to handle such a scenario is to only drive parallel computation from the master process.
426
+
In the above example, `foo`, `bar` and `baz` are all functions wishing to leverage distributed computation. However, they themselves may be currently part of a `spmd` call. A safe way to handle such a scenario is to only drive parallel computation from the master process.
427
427
428
428
The correct way (only have the driver process initiate `spmd` calls):
0 commit comments