Skip to content

Add a section to the documentation about code loading #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ List of recommended Dagger.jl resources:
## Help and Discussion
For help and discussion, we suggest asking in the following places:

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

## Acknowledgements

Expand Down
27 changes: 27 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@
Dagger.jl is a framework for parallel computing across all kinds of resources,
like CPUs and GPUs, and across multiple threads and multiple servers.


Note: when using Dagger with multiple workers, make sure that the workers are
initialized *before* importing Dagger and doing any distributed operations. This
is good:
```julia-repl
julia> using Distributed

julia> addprocs(2)

julia> using Dagger
```

But this will cause errors when using Dagger:
```julia-repl
julia> using Distributed, Dagger

julia> addprocs(2)
```

The reason is because Distributed.jl requires packages to be loaded across all
workers in order for the workers to use objects from the needed packages, and
`using Dagger` will load Dagger on all existing workers. If you're executing
custom functions then you will also need to define those on all workers with
`@everywhere`, [see the Distributed.jl
documentation](https://docs.julialang.org/en/v1/manual/distributed-computing/#code-availability)
for more information.

-----

## Quickstart: Task Spawning
Expand Down
Loading