Skip to content

Lower CVODE mxstep cap 500000 -> 50000 to fail stiff draws fast - #32

Merged
jeliason merged 1 commit into
mainfrom
fix/cvode-mxstep-cap
Jun 24, 2026
Merged

Lower CVODE mxstep cap 500000 -> 50000 to fail stiff draws fast#32
jeliason merged 1 commit into
mainfrom
fix/cvode-mxstep-cap

Conversation

@jeliason

Copy link
Copy Markdown
Member

The CVODE max-internal-steps cap (CVodeSetMaxNumSteps) was 500000. A stiff or near-singular parameter draw could grind through ~half a million microscopic BDF steps (~3 min wall) before tripping CV_TOO_MUCH_WORK — showing up as a batch/SBI "straggler" that stalls a whole array task to reach a failure that's detectable far sooner.

With a per-call MaxStep on the order of the output cadence, a well-behaved integration crosses one interval in O(1-100) internal steps, so 50000 still leaves ~3 orders of magnitude of headroom. Valid sims are unaffected; pathological draws fail ~10x faster (~190s -> ~19s) and return cleanly as NaN to the filter.

Surfaced from a PDAC SBI/PPC run where evolve-to-diagnosis stragglers (high v_T_search_volume draws) crawled ~3 min then aborted.

A stiff / near-singular parameter draw could grind ~500k microscopic BDF
steps (~3 min wall) before CVodeSetMaxNumSteps tripped CV_TOO_MUCH_WORK —
a "straggler" that stalls batch/SBI walltime to reach a failure that is
detectable far sooner. With a per-call MaxStep on the order of the output
cadence, a valid integration crosses one interval in O(1-100) steps, so
50000 still leaves ~3 orders of magnitude of headroom while failing
pathological draws ~10x faster.
@jeliason
jeliason merged commit c6baf15 into main Jun 24, 2026
2 checks passed
@jeliason
jeliason deleted the fix/cvode-mxstep-cap branch June 24, 2026 21:41
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