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

Tasks do not respect thread limt #3

Closed
constantinpape opened this issue Jan 24, 2019 · 3 comments
Closed

Tasks do not respect thread limt #3

constantinpape opened this issue Jan 24, 2019 · 3 comments

Comments

@constantinpape
Copy link
Owner

constantinpape commented Jan 24, 2019

Tasks tend to spawn way more threads / processes than specified.
This might be related to the luigi scheduler or python subprocess.call?!

@constantinpape
Copy link
Owner Author

This does not seem to be a general issue, but rather some workflows which do not respect the thread limit set, or use more than one thread although they should be single threaded. E.g. the watershed workflow.

@constantinpape
Copy link
Owner Author

Turns out the most likely culprit is numpy:
numpy/numpy#11826
To fix it, either set the corresponding environment variables or use https://github.com/joblib/threadpoolctl.

@constantinpape
Copy link
Owner Author

This is indeed the issue.
For now, the solution is to use this function and call it before the numpy import, like here.

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

No branches or pull requests

1 participant