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

threading plugin feature request: allow to replace the threading backend #386

Closed
ajeb78 opened this issue May 31, 2023 · 2 comments
Closed

Comments

@ajeb78
Copy link

ajeb78 commented May 31, 2023

As I understand it the threading plugin uses pthreads for thread management. This means that in software that uses OpenMP for threading there may be a clash between OpenMP's understanding of how many threads are being used and pthreads' understanding of the same, resulting in overallocation of threads compared with the available number of virtual CPUs.

It would be nice to be able to replace the threading backend in a similar manner to what FFTW does (documentation at the bottom of this page).

@mm2
Copy link
Owner

mm2 commented Jun 1, 2023

OpenMP takes a completely different approach, you mark parts of your code as able to be parallelized and the compiler does the job. Using pthreads or win32 API is a low level operation where you control all threading. The architecture of plug-in is based on having control on threads and cores. On the other hand OpenMP and pthreads can coexist. The plug in allows you to specify how many thereads it will use at most at init time. Regarding to replacing the threading backed, I put it on the wish list.

@ajeb78
Copy link
Author

ajeb78 commented Jun 1, 2023

Thank you 🙏

@mm2 mm2 closed this as completed Jun 28, 2023
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

2 participants