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

Thread usage of pywt #707

Open
stefanratea opened this issue Mar 7, 2024 · 3 comments
Open

Thread usage of pywt #707

stefanratea opened this issue Mar 7, 2024 · 3 comments
Labels

Comments

@stefanratea
Copy link

Hi! Sorry to bother you with this question, but i'm very curious why does including your package in an empty script spawn 15 threads on my computer.
`import pywt

while(True):
print("running")`
Screenshot 2024-03-07 at 13 06 36

Your work is great, and it functions as expected. Thank you very much!

@rgommers
Copy link
Member

rgommers commented Mar 7, 2024

That looks unrelated to PyWavelets. I'm guessing all it is is import numpy as np, and this is the OpenBLAS thread server. Can you please check if just importing numpy reproduces it? If so, it's known and harmless.

@stefanratea
Copy link
Author

Thanks for the quick answer! Replacing pywt with numpy only created 8 threads.
Screenshot 2024-03-07 at 15 00 10
I'm not worried about harmful code getting executed, rather i'm thinking about the reserved threads on a aws server.

@rgommers
Copy link
Member

rgommers commented Mar 8, 2024

I'm not sure, nothing else beyond numpy and standard library modules should be imported. You can try export OPENBLAS_NUM_THREADS=1 to see if that makes a difference. PyWavelets itself shouldn't be doing anything thread-related.

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

No branches or pull requests

2 participants