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

Calling threadpool_info in cython parallel block may cause a deadlock #27

Open
jeremiedbb opened this issue Aug 2, 2019 · 0 comments
Open

Comments

@jeremiedbb
Copy link
Collaborator

When there are multiple OpenMP loaded. Replacing 0 by any other thread_num (below) can cause the issue.

with nogil, parallel():
    if openmp.omp_get_thread_num() == 0:
        with gil:
            threadpool_info()

I'm not sure if it's a real issue. It means that trying to control the number of inner threads independently in each outer threads is a bad idea. But I think it's not the purpose of threadpoolctl.

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