Dynamically adapt Number of Threads
- Dominant language
- C++
- Stars
- 52
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Sometimes a domain or scenario is not big enough to fully leverage all available threads. This is especially true in non-mpi simulations on machines with high thread count.
While this does not give or take time to solution in a significant way it adds unnecessary power consumption.
**Describe the solution you'd like**
Before every OpenMP parallel loop, the number of threads should be calculated / estimated that have a high parallel efficiency. This is the number of hat should be launched.
Parameters that might be taken into account for this:
- Number of parallelizable blocks (most of the time cells per color or slice)
- Particles per cell
-> particles per thread
- arithmetic intensity of the functor. (can be calculated via neededAttributes and some getFlops())
- Homogeneity (?)
**Describe alternatives you've considered**
It should be possible to dis/enable the feature
**Additional context**
The number of threads then also should be logged somewhere. Iteration and turning loggers maybe?
Could be interesting for WindHPC.
Contributor guide
Assessment
This issue has not been assessed yet.