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

Parallel support for reaktoroblock #9

Open
avdudchenko opened this issue Oct 20, 2024 · 0 comments
Open

Parallel support for reaktoroblock #9

avdudchenko opened this issue Oct 20, 2024 · 0 comments
Assignees

Comments

@avdudchenko
Copy link
Contributor

With larger thermodatabases such as wateq4f.dat and many blocks (5+) and species (9+) the solving process can become extremely slow (2-3 seconds per jacobian call)

This can be significantly improved by parallelizing reaktoro solver calls.

There are 2 issues, reaktoro it self can not be pickled.
GrayboxModels are executed serially in current implementation.

Proposed approach:

  • Create a ReaktoroBlockManager that can be passed into ReaktoroBlock for their aggregation and management
    --This manager will configure reaktoro as normal on main thread, and create a parallel worker that houses reaktoro it self for running solves
    --The manager will configure a single ReaktoroGrayBox model that aggregates all of the sub-reaktoro blocks together

Functionality:
-The ReaktoroBlocks will work as normal when a ReaktoroBlockManager object is not provided
-When ReaktoroBlockManager object is provided, all standard functionality will remain the same, except the user will need to call ReaktoroBlockManager.build() after constructing all Reaktoro blocks on the model, and before running any initialization commands - maybe it will be possible to automate this by catching when user calls to initialize the first ReaktoroBlock.
-The user will ideally will be able to interact with each Reaktoro block directly as before (e.g. initialization calls are still performed on the ReaktoroBlock and not ReaktoroBlockManager, as well as interacting with any options or display functions).

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

No branches or pull requests

1 participant