# Saving Differential Equations Solutions to disk

**URL:** <https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387>\
**Category:** Modelling & Simulations\
**Created:** [February 28, 2018, 10:34am UTC](https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387 "2018-02-28T10:34:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FHell](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fhell/32/2421_2.png) [@FHell](https://discourse.julialang.org/u/FHell)\
**Post date:** [February 28, 2018, 10:34am UTC](https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387/1 "2018-02-28T10:34:23Z")

</div>

Hi everyone,  
I want to generate an ensemble of Solutions to a differential equation to later study more in depth, so I want to save it to disk (keeping it simple: one file per simulation. Each solution is about 100Mb).

When I try to save the solutions of DifferentialEquations.jl to disk using JDL I get stack overflow errors. Saving just solution.u works and is what I am doing for now, but it loses a considerable amount of convenience due to not keeping everything else that’s in the solution object around.

Any pointers would be appreciated.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [February 28, 2018, 10:51am UTC](https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387/2 "2018-02-28T10:51:16Z")

</div>

See [ANN: BSON.jl, for saving your Julia data](https://discourse.julialang.org/t/ann-bson-jl-for-saving-your-julia-data/9371)

---

<div class="post-metadata">

**Author:** ![ksmcreynolds](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ksmcreynolds/32/860_2.png) [@ksmcreynolds](https://discourse.julialang.org/u/ksmcreynolds)\
**Post date:** [February 28, 2018, 1:02pm UTC](https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387/3 "2018-02-28T13:02:39Z")

</div>

In the [docs](http://docs.juliadiffeq.org/latest/features/io.html#JLD2-1), it recommends using [JLD2.jl](https://github.com/simonster/JLD2.jl) to save the whole solution.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [February 28, 2018, 2:05pm UTC](https://discourse.julialang.org/t/saving-differential-equations-solutions-to-disk/9387/4 "2018-02-28T14:05:55Z")

</div>

> [@ksmcreynolds](#):
>
> In the docs, it recommends using JLD2.jl to save the whole solution.

I haven’t tried BSON.jl though. Maybe that’s worth a try.
