-
-
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
assigning variables inside spawn #2669
Comments
The
The only difference is that |
How do you deal with the case where you want to refer to some variables that are defined in the local scope and some variables that are defined in the process that runs the expression? |
Relying on global variables to name things on various processors is frowned on, but it can be done with an explicit
|
It's inevitable in applications that aren't embarrassingly parallel to have to store some objects persistently on different processes. There should be better support for this. |
Here's a nonobvious issue with the current behavior:
It works if you rename |
You can send values to processors with RemoteRefs. |
The |
Maybe there should be a mode of parallelism (i.e. a set of macros) that just sends an expression (potentially with spliced values) instead of pulling in local variables? You can do this with remote_call but it's ugly. |
Hey there, just wanted to say the "nonobvious issue" has been spotted in the wild
|
(also note the line numbers are crazy) |
I think I understand why this is tricky given the compile-time evaluation of the macro, but this would be really useful if it worked correctly. It seems to have already led to some confusion: https://groups.google.com/forum/#!searchin/julia-users/@everywhere/julia-users/KDnwAqD0urI/yVfBa3YYxdUJ
The text was updated successfully, but these errors were encountered: