JuliaLang / JuliaLang/Distributed.jl
`@distributed` fails silently when lacking `@sync` or reduction
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 55
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
For a simple example:
@distributed for (i, j) in Base.Iterators.product([1, 2], [3, 4])
@show i + j; i + j
end
This should error, as in JuliaLang/Distributed.jl#57, but no error is reported. The code silently never runs the contents of the distributed loop. If you tack on a @sync or even put in a reduction, i.e. @distributed (*) then the error is reported properly.
This is relevant to my use-case where I set up a RemoteChannel and listen to it after running the @distributed loop asynchronously.
julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied @distributed loop on the reported Julia 1.3 setup, comparing it with the @sync and reduction forms. Read the @distributed entry point and related behavior around RemoteChannel and JuliaLang/Distributed.jl#57. Done means the missing @sync or reduction condition reports the expected error instead of silently skipping the loop body.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100