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

Bounds error when using thread=True() with OffsetArray #936

Closed
johnbcoughlin opened this issue Feb 16, 2023 · 1 comment
Closed

Bounds error when using thread=True() with OffsetArray #936

johnbcoughlin opened this issue Feb 16, 2023 · 1 comment

Comments

@johnbcoughlin
Copy link

Reproduction:

using OffsetArrays: Origin
using OrdinaryDiffEq
using Static: True

A = rand(10, 10)
A = (A - A')

f!(du, u, p, t) = begin
    A = p.A
    du .= 0
    du[1:10] .= A * u[1:10]
end

u0 = Origin(0)(rand(12))
p = (; A)
prob = ODEProblem(f!, u0, (0, 1), p)

solve(prob, SSPRK43(thread=True()))

This throws an error arising from FastBroadcast.jl. Removing thread=True() makes it work correctly.

@ChrisRackauckas
Copy link
Member

I just ran it and it solved just fine on the latest versions that we just put out this week (ArrayInterface v7 and the new FastBroadcast version). So I'm not entirely sure what may have fixed it, but a lot of things improved because of it so I'll call that a win. Let me know if on the latest versions it works out for you.

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

No branches or pull requests

2 participants