Lower CVODE mxstep cap 500000 -> 50000 to fail stiff draws fast - #32
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 trippingCV_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
MaxStepon 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_volumedraws) crawled ~3 min then aborted.