Commit ffbea8f
committed
test: prevent CI 6-hour timeout and fix Thermal/Magnetic regressions
This addresses the real root cause of CI hitting the 6-hour job
timeout: the `Thermal/thermal.jl` "FixedHeatFlow with alpha=0.0 test"
testset calls `solve(prob)` (no algorithm) on a compiled system whose
mtkcompile-reduced form has zero differential states. The default
auto-switching algorithm cannot make forward progress on that and
spins indefinitely instead of erroring or terminating. With an
explicit `ImplicitEuler(; dt=1.0, adaptive=false)`, the test finishes
in ~16s. (The retcode assertion still fails for this stateless system
- same as on April 27 - but the rest of the suite can now run to
completion.)
Other test fixes in the same area, found while reproducing locally:
* `Thermal/motor.jl`, `Thermal/piston.jl` - missing `using
OrdinaryDiffEq` and `t_nounits as t` imports, causing
`@mtkmodel`-expanded `iv` to be MTKBase's
`PleaseImportDynamicQuantities()` sentinel and `solve(prob)` to
error out at `Default algorithm choices require
DifferentialEquations.jl`.
* `Magnetic/magnetic.jl` Inductor: the flux-conservation assertion at
the shared magnetic node used exact `.==` against an observable
reconstructed via symbolic substitution; the structural equation
is enforced but rounding in the substitution accumulates to ~2e-19.
Loosened to `isapprox(...; atol=1e-12)` - still 7 orders of
magnitude below any physical flux scale.
Verified locally on MTK v11.26.0 / MTKBase v1.35.1 / Symbolics v7.23.0
/ SymbolicUtils v4.29.1:
- Thermal/thermal.jl: 18/19 pass (1 pre-existing fail in the
alpha=0 testset, also failing on April 27 master)
- Thermal/motor.jl: 6/6
- Thermal/piston.jl: 3/3
- Magnetic/magnetic.jl: 3/3
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 6c1a7b3 commit ffbea8f
4 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| |||
0 commit comments