-
Notifications
You must be signed in to change notification settings - Fork 78
Fix pre-compilation test, run unit tests with built system image #1123
Conversation
azure-pipelines.yml
Outdated
displayName: 'Run the tests' | ||
continueOnError: true | ||
- bash: | | ||
set -o xtrace | ||
./julia-$(JULIA_VERSION)/bin/julia -e 'include(joinpath(".dev", "systemimage", "climate_machine_image.jl"))' |
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.
Should we just call the script?
./julia-$(JULIA_VERSION)/bin/julia -e 'include(joinpath(".dev", "systemimage", "climate_machine_image.jl"))' | |
./julia-$(JULIA_VERSION)/bin/julia .dev/systemimage/climate_machine_image.jl |
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.
yes probably, didn't know if we want to re-wrap this in a test macro (if this is determined to be the issue).
didn't escape the execution string correctly, but it seems like this was the issue. I'll move ahead with getting the system image built and trying to use it for running the unit-tests. |
Disappointing the PackageCompiler.jl doesn't work on Windows:
Possibly related to JuliaLang/PackageCompiler.jl#377? I wonder if Julia 1.4 would help? |
It could be JuliaLang/julia#34680, which is supposed to be fixed in 1.4, or it could be JuliaLang/PackageCompiler.jl#365 / JuliaLang/julia#35039. |
I’m a bit confused why we’re calling the sys image script in the azure yml. Isn’t this creating a sys image for a specific test file? |
@charleskawczynski Simon asked if this was possible to start introducing into the pipeline / tests / deployment, what it's actually pre-compiling at this point I don't know is that important (any code that exercises a decent amount of CliMA code will be sufficient, we can re-target what it's exactly pre-compiling to reduce overall average latency at a later point with some profiling). @simonbyrne it looks like Julia 1.4 works on Windows! which is good news. |
@charleskawczynski The script used in the precompilation is just used as a template so it know what function signatures to build into the system image. We might want to do something more like use https://github.com/timholy/SnoopCompile.jl to generate a list of all statements we want to build into the tests. At the moment, we might want to use a script trim down the script used (we don't actually need it to do anything other than trigger the compilation path. Lets switch to 1.4 on Windows for now, as that will unblock #1103 as well, then we can figure out the Slurm CI slowdowns later. |
before:
after:
|
Yeah what I did was a quick hack. Also, if we are using it for testing, we may want to include ClimateMachine itself in the image. I didn't do this in what I did since I wanted to develop ClimateMachine itself. |
eae1371
to
17a82df
Compare
Updated |
end | ||
delete!(pkgs, "Pkg") |
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.
Why remove Pkg
?
524d3c6
to
84901a9
Compare
30cf870
to
4d73f4b
Compare
f7a697e
to
2a33e41
Compare
It seems like there are issues with Pkg.dependencies() and our current Project.toml / Manifest file structure. I'm still getting used to how things work so maybe we should switch to defining a project structure that doesn't cause |
2a33e41
to
f014c94
Compare
@simonbyrne is this ready to merge? |
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.
Just need to resolve the conflict.
1177: Move remaining Mesh tests to runmpi structure r=simonbyrne a=jakebolewski # Description Move remaining Numerics / Mesh tests to use `runmpi` test harness. Should be sped up by #1123. closes #1168 I have - [x] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [x] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. Co-authored-by: jakebolewski <[email protected]>
9f4dcd3
to
04b8f43
Compare
bors r+ |
1123: Fix pre-compilation test, run unit tests with built system image r=simonbyrne a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. Co-authored-by: jakebolewski <[email protected]>
04b8f43
to
774ede0
Compare
Canceled. |
774ede0
to
32a6f64
Compare
bors r+ |
1123: Fix pre-compilation test, run unit tests with built system image r=jakebolewski a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. Co-authored-by: jakebolewski <[email protected]>
Build failed:
|
Needs to be rebased on #1185 |
* add option to compile climatemachine package into sysimg * update ci to use pre-compiled system iamge * bump pipeline def. to use julia 1.4
32a6f64
to
cf39f5e
Compare
bors r+ |
1103: update CuArrays to 2.2 r=simonbyrne a=simonbyrne # Description Fixes #1044, supercedes #1073 and #1099. 1123: Fix pre-compilation test, run unit tests with built system image r=jakebolewski a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. 1172: Separate cli arg parsing from initialization r=jakebolewski a=jakebolewski # Description Separates out cli argument processing from `ClimateMachine.init()` by defining a new method `ClimateMachine.cli()` that parses arguments and initializes ClimateMachine runtime. `ClimateMachine.init()` is preserved to allow for programmatic initialization when command line parsing is not needed (tests / notebooks / scripts). `ClimateMachine.cli` and `ClimateMachine.init` now take keyword arguments to allow for easy overloading for `ClimateMachine.Settings` at configuration / runtime. The experiment files have been updated to use `cli`, the tutorials I kept the same. Consistent overloading fallback behaviour is also defined: 1. cli arguments (if applicable) 2. keyword argument overloads 3. `CLIMATEMACHINE_SETTINGS_<VALUE_NAME>` process environment definitions 4. `ClimateMachine.Settings` default values. This allows for easy overloading of settings in batch scripts / container environments without having to define configuration files or change the driver file source code. We were currently doing this in kind of an add-hoc fashion. Closes #1167 1187: remove MPI installation from Documenter and Coverage r=simonbyrne a=simonbyrne # Description This is no longer necessary. 1192: Add comments to temperature profiles tests r=charleskawczynski a=charleskawczynski # Description - Adds some comments explaining temperature profiles tests Co-authored with: @tapios Co-authored-by: Simon Byrne <[email protected]> Co-authored-by: jakebolewski <[email protected]> Co-authored-by: Charles Kawczynski <[email protected]>
This PR was included in a batch that was canceled, it will be automatically retried |
1123: Fix pre-compilation test, run unit tests with built system image r=jakebolewski a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. 1172: Separate cli arg parsing from initialization r=jakebolewski a=jakebolewski # Description Separates out cli argument processing from `ClimateMachine.init()` by defining a new method `ClimateMachine.cli()` that parses arguments and initializes ClimateMachine runtime. `ClimateMachine.init()` is preserved to allow for programmatic initialization when command line parsing is not needed (tests / notebooks / scripts). `ClimateMachine.cli` and `ClimateMachine.init` now take keyword arguments to allow for easy overloading for `ClimateMachine.Settings` at configuration / runtime. The experiment files have been updated to use `cli`, the tutorials I kept the same. Consistent overloading fallback behaviour is also defined: 1. cli arguments (if applicable) 2. keyword argument overloads 3. `CLIMATEMACHINE_SETTINGS_<VALUE_NAME>` process environment definitions 4. `ClimateMachine.Settings` default values. This allows for easy overloading of settings in batch scripts / container environments without having to define configuration files or change the driver file source code. We were currently doing this in kind of an add-hoc fashion. Closes #1167 1187: remove MPI installation from Documenter and Coverage r=simonbyrne a=simonbyrne # Description This is no longer necessary. 1192: Add comments to temperature profiles tests r=charleskawczynski a=charleskawczynski # Description - Adds some comments explaining temperature profiles tests Co-authored with: @tapios Co-authored-by: jakebolewski <[email protected]> Co-authored-by: Simon Byrne <[email protected]> Co-authored-by: Charles Kawczynski <[email protected]>
Build failed (retrying...): |
1123: Fix pre-compilation test, run unit tests with built system image r=jakebolewski a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. 1172: Separate cli arg parsing from initialization r=jakebolewski a=jakebolewski # Description Separates out cli argument processing from `ClimateMachine.init()` by defining a new method `ClimateMachine.cli()` that parses arguments and initializes ClimateMachine runtime. `ClimateMachine.init()` is preserved to allow for programmatic initialization when command line parsing is not needed (tests / notebooks / scripts). `ClimateMachine.cli` and `ClimateMachine.init` now take keyword arguments to allow for easy overloading for `ClimateMachine.Settings` at configuration / runtime. The experiment files have been updated to use `cli`, the tutorials I kept the same. Consistent overloading fallback behaviour is also defined: 1. cli arguments (if applicable) 2. keyword argument overloads 3. `CLIMATEMACHINE_SETTINGS_<VALUE_NAME>` process environment definitions 4. `ClimateMachine.Settings` default values. This allows for easy overloading of settings in batch scripts / container environments without having to define configuration files or change the driver file source code. We were currently doing this in kind of an add-hoc fashion. Closes #1167 Co-authored-by: jakebolewski <[email protected]>
Build failed (retrying...): |
1123: Fix pre-compilation test, run unit tests with built system image r=jakebolewski a=jakebolewski Drop test macro, just execute script. move into a sep build stage I have - [ ] Written and run all necessary tests with CLIMA by including `tests/runtests.jl` - [ ] Followed all necessary [style guidelines](https://CliMA.github.io/CLIMA/latest/CodingConventions.html) and run `julia .dev/climaformat.jl .` - [ ] Updated the documentation to reflect changes from this PR. Co-authored-by: jakebolewski <[email protected]>
Build failed: |
bors r+ |
Build succeeded: |
Drop test macro, just execute script. move into a sep build stage
I have
tests/runtests.jl
julia .dev/climaformat.jl .
For review by CLIMA developers
julia .dev/format.jl
has been run in a separate commit.