Skip to content

Fix nested ForwardDiff tag mismatch #3406

Open
AdityaPandeyCN wants to merge 1 commit intoSciML:masterfrom
AdityaPandeyCN:patch/forwardDiff
Open

Fix nested ForwardDiff tag mismatch #3406
AdityaPandeyCN wants to merge 1 commit intoSciML:masterfrom
AdityaPandeyCN:patch/forwardDiff

Conversation

@AdityaPandeyCN
Copy link
Copy Markdown

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Fix for SciML/OrdinaryDiffEq.jl#3381. When NonlinearSolve computes a Jacobian over an ODE solve, p enters as Dual{NLTag} and Rosenbrock's internal ForwardDiff seeds u as Dual{OrdEqTag, Dual{NLTag}, CS}. The user function f(du, u, p, t) multiplies across tag levels, producing the wrong outer tag and crashing on setindex!.

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
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.

1 participant