Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior when saving TaylorNs with JLD2 v0.4 #373

Closed
LuEdRaMo opened this issue Oct 24, 2024 · 3 comments · Fixed by #374
Closed

Inconsistent behavior when saving TaylorNs with JLD2 v0.4 #373

LuEdRaMo opened this issue Oct 24, 2024 · 3 comments · Fixed by #374

Comments

@LuEdRaMo
Copy link
Contributor

When saving a long Vector{TaylorN{Float64}} with JLD2 v0.4 (required minor version in Project.toml) I get inconsistent results:

v = set_variables(Float64, "dx"; order = 5, numvars = 6)
x = [exp(sum(rand(6) .* v)) for _ in 1:10_000]
begin
    for _ in 1:10
        jldsave("test.jld2"; x)
        y = JLD2.load("test.jld2", "x")
        println(count(x .!= y))
    end
end
# 3451, 1967, 965, 0, 0, 0, 2051, 0, 1663, 1305

But with JLD2 v0.5 (latest minor version), everything works:

# 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

¿@lbenet can you reproduce this?

@lbenet
Copy link
Member

lbenet commented Oct 24, 2024

What version of TaylorSeries are you using?

I'm getting the same inconsistencies when I use TaylorSeries v0.18.1 and JLD2 v0.4..53. Yet, if I install JLD2 v0.5 it downgrades TaylorSeries to v0.17.3, and then everything seems consistent.

So, there seems to be an issue with the version and Project.toml in TaylorSeries v0.18.1...

@lbenet
Copy link
Member

lbenet commented Oct 24, 2024

It seems to be an issue in TaylorSeries v0.18.1: with JLD2 v0.4..53 and TaylorSeries to v0.17.3 everything seems ok. Can you confirm this?

lbenet added a commit that referenced this issue Oct 24, 2024
Co-authored-by: LuEdRaMo <[email protected]>
@lbenet
Copy link
Member

lbenet commented Oct 24, 2024

As we discussed offline, the problem is solved by upgrading to JLD v0.5; #374 should fix it.

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 a pull request may close this issue.

2 participants