-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
import Distributed; Distributed.@everywhere x = 2
does not work
#28966
Comments
Looks like the macro julia/stdlib/Distributed/src/macros.jl Line 182 in 2346be8
@everywhere is in the namespace.
d61b054 and x-ref 23164 |
Also, this fails with the same error, despite const parallel = true
if !parallel
println("not parallel")
else
using Distributed; @everywhere x = 2
println("parallel")
end |
For now, this slight tweak works for me const parallel = true
if !parallel
println("not parallel")
else
using Distributed
Distributed.remotecall_eval(Main, procs(), :(x = 2)) # in lieu of @everywhere x = 2
println("parallel")
end |
@ibadr That's a different issue: The parser tries to expand the macro before the |
GitHub doesn't autoclose issues from commit messages any more? fixed by #32144 |
…julia#32144) (cherry picked from commit 2da966a)
…julia#32144) (cherry picked from commit 2da966a)
…julia#32144) (cherry picked from commit 2da966a)
This works fine:
but
gives an error.
The text was updated successfully, but these errors were encountered: