-
-
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
Error invoking worker from module #18166
Comments
It seems you need julia> addprocs(1)
1-element Array{Int64,1}:
2
julia> @everywhere module M
function f()
remotecall_fetch(()->1, 2)
end
end
julia> M.f()
1 |
Ref #17435 (comment) for cases where |
One workaround if you must absolutely do this is
There was one case where
The underlying cause seems to be that the closure is defined under |
Another option is to introduce keyword args |
@amitmurthy |
@jla497 that was a suggestion, not yet available. |
#22589 implements and documents a corrected version of the above workaround as a replacement for using remotecall_fetch which does not share the problems of remotecall_fetch with regards to needing to define a module on all workers. |
Also, I don't think the workaround should be suggested - the recommendation should be to load the module on all workers in case of anonymous functions shipped and executed remotely. |
It's just a helper function. As it turned out, |
I'm pretty confused about this. Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: