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

FR: Provide a way to play nice with Distributed #254

Open
marius311 opened this issue Sep 16, 2024 · 0 comments
Open

FR: Provide a way to play nice with Distributed #254

marius311 opened this issue Sep 16, 2024 · 0 comments

Comments

@marius311
Copy link

I understand the motivations for why Literate evaluates things in a temporary non-Main module, but it makes simple things like this file fail:

using Distributed
@everywhere x = 1 # this evals in Main on all workers
#-
x # this accesses the temporary non-Main module Literate creates

which would work in a real notebook. You'd need @everywhere @eval $(@__MODULE__) x = 1 but thats really painful if your notebook has lots of @everywheres, and it can get hairier for other constructs. Generally Distributed stuff that works in a notebook or script won't work in Literate.

Could Literate have an option (off by default) to just execute in Main? Or some other solution?

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

1 participant