Hi, I’m experiencing an (apparently known) error using BSON to try to save very large files, where it throws an error: InexactError: trunc(Int32, 2299858984), when the file to be saved is too large. This has been discussed previously, does anyone know if a fix has been developed?
An obvious workaround would be to disassemble the file into pieces when writing it out, and reassemble it back together when reading it in… unfortunately, I don’t know how to do this with my data set(s), which is not a simple array, but an ODESolution object. In particular, it is the result of solving a 2-dimensional partial differential equation (PDE), which I have broken into several thousand coupled ODE’s, each of which is continuous for interpolation in time t, with each located at a different grid point with discrete values of x.
Does anyone know how to breakdown, write, read, and reassemble this ODESolution object correctly, without losing the interpolation properties of the ODE’s in time? (Or better yet, a way to just fix the BSON problem?)
Here is a sample of the code generating the error:
prob = ODEProblem(Equation!, InitCondMatrix, tspan, Params)
soln = DifferentialEquations.solve(prob, Rodas5(), dense=true,
reltol=1e-12, abstol=1e-12, maxiters = 1e7, progress=true)
BSON.@save string(FilesDir, "soln.bson") soln
Note that InitCondMatrix contains initial Position & Velocity data for each discrete value of x, and is type Array{Float64,2} with size (NpointsInX, 2).
Thanks for any info!