-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Optionally enable threading via FastBroadcast.jl #1508
Conversation
I will wait until SciML/DiffEqBase.jl#711 is merged and Chris' comment above is resolved before pushing any new changes here (to avoid duplicated work). |
Yeah, this looks like something to accept. |
Okay. I will wait until a new version of DiffEqBase.jl is released and update compat bounds accordingly. I will also update a few more methods accordingly. |
I enabled threaded broadcasting and stage/step limiters for
Left for another PR:
|
Test failures look real. |
I fixed the failing tests and CI looks good to me. There is a slightly decreased coverage, but I cannot view the report on |
For algorithms like Tsit5, there is a separate dispatch for |
Tests pass 🥳 |
Can you open an issue about extending this to other methods? Could be a good GSoC starter/test project. |
|
Would you mind making a new release of OrdinaryDiffEq.jl? |
Donezo |
This is a first draft of threaded parallelism in explicit RK methods using the nice work of @chriselrod in YingboMa/FastBroadcast.jl#19. As discussed in #1423, I added an option
thread
to some RK methods with default valueFalse()
. If set toTrue
,@..
will use threads (from Polyester.jl).Using 946d55a, I get the following results with 4 threads on a AMD Ryzen Threadripper 3990X 64-Core Processor (second run, after compilation)
There are two interesting observations for me here.
reset ∂u/∂t
). The threads from Polyester.jl are already spinning so that there is less latency of subsequent multithreaded parts. See also Implement a fast multithreaded way to reset du trixi-framework/Trixi.jl#924TODO
calculate_residuals!
from DiffEqBase.jlcalculate_residuals!
DiffEqBase.jl#711 first and release a new version of DiffEqBase.jl that we use here to make tests pass