First attempt at embarrasingly parallel execution to compute head grids.#140
Draft
dbrakenhoff wants to merge 5 commits into
Draft
First attempt at embarrasingly parallel execution to compute head grids.#140dbrakenhoff wants to merge 5 commits into
dbrakenhoff wants to merge 5 commits into
Conversation
- add parallel submodule - define numba tuples containing relevant data for computations for Model, Aquifer and Elements (LineSink and Well) for now. Each class gets to_numba_tuple() method to collect data. - add integer mappings for elements and boundary conditions for identifying computation path - gather element data in structured arrays - write fast versions of potinf and potential - parallelize on x,y pts
- add parallel submodule - define numba tuples containing relevant data for computations for Model, Aquifer and Elements (LineSink and Well) for now. Each class gets to_numba_tuple() method to collect data. - add integer mappings for elements and boundary conditions for identifying computation path - gather element data in structured arrays - write fast versions of potinf and potential - parallelize on x,y pts
Contributor
Author
|
Parallel example (based on example from Discussion #115) Note that first run of numba code triggers the compilation step, which means it runs in about ~15s on my machine. The next run takes about ~3s. Normal timflow (using parallel=True, referring to multithreading) is about ~30s. EDIT: example won't run until #139 is merged into dev and subsequently this branch. |
|
Cool work and awesome to see such speed-up already! Some thoughts:
I will follow the progress with great interest, great work Davíd 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Early result suggests ~10x speedup on my machine.
Todo
to_numba_tuple()for all element families intended for Numba path.Add fast
potinfandpotentialkernels for remaining element classes. Missing:selects aquifer by location; backend now uses a single aqtuple and ignores aq_id.
selection behavior, steady contribution, and output shape conventions.
through Python loops. Write fast parallel implementations for disvec_inf, disvec
functions.
points at well radius, near singular line endpoints, zero/very small times, many
intervals, mixed g/v/z elements.