# Saving only specific solutions in ODE solver

**URL:** https://discourse.julialang.org/t/saving-only-specific-solutions-in-ode-solver/112604
**Category:** General Usage
**Tags:** package, diffeq, ode, differentialequation
**Created:** [April 6, 2024, 11:26am UTC](https://discourse.julialang.org/t/saving-only-specific-solutions-in-ode-solver/112604 "2024-04-06T11:26:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Balaji\_Lakshminaraya](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balaji_lakshminaraya/32/205881_2.png) [@Balaji\_Lakshminaraya](https://discourse.julialang.org/u/Balaji_Lakshminaraya)
#### Post date: [April 6, 2024, 11:26am UTC](https://discourse.julialang.org/t/saving-only-specific-solutions-in-ode-solver/112604/1 "2024-04-06T11:26:05Z")

</div>

I’m solving a simultaneous system of linear differential equations (about 40 million simultaneous equations). I am using QNDF solver, with option dense= false. it works well. Since I have a lot of save points, storage is an issue. I don’t want to store all 40 million values at my save points. I just want the ODE solver to save the average of all the values, at each save point. I am aware of call backs in Julia, but I’m unsure of how to utilise that for my problem. Kindly suggest codes to solve this issue.

Note: my problem may be similar to a 3D convection diffusion type equations but not exactly that. If any further information is required I will be willing to share.

---

<div class="post-metadata">

### Author: ![p\_f](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@p\_f](https://discourse.julialang.org/u/p_f)
#### Post date: [April 6, 2024, 11:50am UTC](https://discourse.julialang.org/t/saving-only-specific-solutions-in-ode-solver/112604/2 "2024-04-06T11:50:22Z")

</div>

There is a `save_idxs` keyword that tells the solver only to save certain variables [Common Solver Options (Solve Keyword Arguments) · DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/#CommonSolve.solve-Tuple%7BSciMLBase.AbstractDEProblem,%20Vararg%7BAny%7D%7D).

I suppose you could make `save_idxs` save none of the variables, and then use [Output and Saving Controls · DiffEqCallbacks.jl](https://docs.sciml.ai/DiffEqCallbacks/stable/output_saving/) to save your quantity of interest
