System Image
To speed up the start time of ClimateMachine a custom system image can be built with the PackageCompiler.
A helper script for doing this is provided at .dev/systemimage/climate_machine_image.jl
If called with
no arguments: will create the system image
ClimateMachine.soin the@__DIR__directory (i.e., the directory in which the script is located)..dev/systemimage/climate_machine_image.jla single argument: the system image will be placed in the path specified by the argument (relative to the callers path). For example:
.dev/systemimage/climate_machine_image.jl .git/ClimateMachine.soa specified systemimg path and
true: the system image will compile the climate machine package module (useful for CI). This option should not be used when actually developing the climate machine package; see the drawback from thePackageCompilerrepository. For example:.dev/systemimage/climate_machine_image.jl ClimateMachine.so true
To run julia using the newly created system image use:
julia -J/PATH/TO/SYSTEM/IMAGE/ClimateMachine.so --projectIf you put the system image in your .git directory, your system image will not be remove by calls to git clean.
If the climate machine Manifest.toml is updated you must build a new system image for these changes to be seen.