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

Not fully broadcasting methods #106

Closed
3 of 39 tasks
devmotion opened this issue Aug 4, 2017 · 9 comments
Closed
3 of 39 tasks

Not fully broadcasting methods #106

devmotion opened this issue Aug 4, 2017 · 9 comments

Comments

@devmotion
Copy link
Member

devmotion commented Aug 4, 2017

Despite #104 not all methods are fully broadcasting yet. Mostly this is due to JuliaLang/julia#22255.

Methods that are not fully broadcasting (usually both not in-place and in-place versions if existent):

  • Feagin10
  • Feagin12
  • Feagin14
  • RK4
  • TanYam7
  • DP8
  • TsitPap8
  • OwrenZen4
  • OwrenZen5
  • BS5
  • Tsit5
  • DP5
  • GenericImplicitEuler
  • GenericTrapezoid (only in-place)
  • ImplicitEuler
  • Trapezoid
  • TRBDF2
  • Hairer4/Hairer42 (only in-place)
  • KenCarp4 (only in-place)
  • Kvaerno5 (only in-place)
  • KenCarp5 (only in-place)
  • IRKN3
  • IRKN4
  • DPRKN6
  • DPRKN8
  • DPRKN12
  • ERKN4
  • Nystrom5VelocityIndependent
  • Rosenbrock23 (only in-place)
  • Rosenbrock32 (only in-place)
  • Rosenbrock33 (only in-place)
  • Rosenbrock34 (only in-place)
  • Rosenbrock4 (only in-place)
  • Rodas4 (only in-place)
  • Rosenbrock5
  • Vern6
  • Vern7
  • Vern8
  • Vern9

DP5Threaded is by design not broadcasting.

Moreover, we have to assure that also corresponding interpolation methods are broadcasting.

@devmotion
Copy link
Member Author

We also have to get rid of lines such as https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/blob/master/src/integrators/rosenbrock_integrators.jl#L55-L57 in order to get fully broadcasting methods. Just replacing them with @. W = mass_matrix - γ*J does not work (see #104 (comment)). Maybe we can use something like

if typeof(mass_matrix) <: UniformScaling
    W .= mass_matrix - dt*J
else
    @. W = mass_matrix - dt*J
end

?

@ChrisRackauckas
Copy link
Member

I think there are some Runge-Kutta Nystrom methods in this list as well.

@ChrisRackauckas
Copy link
Member

Maybe JuliaLang/julia#23912 fixes JuliaLang/julia#22255?

@ChrisRackauckas
Copy link
Member

JuliaLang/julia#22255 is fixed on Julia master!

@YingboMa
Copy link
Member

Sadly, we still need to wait for the fix for JuliaLang/julia#28126.

@YingboMa
Copy link
Member

YingboMa commented Feb 6, 2019

With JuliaLang/julia#30973, I got

julia> @btime solve($(ODEProblem((du,u,p,t)->@.(du=0.01*u), ones(100), (0,100.))), Tsit5(), save_on=false); # loop
  13.446 μs (100 allocations: 28.83 KiB)

julia> @btime solve($(ODEProblem((du,u,p,t)->@.(du=0.01*u), ones(100), (0,100.))), Tsit5(), save_on=false); # broadcast
  13.075 μs (100 allocations: 28.83 KiB)

🎉

@ChrisRackauckas
Copy link
Member

@YingboMa got all of DiffEq with #716 which actually sped things up.

@YingboMa
Copy link
Member

No, not all of them. Feagins doesn't have broadcasting.

@ChrisRackauckas
Copy link
Member

#718 any others?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants