Skip to content
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

Workers should inherit environment #675

Closed
rened opened this issue Aug 20, 2018 · 3 comments
Closed

Workers should inherit environment #675

rened opened this issue Aug 20, 2018 · 3 comments

Comments

@rened
Copy link
Member

rened commented Aug 20, 2018

If I have a project where I installed MyPackage and I can say

julia --project -e "using MyPackage"

the following does only work when I manually activate the environment:

using Distributed
using MyPackage   # works
addprocs(3)
@everywhere
  using Pkg; Pkg.activate(".")  # required
  using MyPackage
  ...
end

I would suggest that workers inherit the environment that is active when they are added with addprocs. Should there be any calls to Pkg.activate after addprocs they have to be manually performed by the user on all workers.

@KristofferC
Copy link
Member

Pkg doesn't control how addprocs work so not sure the fix can happen here.

@rened
Copy link
Member Author

rened commented Aug 20, 2018

Wasn't sure what the right place is - shall I post this as a Julia issue instead?

@KristofferC
Copy link
Member

Yes, this seems like a base Julia issue.

I think the long-term plan is to have all code be loaded from the master process so we don't have to send over all this state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants