Using multithreaded cores?
AnsweredI have a 18-core, 36 thread CPU (https://www.intel.com/content/www/us/en/products/sku/81061/intel-xeon-processor-e52699-v3-45m-cache-2-30-ghz/specifications.html ) and am restricting Windows to boot with 8 cores due to my Gurobi license restrictions; so I assume I should be able to use up to 16 threads on those 8 cores.
I am using Gurobi with R. When I start a model without the Threads parameter, the log says:
"Thread count: 8 physical cores, 8 logical processors, using up to 8 threads"
When I explicitly set Threads=16 in the parameters, the log states:
"Thread count: 8 physical cores, 8 logical processors, using up to 16 threads. Warning: Thread count (16) is larger than processor count (8). Reduce the value of the Threads parameter to improve performance"
Is there something I need to set, to make Gurobi recognize the multiple threads per core?
-
Hi Ralph,
I don't fully understand your question. If your OS is configured to use only 8 cores, then there is no way to use the other cores of that machine. If you still request Gurobi to use more threads than available cores, the OS will have to juggle those threads around and in most cases, you will experience a slowdown. That's why the solver prints this warning message.
You may need to change how Windows treats those cores/threads - as hyperthreads effectively doubling the number of physical cores or as pure physical cores without hyperthreading. This is probably a setting in your virtual machine software.
Using more threads than cores can be necessary to reproduce a certain behavior that is dependent on this specific number of threads. This is probably the only reasonable application for increasing the threads number beyond the available cores.
Best regards,
Matthias0 -
Yes, I realized after reading your comment (and some Googling) that I had not enabled hyperthreading in BIOS. Once I did, Gurobi now defaults to using 8 physical cores, 16 logical processors, and 16 threads.
0
Please sign in to leave a comment.
Comments
2 comments