From f078d277d260c0d410794a22667f6ef372829d42 Mon Sep 17 00:00:00 2001 From: Frank Schaefer Date: Wed, 10 Jan 2024 09:50:23 -0500 Subject: [PATCH] checkpointing in InterpolatingAdjoint seems to be the issue --- src/callback_tracking.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/callback_tracking.jl b/src/callback_tracking.jl index a92f95170..82f81ab2d 100644 --- a/src/callback_tracking.jl +++ b/src/callback_tracking.jl @@ -266,8 +266,7 @@ function _setup_reverse_callbacks(cb::Union{ContinuousCallback, DiscreteCallback # if save_positions[2] = false, then the right limit is not saved. Thus, for # the QuadratureAdjoint we would need to lift y from the left to the right limit. # However, one also needs to update dgrad later on. - if (sensealg isa QuadratureAdjoint && !cb.save_positions[2]) # || (sensealg isa InterpolatingAdjoint && ischeckpointing(sensealg)) - # lifting for InterpolatingAdjoint is not needed anymore. Callback is already applied. + if (sensealg isa QuadratureAdjoint && !cb.save_positions[2]) || (sensealg isa InterpolatingAdjoint && ischeckpointing(sensealg)) w(y, y, integrator.p, integrator.t) end