Open malmaud opened 8 years ago
Some short examples that show how fragile the current situation is:
module M
x=1
y=@fetch x
end
# Worker will crash here
x=1
@fetch x+1 # Works
@fetch Main.x+1 # Fails
here's another one for the list: https://github.com/JuliaLang/julia/issues/13810
in that issue, the @fetchfrom 2 v
macro is fetching the value of v
on process 1, by copying it through process 2.
It's speculative at this point, but considering the number of related issues, can this be added to the 0.6.0 milestone?
The two open issues are related to treatment of module globals and module loading on workers. The main reported issue i.e., scoping w.r.t. parallel macros has been largely addressed by JuliaLang/julia#19594
Should we close this issue?
There seems to be some general confusion amongst the user base for exactly how variable references in an expression passed to one of the parallel macros are resolved and when the value of variables is transferred vs treated as a reference to a global variable on some module defined on the worker.
Part of the problem could be resolved with better documentation, but I also wonder if we can find a set of rules that is more intuitive and robust in the Julia 0.5 timeframe.
Here are some specific issues concerning symbol resolution in parallel macros issues already brought up that we could maybe make some headway on: