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

Explicitly release the GIL on calls to the pardiso #14

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

jcapriot
Copy link
Member

Explicitly release the GIL on calls to the pardiso functions.

I had thought this was already working, however all we did by adding nogil to the function declaration, e.g.

cdef _run_pardiso(self, ....) nogil:

was declare that it could be ran without the GIL. In order to release the GIL in Cython you need to explicitly release it in a context manager. As explained in the Cython documentation here.

So I've now done through and explicitly released the GIL on all calls to the pardiso C functions.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 40.49%. Comparing base (c48ea7e) to head (2c66ce6).
Report is 3 commits behind head on main.

Files Patch % Lines
pydiso/mkl_solver.pyx 0.00% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #14       +/-   ##
===========================================
- Coverage   74.78%   40.49%   -34.30%     
===========================================
  Files           2        3        +1     
  Lines         238      363      +125     
  Branches        0       18       +18     
===========================================
- Hits          178      147       -31     
- Misses         60      214      +154     
- Partials        0        2        +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jcapriot jcapriot merged commit aa7ea82 into simpeg:main Mar 15, 2024
18 of 20 checks passed
@jcapriot jcapriot deleted the GIL_release branch March 15, 2024 22:27
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.

1 participant