Skip to content

Commit 23fa6b6

Browse files
split out logging to zero the derivative
1 parent 5471cd5 commit 23fa6b6

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

lib/OrdinaryDiffEqCore/ext/OrdinaryDiffEqCoreMooncakeExt.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ using Mooncake: @zero_adjoint, MinimalCtx
55
Mooncake.@zero_adjoint Mooncake.MinimalCtx Tuple{typeof(OrdinaryDiffEqCore.ode_determine_initdt), Any, Any, Any, Any, Any, Any, Any, Any, Any}
66
Mooncake.@zero_adjoint Mooncake.MinimalCtx Tuple{typeof(OrdinaryDiffEqCore.SciMLBase.check_error), Any}
77
Mooncake.@zero_adjoint Mooncake.MinimalCtx Tuple{typeof(OrdinaryDiffEqCore.fixed_t_for_floatingpoint_error!), Any, Any}
8+
Mooncake.@zero_adjoint Mooncake.MinimalCtx Tuple{typeof(OrdinaryDiffEqCore.final_progress), Any}
89

910
end

lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,19 @@ function _postamble!(integrator)
158158
resize!(integrator.sol.k, integrator.saveiter_dense)
159159
end
160160
if integrator.opts.progress
161-
@logmsg(LogLevel(-1),
162-
integrator.opts.progress_name,
163-
_id=integrator.opts.progress_id,
164-
message=integrator.opts.progress_message(integrator.dt, integrator.u,
165-
integrator.p, integrator.t),
166-
progress="done")
161+
167162
end
168163
end
169164

165+
function final_progress(integrator)
166+
@logmsg(LogLevel(-1),
167+
integrator.opts.progress_name,
168+
_id=integrator.opts.progress_id,
169+
message=integrator.opts.progress_message(integrator.dt, integrator.u,
170+
integrator.p, integrator.t),
171+
progress="done")
172+
end
173+
170174
function solution_endpoint_match_cur_integrator!(integrator)
171175
if integrator.opts.save_end &&
172176
(integrator.saveiter == 0 ||

0 commit comments

Comments
 (0)