-
-
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
@everywhere for broadcasting variables #9118
Comments
|
No, it doesn't.....I think you did not do an addprocs....or
|
I did do addprocs, but I may have set the variable everywhere and not needing a broadcast. The point here that you are making is that Perhaps we should have explicit broadcasting:
|
Well, from a user point of view why should the behavior be different between
|
That is a reasonable point. I have usually always thought of |
We need to preserve some syntax for evaluation in the remote context. i.e. we still need an equivalent of
that returns the local ID on each process. That said, this problem has definitely caused me grief before, and it currently takes too much effort to broadcast a variable. |
note that amit's test.jl:
on the unix command line:
not sure whether to consider this a bug or feature but it took me long enough to figure out a work around that i thought i'd post the solution. |
note also that the remote variable name has to be different than the local:
|
how about adding something like this to Base?
one could then simply broadcast a global const as follows:
|
A simple function to broadcast vars to all cores would be great! |
local variables can be broadcast to remote workers by preceeding
shall we close this issue? |
Lets document this and then close the issue. The difference in behavior between |
results in
While
works perfectly fine.
Shouldn't
@everywhere
which runs in the scope ofMain
be a perfectly appropriate method to broadcast variables?The text was updated successfully, but these errors were encountered: