-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add simple precompilation example #3559
base: main
Are you sure you want to change the base?
Conversation
bce114d
to
2aaf04f
Compare
@@ -3,7 +3,7 @@ | |||
println("climaformat.jl has been discontinued in favor of JuliaFormatter") | |||
println("To use JuliaFormatter, add it to your base environment with: ") | |||
println() | |||
println("julia -e 'using Pkg. Pkg.add(\"JuliaFormatter\")'") | |||
println("julia -e 'using Pkg; Pkg.add(\"JuliaFormatter\")'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
println("julia -e 'using Pkg; Pkg.add(\"JuliaFormatter\")'") | |
println("julia -e 'using Pkg; Pkg.add(\"JuliaFormatter\")'") | |
println() | |
println("If you already have it in your local environment, you can use") | |
println("julia -e 'using JuliaFormatter; format(\".\")") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth trying this out, maybe we can loop over more configs? But I think it's a good starting point.
With this PR, users using the driver will need to have Let's make sure we don't break people's workflow. We could take the opportunity to split the driver into |
This only breaks the case of including the driver without using the |
499216a
to
e257d49
Compare
e257d49
to
b487e54
Compare
This PR introduces a local package
PrecompileCI
that precompiles common methods in ClimaAtmos. For now, it only precompiles spaces for different spatial configurations, but this can be expanded to precompile more methods. This all happens in.buildkite/PrecompileCI/src/PrecompileCI.jl
, and the package is then loaded in the driver to load in the precompiled methods.To use, just import it before ClimaAtmos:
julia --project=.buildkite
, thenI included this as a separate package because precompiling these methods when ClimaAtmos is loaded will add to the TTFX.
To see which methods are actually getting precompiled, see this gist or run:
julia --project=.buildkite/PrecompileCI