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

Replacement of cython with numba (routing) #142

Merged
merged 7 commits into from
Jan 5, 2024
Merged

Replacement of cython with numba (routing) #142

merged 7 commits into from
Jan 5, 2024

Conversation

doc78
Copy link
Collaborator

@doc78 doc78 commented Dec 11, 2023

  • use of numba instead of cython for parallel computations in the routing module: numba was already used in other parallelized functions in soil modules. Now this version extends the use of numba to the kinematic wave parallel routing module. The change allows to completely exclude the use of Cython in the whole Lisflood OS software with no performance loss and skipping further compilation steps and potential run issues when porting kinematic wave compiled library to other systems/hardware. Numba use a Just in time (JIT) compilation that compiles python routines at runtime, generating optimized code and allowing parallelization by skipping the python Global Interpreter Lock (GIL) of specific parallelizable computation functions.
  • xml files and documentation files are now updated removing the variables used by kinematic wave parallel routing module and skipping the steps for the compilation of Cython routing functions. Numba parameters in xml files should be used instead of the old kinematic wave ones to allow or disable parallelization on multiple CPUs hardware systems.
  • documentation of lisflood flags is now updated

@emiliano-gelati
Copy link
Collaborator

This is great!

@doc78 doc78 merged commit 8289138 into master Jan 5, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants