Skip to content

AutoSwitch algorithms are not thread-safe #325

@ChrisRackauckas

Description

@ChrisRackauckas

They use the algorithm itself as a cache:

https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/blob/master/src/composite_algs.jl#L1-L12

Instead, ComposteCache should get a slot for switching_cache that can be any struct, and then these algorithms can put all of their switching behavior cache in there inside of the algortihm. Then we don't need to rely on mutation of the alg and it can be repeated across threads (and make it a struct just to be sure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions