WIP: draft of multi-threaded modified_equation
#139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have implemented a rough first sketch of a multi-threaded version of
modified_equation
.@ketch This may be interesting for us but I would like to get your feedback on a possible interface first.
Currently, I extend the interface
modified_equation(series)
tomodified_equation(series_integrator, thread = Threads.nthreads() > 1)
. Ifthread == true
, it will use a multi-threaded version - which is the case by default if Julia is started with multiple threads. This allows us to check both code paths in CI without having to use multiple threads and allows users to restrict this function to the serial version even if using multiple threads.However, I haven't extended this optional argument to all versions - something like
modified_equation(A, b, c, order)
will still create the B-series of the Runge-Kutta method specified byA, b, c
first up toorder
and then use call ``modified_equation(series_integrator, thread = Threads.nthreads() > 1)`.Preliminary results
On my system, I currently get
on current
main
andwith this PR.
TODO
modifying_integrator