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

FastBroadcast.jl is not using multithreading with ArrayPartition #422

Open
efaulhaber opened this issue Feb 13, 2025 · 1 comment
Open
Labels

Comments

@efaulhaber
Copy link
Contributor

efaulhaber commented Feb 13, 2025

Things like this are not multithreaded when u is an ArrayPartition:

@.. broadcast=false thread=true u=u + x * u

ArrayPartitions use a custom BroadcastStyle. FastBroadcast.jl therefore doesn't go into the fast_materialize_threaded! branch and instead calls the generic materialize!, which is not threaded:
https://github.com/YingboMa/FastBroadcast.jl/blob/ad586d83ffcac15c92969b93dd5cf0c8fd025af9/src/FastBroadcast.jl#L305-L313

Multithreaded schemes in OrdinaryDiffEq.jl are using @.. broadcast=false thread=thread ..., and OrdinaryDiffEq.jl is using an ArrayPartition for DynamicalODEProblems. Therefore, time integration is not multithreaded (even when setting thread=True()) with a DynamicalODEProblem and a scheme that works for a general ODEProblem (including all RK methods).

Not sure in which repo this should be fixed, so I just reported it here.

@efaulhaber efaulhaber added the bug label Feb 13, 2025
@ChrisRackauckas
Copy link
Member

I think this needs to go onto FastBroadcast.jl

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

No branches or pull requests

2 participants