Conversation
|
I think I've sufficiently beat this to death. The only example that I didn't do the restart test on is "tilted_bottom_boundary_layer", which gives NaN when I attempted to run it. |
|
Not sure where to put this in the repo as we haven't had something quite like this before. Perhaps a directory at the top-level called |
giordano
left a comment
There was a problem hiding this comment.
Perhaps a directory at the top-level called
/utilities?
In Julia's repository there's a top-level directory called contrib, which follows an old convention of collecting in there scripts and utilities "contributed" by the community. This could fit in the same scheme, however this one in particular I suspect may benefit from living inside examples/ because you could run it with
julia --project restart_verification.jl ../*.jl
and it'd correctly use the right environment. If this was in contrib/ you'd have to use
julia --project=../examples restart_verification.jl ../examples/*.jl
which is a bit more verbose. That'd be fine for me, but perhaps slightly less user-friendly. I don't have strong opinions either way.
I was assuming that the long-term use case for this script is not really to test the examples (though that is useful, if we change the examples or add new ones) but rather to test on new scripts / user scripts. Users might copy/paste it into the repo they are using for that work in that case. |
giordano
left a comment
There was a problem hiding this comment.
Haven't looked super-duper in details, but looks overall good if it does the job 🚀
| return nothing | ||
| end | ||
|
|
||
| """(If only Comonicon worked) |
There was a problem hiding this comment.
Was this supposed to be a comment? Reads weird in a docstring 😅
…ananigans.jl into eq/manual_restart_verification
- Add `Base.isapprox` for `Clock` structs (compares time fields approximately, iteration and stage exactly) with tests - Refactor `compare_checkpoints.jl` into `CheckpointComparison.jl` module; `compare_all` now returns success/failure boolean - Fix `verify_restart.jl`: propagate `--project` to child Julia processes, rename output directory to `<name>_restart_verification`, add usage docstring, and report success/failure at the end Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
isapprox(0.0, 1e-15) is false with default (relative) tolerances because the reference value is zero. Use time=1.0 as the base so that small perturbations are correctly detected as approximately equal. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5379 +/- ##
==========================================
+ Coverage 73.48% 73.49% +0.01%
==========================================
Files 398 398
Lines 22671 22673 +2
==========================================
+ Hits 16660 16664 +4
+ Misses 6011 6009 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
nice work @ewquon ! |
…ine-ACCESS-OM2 * bp-claude/distributed-FPivot-TripolarGrid: Replace reverse() with reversed-range views in fold halo fills Reinstate Docs/Benchmarks (CliMA#5419) Update fill_halo_regions.jl (CliMA#5415) Temporarily drop Benchmark section from Docs + delete `legacy_benchmarks` (CliMA#5412) Add restart verification script (CliMA#5379) Rework support for reduction operations on Metal GPU to avoid materialization of the interior (CliMA#5329) Fix typo with density perturbation in docs (CliMA#5398) Implement ReactantCore.materialize_traced_array for Field (CliMA#5409) Remove Oceananigans dependency from Project.toml (CliMA#5414) (0.106) Log checkpoint file and mtime when restoring simulations (CliMA#5355)
This is an updated version of #5372, with the driver script now written in Julia.
Usage:
To test all examples:
This will create a subdirectory per simulation script provided, which will generally look like:
The checkpoint comparison is automatically performed by the accompanying utility script, which runs quietly by default. It can also be run on its own:
Current results:
velocities,tracers, andfree_surfacefields identical but NaN found intimestepper.Gⁿ.u