Skip to content

FastBroadcast.jl is not using multithreading with ArrayPartition #422

Open
@efaulhaber

Description

@efaulhaber

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions