Skip to content

Commit ca3f5b9

Browse files
JamesWrigleyshashi
authored andcommitted
Add a section to the documentation about code loading
Also changed the Slack channel reference to `#dagger`.
1 parent e279303 commit ca3f5b9

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ List of recommended Dagger.jl resources:
9494
## Help and Discussion
9595
For help and discussion, we suggest asking in the following places:
9696

97-
[Julia Discourse](https://discourse.julialang.org/c/domain/parallel/34) and on the [Julia Slack](https://julialang.org/slack/) in the `#distributed` channel.
97+
[Julia Discourse](https://discourse.julialang.org/c/domain/parallel/34) and on the [Julia Slack](https://julialang.org/slack/) in the `#dagger` channel.
9898

9999
## Acknowledgements
100100

Diff for: docs/src/index.md

+27
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
Dagger.jl is a framework for parallel computing across all kinds of resources,
44
like CPUs and GPUs, and across multiple threads and multiple servers.
55

6+
7+
Note: when using Dagger with multiple workers, make sure that the workers are
8+
initialized *before* importing Dagger and doing any distributed operations. This
9+
is good:
10+
```julia-repl
11+
julia> using Distributed
12+
13+
julia> addprocs(2)
14+
15+
julia> using Dagger
16+
```
17+
18+
But this will cause errors when using Dagger:
19+
```julia-repl
20+
julia> using Distributed, Dagger
21+
22+
julia> addprocs(2)
23+
```
24+
25+
The reason is because Distributed.jl requires packages to be loaded across all
26+
workers in order for the workers to use objects from the needed packages, and
27+
`using Dagger` will load Dagger on all existing workers. If you're executing
28+
custom functions then you will also need to define those on all workers with
29+
`@everywhere`, [see the Distributed.jl
30+
documentation](https://docs.julialang.org/en/v1/manual/distributed-computing/#code-availability)
31+
for more information.
32+
633
-----
734

835
## Quickstart: Task Spawning

0 commit comments

Comments
 (0)