Skip to content

reduce variable rate test memory#551

Merged
isaacsas merged 6 commits intoSciML:masterfrom
isaacsas:reduce_test_mem_use
Feb 15, 2026
Merged

reduce variable rate test memory#551
isaacsas merged 6 commits intoSciML:masterfrom
isaacsas:reduce_test_mem_use

Conversation

@isaacsas
Copy link
Copy Markdown
Member

  • 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

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

Add any other context about the problem here.

isaacsas and others added 6 commits February 14, 2026 18:55
…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]>
@isaacsas isaacsas merged commit fdfc8db into SciML:master Feb 15, 2026
11 checks passed
@isaacsas isaacsas deleted the reduce_test_mem_use branch February 15, 2026 18:29
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