-
-
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
Global variable not updated on remote workers in some cases #31252
Comments
The logic here is wrong (you can redefine the function with
In the steps you show before (for a a non-bits type):
This is a bug and will happen for many types (as long as you go back to a previous value for the same variable), and I am not sure this PR helps either :( |
The issue is here -
I think I'll submit a PR in a couple of days. |
Yes, i figured that |
Please don't be! The more contributors the better. Most of us have been new to the Julia codebase at one time. |
The linked PR that was merged claims to have fixed this. |
Looks like in some cases, if I switch a global variable, then switch it back, its value on remote workers when captured is only updated after the first switch. Here is a MWE (Julia 1.1.0):
This doesn't always happen though. E.g. if
x
is instead anInt
, it works as I would have expected from the docs:Note sure what triggers the bug, if it even has anything to do with the type of
x
, although is seems reproducible every time. I've found that e.g.x::Int
andx::Vector
work fine, butx::Symbol
andx::String
do not.The text was updated successfully, but these errors were encountered: