Skip to content

feat: add Gauss Kronrod Adjoint #1235

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

maxesit
Copy link

@maxesit maxesit commented Jul 14, 2025

Status: Tests need fixing

Tests 145k, and 146k are failing, even though they work if the callback of GaussAdjoint is replaced with IntegratingGKSum.

@@ -0,0 +1,616 @@
mutable struct GaussKronrodIntegrand{pType, uType, lType, rateType, S, PF, PJC, PJT, DGP,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this code should be unnecessary? Just reuse the other code instead of copy pasting. It should be like 10 lines total?

Comment on lines +188 to +198
_, easy_res145k = adjoint_sensitivities(sol_nodense, Tsit5(), t = t, dgdu_discrete = dg,
abstol = 1e-14,
reltol = 1e-14,
sensealg = GaussKronrodAdjoint(checkpointing = true),
checkpoints = sol.t[1:500:end])
_, easy_res146k = adjoint_sensitivities(sol_nodense, Tsit5(), t = t, dgdu_discrete = dg,
abstol = 1e-14,
reltol = 1e-14,
sensealg = GaussKronrodAdjoint(checkpointing = true,
autojacvec = false),
checkpoints = sol.t[1:500:end])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure is checkpointing is doing something wrong here. But if you just delete and reuse the other code you should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants