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

Do not hold Python's GIL when running commands #1129

Open
wants to merge 1 commit into
base: v2.10
Choose a base branch
from

Conversation

Luthaf
Copy link
Contributor

@Luthaf Luthaf commented Oct 10, 2024

Description

Fixes #1128. I can confirm this fixes the issue for metatensor actions.

However, I'm not sure how to test that pycv still works fine, is it included in the CI test suite?

Type of contribution
  • changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
  • changes to a module not authored by you
  • new module contribution or edit of a module authored by you
Copyright
  • I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
  • the module I added or modified contains a COPYRIGHT file with the correct license information. Code should be released under an open source license. I also used the command cd src && ./header.sh mymodulename in order to make sure the headers of the module are correct.
Tests
  • I added a new regtest or modified an existing regtest to validate my changes.
  • I verified that all regtests are passed successfully on GitHub Actions.

@Iximiel
Copy link
Member

Iximiel commented Oct 10, 2024

However, I'm not sure how to test that pycv still works fine, is it included in the CI test suite?

pycv has its workflow run in linux(-pycv-mpi-), which runs its regtests in its plugin subdirectory.

But we do not have a "run pycv from plumed in python" test that runs on the CI

@Luthaf Luthaf changed the base branch from master to v2.10 October 10, 2024 16:04
@GiovanniBussi
Copy link
Member

However, I'm not sure how to test that pycv still works fine, is it included in the CI test suite?

pycv has its workflow run in linux(-pycv-mpi-), which runs its regtests in its plugin subdirectory.

But we do not have a "run pycv from plumed in python" test that runs on the CI

This possibly means that, due to these GIL issues, also "run pycv from plumed in python" is not working? I though @Iximiel was testing this at least locally, is this correct? Otherwise I think we need a test

@Iximiel
Copy link
Member

Iximiel commented Oct 11, 2024

This possibly means that, due to these GIL issues, also "run pycv from plumed in python" is not working? I though @Iximiel was testing this at least locally, is this correct? Otherwise I think we need a test

I tried, and I think I need to find a solution to this:

what():  Can't add new modules after the interpreter has been initialized

@Luthaf
Copy link
Contributor Author

Luthaf commented Oct 11, 2024

Is this an error on the current master or with these changes?

@Iximiel
Copy link
Member

Iximiel commented Oct 11, 2024

Is this an error on the current master or with these changes?

The error is in master, don't worry.

I opened a separate issue about it

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.

Consider releasing the GIL in the Python interface
3 participants