JuliaDB saving arrays

grahamas
Tue, 27 Aug 2019 19:06:25 +0000
Data

I’m running a parameter sweep solving differential equations and trying to save the results, and have a couple questions:

1. When I try to save a toy example as follows, I get an error that _impl is not defined for my arguments, seemingly implying that I can’t save a table that has an array as one of its elements. Is that the case? Do I need to unpack all the solutions so that the DB has timepoints and spacepoints as keys?

using JuliaDB
u = rand(10,11)
t = 1.0:10.0
param = 1.2
tab = table((u=u, t=t, param=param), pkey=[:param])

ERROR: MethodError: no method matching _impl(::Array{Float64,2}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Float64)

(follow-up question: previously I’d been using JLD and found that saving a single DESolution object was prohibitively expensive because of all the code serialization or what-have-you, which is why here I’m just saving the u and t arrays. Given that JuliaDB supports saving objects of any type, would some of that overhead be mitigated by saving all the DESolutions into one big DB?)

2. If I’m running this parameter sweep in parallel, will JuliaDB’s save method “just work”? My naive and hopeful reading of the documentation suggests it will work, but I’m not 100% sure.

(edit: momentarily posted wrong code; edit 2: twice)

2 posts - 1 participant