-
-
Notifications
You must be signed in to change notification settings - Fork 238
SciMLLogging Integration #2895
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
base: master
Are you sure you want to change the base?
SciMLLogging Integration #2895
Conversation
|
will need SciML/SciMLBase.jl#1159 to fully work |
|
Since you are already working on the logging system, is there any chance that we can have additional logging messages for the time integration loop at trace level to debug issues in the timestepping itself? Or is that too costly? |
|
We are splitting that to a different step. First let's get the infrastructure together, then add new messages.
Never! If it's super costly, just put it in the All preset only. Semi? |
|
At this point anything that was behind a Currently, the For the Linear solves and Nonlinear solves I set verbose to |
|
is this ready to review? |
|
Yep, ready to be looked at. |
|
Lots of test failures |
|
Yes, because I'm using |
ca97de9 to
2566850
Compare
|
There are a lot of ERROR: LoadError: Unsatisfiable requirements detected for package OrdinaryDiffEqCore [bbf590c4]:
OrdinaryDiffEqCore [bbf590c4] log:
├─possible versions are: 1.0.0-1.36.0 or uninstalled
└─restricted to versions 1.37.0-1 by OrdinaryDiffEq [1dea7af3] — no versions left
└─OrdinaryDiffEq [1dea7af3] log:
├─possible versions are: 6.103.0 or uninstalled
└─OrdinaryDiffEq [1dea7af3] is fixed to version 6.103.0which is weird because I bumped OrdinaryDiffEq to 1.37 in this PR, is CI not using the versions in this PR? |
Adds @static if compatibility to support both old and new versions of OrdinaryDiffEqCore before and after PR SciML/OrdinaryDiffEq.jl#2895. The PR adds typeof(verbose) as a type parameter to DEOptions. This change makes DelayDiffEq.jl robust to this API change by detecting at compile time which version of DEOptions is available and using the appropriate constructor. Implementation: - Adds _count_deoptions_typeparams() to count type parameters - Uses DEOPTIONS_HAS_VERBOSE_TYPEPARAM constant for compile-time detection - Old version (OrdinaryDiffEqCore ≤ 1.36): 20 type parameters - New version (OrdinaryDiffEqCore ≥ 1.37): 21 type parameters Benefits: - Zero runtime overhead (@static if is compile-time) - Automatic version detection - Backward and forward compatible - No version number checking needed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds @static if compatibility to support both old and new versions of OrdinaryDiffEqCore before and after PR SciML/OrdinaryDiffEq.jl#2895. The PR adds typeof(verbose) as a type parameter to DEOptions. This change makes DelayDiffEq.jl robust to this API change by detecting at compile time which version of DEOptions is available and using the appropriate constructor. Implementation: - Adds _count_deoptions_typeparams() to count type parameters - Uses DEOPTIONS_HAS_VERBOSE_TYPEPARAM constant for compile-time detection - Old version (OrdinaryDiffEqCore ≤ 1.36): 20 type parameters - New version (OrdinaryDiffEqCore ≥ 1.37): 21 type parameters Benefits: - Zero runtime overhead (@static if is compile-time) - Automatic version detection - Backward and forward compatible - No version number checking needed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds @static if compatibility to support both old and new versions of OrdinaryDiffEqCore before and after PR SciML/OrdinaryDiffEq.jl#2895. The PR adds typeof(verbose) as a type parameter to DEOptions. This change makes DelayDiffEq.jl robust to this API change by detecting at compile time which version of DEOptions is available and using the appropriate constructor. Implementation: - Adds _count_deoptions_typeparams() to count type parameters - Uses DEOPTIONS_HAS_VERBOSE_TYPEPARAM constant for compile-time detection - Old version (OrdinaryDiffEqCore ≤ 1.36): 20 type parameters - New version (OrdinaryDiffEqCore ≥ 1.37): 21 type parameters Benefits: - Zero runtime overhead (@static if is compile-time) - Automatic version detection - Backward and forward compatible - No version number checking needed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
LTS ignores sources |
| @@ -0,0 +1,9 @@ | |||
| # Controlling Solver Verbosity | |||
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.
DiffEqDocs needs a PR that explains it in more detail how it's a solver-package specific thing.
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.
Actually it makes it a bit rough for it to be solver-specific... since then you cannot do things in benchmarks and optimization more generally.
| TruncatedStacktraces = "1.4" | ||
| SciMLBase = "2.99" | ||
| OrdinaryDiffEqCore = "1.29.0" | ||
| OrdinaryDiffEqCore = "1.37.0" |
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 is this required?
|
|
||
| # Get all options in a group | ||
| function group_options(verbosity::ODEVerbosity, group::Symbol) | ||
| if group === :error_control |
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.
This is very type unstable... is it supposed to be a generated function?
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.
This isn't fixed so it's clear why you have boxing.
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.
That's not used anywhere in the constructors, or anywhere else for that matter.
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.
Then just cut it. It's dead code.
| ) | ||
| elseif verbose isa Standard | ||
| # Standard: Everything from Minimal + non-fatal warnings | ||
| ODEVerbosity() |
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.
linear_verbosity should be Minimal still, so should nonlinear_verbosity.
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, that's handled by the default constructor
| linsolve = init( | ||
| linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), | ||
| assumptions = LinearSolve.OperatorAssumptions(true)) | ||
| assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) |
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.
this should be passing it on from the verbose.
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.
all the linear and nonlinear verbosity specifiers are now coming from the ODEVerbosity.
I had to add an argument to alg_cache in order to pass the verbosity object on to the initialization of the linear and nonlinear caches
|
Is there anything I can do about errors like this? Failed to precompile OrdinaryDiffEqAdamsBashforthMoulton [89bda076-bce5-4f1c-845f-551c83cdda9a] to "/home/chrisrackauckas/.julia/compiled/v1.12/OrdinaryDiffEqAdamsBashforthMoulton/jl_QB6FLI".
ERROR: LoadError: Error opening package file /home/chrisrackauckas/.julia/compiled/v1.12/OrdinaryDiffEqCore/SoYJU_894Ui.so: /home/chrisrackauckas/.julia/compiled/v1.12/OrdinaryDiffEqCore/SoYJU_894Ui.so: cannot open shared object file: No such file or directory |
2b9767b to
9ee7c80
Compare
|
@ChrisRackauckas I think this is ready, but it's hard to tell with all of the test failures. Most of them are because LTS doesn't use sources, some are from JET, and some are failures to open .so files. But I went through as many of the legitimate failures that I could find and fixed them. I also bumped all of minor versions of every subpackage to reflect that. The biggest issue here turned out to be that in order to get the Linear and Nonlinear verbosity objects to the linear and nonlinear caches I had to add an argument to every But yeah not sure if it's mergable in this state. |
Yes, make the downstream PRs. But this should be easy to make backwards compatible with just the standard tricks right? Just make verbose be the last argument and make a dispatch that has a default |
ee9fb5f to
24b600d
Compare
|
Running Lotka-Volterra with Tsit5 using OrdinaryDiffEq
using Chairmarks
function lotka_volterra!(du, u, p, t)
x, y = u
α, β, γ, δ = p
du[1] = α * x - β * x * y # prey growth - predation
du[2] = -γ * y + δ * x * y # predator death + growth from predation
end
u0 = [1.0, 1.0] # Initial prey and predator populations
tspan = (0.0, 100.0)
p = [1.5, 1.0, 3.0, 1.0]
prob = ODEProblem(lotka_volterra!, u0, tspan, p)Current Release: (CurrentODE) pkg> st
Status `~/Documents/Work/Testing/ODEVerbosityTesting/CurrentODE/Project.toml`
[0ca39b1e] Chairmarks v1.3.1
[1dea7af3] OrdinaryDiffEq v6.103.0
@b solve(prob, Tsit5())
140.069 μs (5586 allocs: 246.398 KiB)This branch: (NewODE) pkg> st
Status `~/Documents/Work/Testing/ODEVerbosityTesting/NewODE/Project.toml`
[0ca39b1e] Chairmarks v1.3.1
[3263718b] ImplicitDiscreteSolve v1.3.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/ImplicitDiscreteSolve`
[1dea7af3] OrdinaryDiffEq v6.103.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl`
[89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqAdamsBashforthMoulton`
[6ad6398a] OrdinaryDiffEqBDF v1.11.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqBDF`
[bbf590c4] OrdinaryDiffEqCore v1.37.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqCore`
[50262376] OrdinaryDiffEqDefault v1.9.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqDefault`
[4302a76b] OrdinaryDiffEqDifferentiation v1.17.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqDifferentiation`
[9286f039] OrdinaryDiffEqExplicitRK v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqExplicitRK`
[e0540318] OrdinaryDiffEqExponentialRK v1.9.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqExponentialRK`
[becaefa8] OrdinaryDiffEqExtrapolation v1.10.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqExtrapolation`
[5960d6e9] OrdinaryDiffEqFIRK v1.17.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqFIRK`
[101fe9f7] OrdinaryDiffEqFeagin v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqFeagin`
[d3585ca7] OrdinaryDiffEqFunctionMap v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqFunctionMap`
[d28bc4f8] OrdinaryDiffEqHighOrderRK v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqHighOrderRK`
[9f002381] OrdinaryDiffEqIMEXMultistep v1.8.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqIMEXMultistep`
[521117fe] OrdinaryDiffEqLinear v1.7.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqLinear`
[1344f307] OrdinaryDiffEqLowOrderRK v1.7.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqLowOrderRK`
[b0944070] OrdinaryDiffEqLowStorageRK v1.8.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqLowStorageRK`
[127b3ac7] OrdinaryDiffEqNonlinearSolve v1.16.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqNonlinearSolve`
[c9986a66] OrdinaryDiffEqNordsieck v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqNordsieck`
[5dd0a6cf] OrdinaryDiffEqPDIRK v1.7.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqPDIRK`
[5b33eab2] OrdinaryDiffEqPRK v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqPRK`
[04162be5] OrdinaryDiffEqQPRK v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqQPRK`
[af6ede74] OrdinaryDiffEqRKN v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqRKN`
[43230ef6] OrdinaryDiffEqRosenbrock v1.19.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqRosenbrock`
[2d112036] OrdinaryDiffEqSDIRK v1.8.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqSDIRK`
[dc97f408] OrdinaryDiffEqSIMDRK v1.2.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqSIMDRK`
[669c94d9] OrdinaryDiffEqSSPRK v1.8.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqSSPRK`
[e3e12d00] OrdinaryDiffEqStabilizedIRK v1.7.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqStabilizedIRK`
[358294b1] OrdinaryDiffEqStabilizedRK v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqStabilizedRK`
[fa646aed] OrdinaryDiffEqSymplecticRK v1.8.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqSymplecticRK`
[9c7f1690] OrdinaryDiffEqTaylorSeries v1.5.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqTaylorSeries`
[b1df2697] OrdinaryDiffEqTsit5 v1.6.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqTsit5`
[79d7bb75] OrdinaryDiffEqVerner v1.7.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/OrdinaryDiffEqVerner`
[a6db7da4] SciMLLogging v1.5.0
[8b67ef88] SimpleImplicitDiscreteSolve v1.3.0 `~/Documents/Work/dev/OrdinaryDiffEq.jl/lib/SimpleImplicitDiscreteSolve`
@b solve(prob, Tsit5())
95.155 μs (5585 allocs: 246.367 KiB)With Verbose All, to prove that the logging macro is being hit: |
|
@ChrisRackauckas This is ready to be looked at |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.