Fast julia startup#419
Open
mesonepigreco wants to merge 3 commits into
Open
Conversation
Fix issue for parallel print error To test if the code works correctly in parallel
Companion patch of tdscha's fast_julia_startup. sscha.Ensemble used to boot the Julia runtime through PyJulia at import time; on any machine where PyCall.jl is not built for the exact running libpython this falls back to Julia(compiled_modules=False) and recompiles PyCall at every Python launch (~3 minutes per import). - New Modules/JuliaExt.py lazy bridge: juliacall (PythonCall.jl) backend by default (no libpython coupling, auto-installs Julia via the shipped juliapkg.json), legacy pyjulia reused if already booted in the process. - Ensemble.py: the eager init block is replaced by a lazy stand-in object, so all julia.Main.* call sites work unchanged and the runtime boots at the first fourier-gradient evaluation instead of at import. - __JULIA_EXT__ keeps its meaning (backend availability, no boot): SchaMinimizer.use_julia and Ensemble.fourier_gradient defaults work as before; no change needed there. - Julia keeps running single-threaded by default, as with PyJulia (JULIA_NUM_THREADS is honored). - New optional extra: pip install python-sscha[julia] -> juliacall. - SSCHA_JULIA_BACKEND env var: juliacall | pyjulia (legacy) | none. Design and measurements: julia_design.md in the tdscha repository. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reducing the startup time of the code by a factor of 30
replacing PyCall with juliacall.