reduce variable rate test memory#551
Merged
isaacsas merged 6 commits intoSciML:masterfrom Feb 15, 2026
Merged
Conversation
…oints - Add save_positions=(false,false) to all VariableRateJumps in statistical tests (Blocks G and H) since only saveat/final-time values are needed - Remove interp_points=1000 (100x default) from Block A and H Test 1 - Switch getmean to direct indexing instead of interpolation, pass saveat directly as tsave collection Co-Authored-By: Claude Opus 4.5 <[email protected]>
…erystep=false to Test 4 - run_ensemble: accumulate mean incrementally instead of storing all 8000 solution objects simultaneously, reducing peak memory - Test 4: add save_everystep=false since only jump count (in parameters) is needed, not the trajectory Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add an initialize function to VR_FRM wrap_jump_in_callback so that standard reinit!(integrator) correctly resamples jump_u thresholds. Update getmean to use init/reinit!/solve! to reuse integrator caches, reducing per-trajectory allocations from ~2 MiB to ~6 KiB for VR_FRM+Tsit5. Co-Authored-By: Claude Opus 4.5 <[email protected]>
u_modified!(integrator, true) caused initialize_callbacks! to trigger a spurious savevalues! at t=0 when save_positions[2]=true, breaking monte_carlo_test and thread_safety tests. Manually sync uprev.jump_u and use u_modified!(false) to prevent the save while keeping solver state correct. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace closures in wrap_jump_in_callback with a parametric functor struct, matching the VR_DirectEventCache and AbstractSSAJumpAggregator patterns. Guarantees type stability for captured idx, affect!, and rng. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.