Open danghvu opened 7 years ago
Hi. In your case, as long as the thread affinity is properly set, this change (to the number of threads) should not introduce side effects. You can use OpenMP environmental variables to ensure threads are allocated as expected.
Yes, my changes are simply:
- threads = numa_num_configured_cpus();
+ threads = omp_get_max_threads();
And set the number of threads using OMP_NUM_THREADS
and affinity with OMP_PLACES=cores
Is this your intention to use numa_num_configured_cpus
for targeting hardware threads ? Or you didn't consider that case ?
Personally I think it's better to allow the user to chose how many threads to run and the binding accordingly.
Hi,
I'm using Gemini and find out that the number of threads is set to the number of hardware threads. This is suboptimal in my experiment. It's better to set it to an entire core.
Can you confirm if it will work OK if I set number of threads to number of cores or is there any side effect ?