Skip to content

DDEProblemLibrary: fix sign error in RADAR5 Oregonator (u1 equation) - #233

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-radar5-oregonator-sign
Sep 27, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-radar5-oregonator-sign

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Please ignore until reviewed by @ChrisRackauckas.

What changed and why

prob_dde_RADAR5_oregonator computes a = -k₁*A*u[2] - k₂*u[1]*v once and uses it in both components, so du[1] gets -k₁ A u₂ where RADAR5 has +k₁ A u₂. The RADAR5 driver (RADAR5-V2.1/OREGONATOR/dr-oregon.f, from http://www.unige.ch/~hairer/radar5-v2.1.tar) has:

F(1)=  kM1*A*Y(2) - kM2*Y(1)*Y2L1 + kM3*B*Y(1)-2.D0*kM4*Y(1)**2
F(2)= -kM1*A*Y(2) - kM2*Y(1)*Y2L1 + fr*kM3*B*Y(1)

With the wrong sign, u₁ decays to 0 and the solution stays flat at u₂ ≈ 1e-5 on [0, 100.5], so the SciMLBenchmarks StiffDDE/Oregonator_wpd page compares solvers on a trivial solution. This PR fixes the RHS and the docstring, adds a Core test comparing the RHS to the RADAR5 FCN, and bumps DDEProblemLibrary to 0.1.10.

Versioning

This restores the sign of the kM1*A*Y(2) term to match the RADAR5 reference driver OREGONATOR/dr-oregon.f (lines 204–205: F(1)= kM1*A*Y(2) ..., F(2)= -kM1*A*Y(2) ...). It is a bug fix that makes the exported problem match its documented source, not a change to intended behavior, and is therefore released as a patch (0.1.10). Anyone relying on the flat trajectory was relying on the bug. The maintainer should decide at merge whether to treat it as breaking (0.2.0) instead.

Risk assessment

Verification

Before/after solution with MethodOfSteps(Rodas5P()), reltol = 1e-9, abstol = 1e-18 (DelayDiffEq 6.4.0, Julia 1.11.9), u₂ sampled at t = 0:5:100:

library (current): retcode=Success nsteps=85    u1 range=(-5.18e-11, 1.0e-10) u2 range=(9.9998e-6, 1.0e-5)
  u2: [1.0e-5, 1.0e-5, 1.0e-5, ... 1.0e-5]
RADAR5 RHS (this PR): retcode=Success nsteps=19662 u1 range=(5.06e-11, 1.86e-7) u2 range=(2.83e-7, 1.0e-5)
  u2: [1.0e-5, 4.48e-6, 2.0e-6, 8.96e-7, 4.01e-7, 3.53e-7, 3.11e-7, 3.02e-7, 4.7e-7, 4.13e-7, 3.63e-7, 3.2e-7, 3.09e-7, 4.84e-7, 4.26e-7, 3.74e-7, 3.29e-7, 2.94e-7, 6.21e-7, 4.39e-7, 3.86e-7]

New test fails without the fix (GROUP=Core, lib/DDEProblemLibrary, Julia 1.11):

RADAR5 Oregonator right-hand side: Test Failed at .../lib/DDEProblemLibrary/test/radar5.jl:16
  Expression: ≈(du, expected, rtol = 1.0e-12)
   Evaluated: [-8.69948e-5, -8.69628e-5] ≈ [-8.58692e-5, -8.69628e-5] (rtol=1.0e-12)
ERROR: LoadError: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken.

and passes with it:

Test Summary: | Pass  Total  Time
Load Tests    |    1      1  0.1s
Test Summary: | Pass  Total  Time
RADAR5        |    1      1  4.0s
     Testing DDEProblemLibrary tests passed

GROUP=QA: Aqua | 20 20, passed. Runic --check and typos clean on changed files.

Not verified

Julia lts/pre not run locally (only 1.11). The problem's solution changes, so any downstream results that use prob_dde_RADAR5_oregonator (SciMLBenchmarks StiffDDE/Oregonator_wpd) change with this release.

Full local docs build was not re-run here: developing the root and local sublibraries into docs/ fails on both this branch and clean master because OrdinaryDiffEq is constrained to v6 while local BVProblemLibrary requires DiffEqBase 7 / OrdinaryDiffEq 7 (introduced at cacf423). Pre-existing; handle separately from this RHS fix.

🤖 Generated with Claude Code (model: claude-opus-5-5[1m])

https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd

CI triage (2026-09-25)

check classification evidence
tests / Core (julia 1, ubuntu-latest, x86) / Tests - Core (Julia 1) infra PR job: Aqua persistent_tasks errors with GitError(... failed to stat '/etc/gitconfig') on Julia 1.13.0 x86 — unrelated to Oregonator RHS. Same failure on unrelated PR branch remove-catalyst-from-jump-library (job). Master cacf423 x86 Core passed (flaky runner/env). Non-x86 Core and all DDEProblemLibrary sublibrary checks on this PR are green.

No PR-caused failures. Branch is up to date with master (merge-base = cacf423); no merge needed. No code changes in this triage pass.


🤖 Posted by an AI agent — harness: Cursor agent 2026.09.23-86fc751 · model: Composer
Conversation: /home/crackauc/.cursor/projects/home-crackauc-sandbox-fleet-master-jobs-nw-diffeqproblemlibrary-233/agent-transcripts/3973e676-8a33-4737-aaa6-9c867b84da4a/3973e676-8a33-4737-aaa6-9c867b84da4a.jsonl

🤖 Body updated by Cursor Agent (model: Composer)

RADAR5-V2.1/OREGONATOR/dr-oregon.f has F(1) = +kM1*A*Y(2) - ..., but
prob_dde_RADAR5_oregonator shared `a = -k1*A*u2 - k2*u1*v` between both
components, flipping the sign of the first term in du[1]. With the wrong
sign u1 decays to zero and the solution stays flat at u2 = 1e-5 instead of
oscillating. Fix the RHS and docstring, add a test against the RADAR5 FCN.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.280
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd
Claude-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBenchmarks.jl that referenced this pull request Sep 26, 2026
Pointing the Manifest at a git rev of the open upstream PR
(SciML/DiffEqProblemLibrary.jl#233) was expedient for getting one CI
weave of the corrected page, but the environment must not depend on an
unreleased fork branch. Back to the registered 0.1.9; the bump to the
release containing the Oregonator RHS fix happens once 0.1.10 reaches
General. The page cannot be published before that bump.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: SWE-2 High
Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 27, 2026 13:58
@ChrisRackauckas
ChrisRackauckas merged commit 0a8d74c into SciML:master Sep 27, 2026
30 of 31 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBenchmarks.jl that referenced this pull request Sep 28, 2026
Pointing the Manifest at a git rev of the open upstream PR
(SciML/DiffEqProblemLibrary.jl#233) was expedient for getting one CI
weave of the corrected page, but the environment must not depend on an
unreleased fork branch. Back to the registered 0.1.9; the bump to the
release containing the Oregonator RHS fix happens once 0.1.10 reaches
General. The page cannot be published before that bump.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: SWE-2 High
Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL)
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBenchmarks.jl that referenced this pull request Sep 28, 2026
The registered release carries the corrected RADAR5 Oregonator problem
(SciML/DiffEqProblemLibrary.jl#233) the page now describes. All other
Manifest changes are Julia stdlib/JLL entries re-resolved under Julia
1.12.7 (the manifest's julia_version moves 1.11.9 -> 1.12.7); no other
registered package changes version.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: swe-2-max
Agent-Session: local CLI session (no shareable URL); transcript under sandbox job rv1905b
ChrisRackauckas added a commit to SciML/SciMLBenchmarks.jl that referenced this pull request Oct 2, 2026
…ADAR5 Oregonator (#1905)

* StiffDDE/Oregonator_wpd: use RADAR5 tolerance scaling for the oscillating solution

With the RADAR5 right-hand side (DiffEqProblemLibrary.jl#233) the solution
spans 1e-11 to 1e-5, so absolute tolerances of 1e-4..1e-11 left every
solver unresolved. Scale the absolute tolerances with the solution as
the RADAR5 driver does, tighten the reference, and describe the
stiff vs non-stiff results.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.280
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd
Claude-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd

* StiffDDE/Oregonator_wpd: pin fixed DDEProblemLibrary and document drops

Pin DDEProblemLibrary 0.1.10 from DiffEqProblemLibrary.jl#233 (git source
until General registers it) so CI weaves the corrected Oregonator RHS.
Document omitted TRBDF2/Tsit5/BS3 points, Rosenbrock23 MaxIters at low
tolerances, SDIRK final-error pathology, and fix the tolerance prose.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Cursor Agent
Agent-Model: Composer
Agent-Session: /home/crackauc/sandbox/fleet-master-jobs/fix-sb-1905/tmp/cursor-agent-logs-25022/session-2026-09-25T04-35-02-903Z-3125561-1.log
Co-authored-by: Cursor <cursoragent@cursor.com>

* StiffDDE: revert Manifest pin to unreleased DDEProblemLibrary branch

Pointing the Manifest at a git rev of the open upstream PR
(SciML/DiffEqProblemLibrary.jl#233) was expedient for getting one CI
weave of the corrected page, but the environment must not depend on an
unreleased fork branch. Back to the registered 0.1.9; the bump to the
release containing the Oregonator RHS fix happens once 0.1.10 reaches
General. The page cannot be published before that bump.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: SWE-2 High
Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL)

* StiffDDE/Oregonator_wpd: correct dropped-point and error-range prose

Running each WorkPrecisionSet with the page's own settings shows the
committed text understated two things. KenCarp4's final error reaches
1.85e-7 at (abstol=1e-12, reltol=1e-3), so the SDIRK range is about
2e-9 to 2e-7, not 5e-9 to 6e-8. TRBDF2 also drops its loosest point in
the stiff-vs-non-stiff diagram, not just in the SDIRK block; and DP5's
loosest final error (~1e-5) is better described relative to u2 at
t_end than "30x the solution scale", which varied 16x-32x between
machines. Rosenbrock23's low-tolerance MaxIters sentence now reports
where each interrupted solve stopped rather than extrapolating a step
count.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: SWE-2 High
Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL)

* StiffDDE/Oregonator_wpd: keep Rosenbrock23 in the low-tolerance block

Raising that block's maxiters to Int(1e7) lets Rosenbrock23 finish all
four pairs (67.7k, 231.7k, 757.3k and 2.42M accepted steps, measured
locally), instead of dropping three points to MaxIters at 1e5. The
diagram now shows it is far more expensive than the Rodas/SDIRK methods
at these tolerances rather than silently omitting it. Also drop the
SDIRK paragraph's comparison to the Rosenbrock final-error diagrams,
which are non-monotone too.

Verified with a local weave (julia +1.11 --threads=16 --project=.
benchmark.jl benchmarks/StiffDDE/Oregonator_wpd.jmd, exit 0): the only
instability warnings are TRBDF2 at t=70.36, Tsit5 at t=48.13 and BS3 at
t=27.50, matching the prose.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: SWE-2 High
Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL)

* StiffDDE: bump DDEProblemLibrary to 0.1.10 for the fixed Oregonator

The registered release carries the corrected RADAR5 Oregonator problem
(SciML/DiffEqProblemLibrary.jl#233) the page now describes. All other
Manifest changes are Julia stdlib/JLL entries re-resolved under Julia
1.12.7 (the manifest's julia_version moves 1.11.9 -> 1.12.7); no other
registered package changes version.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: swe-2-max
Agent-Session: local CLI session (no shareable URL); transcript under sandbox job rv1905b

* StiffDDE/Oregonator_wpd: align prose with the 0.1.10 weave numbers

Fresh weave and probes under Julia 1.12.7 + registered DDEProblemLibrary
0.1.10 show Tsit5's loosest-pair abort at t = 68.45 (was stated as ~48),
DP5's loosest final error at 1.5e-7 (was stated as ~1e-5 and >10x the
endpoint; actually ~40% of u2(t_end) = 3.56e-7), SDIRK final errors in
2.3e-9..3.5e-8 (tighten the stated range), and Rosenbrock23 accepted-step
counts 67695/231679/757319/2422490 (state the full range).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: swe-2-max
Agent-Session: local CLI session (no shareable URL); transcript under sandbox job rv1905b

---------

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.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.

2 participants