Skip to main content

The true value of threads parameter when solving a problem

Answered

Comments

3 comments

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    As mentioned in our documentation, Gurobi will try to use as many threads as there are logical processors when the Threads parameter is left at its default value. 

    The maximum number of threads used during an optimization run is printed in the log, for example,

    Thread count: 8 physical cores, 16 logical processors, using up to 16 threads
    1
  • Chongyue Xu
    Gurobi-versary
    First Comment
    First Question

    Hi Simranjit: 

    Thanks for your answer. But actually I wanna know the number of threads used when I set the value of this parameter larger than the PC has. For example, thread count is 8 physical cores, 16 logical processors and I set the threads parameter to 20. Then what's the real threads used during the optimization? Looking forward to your reply, thanks.

    8 physical cores, 16 logical processors
    0
  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Chongyue,

    If you set the threads parameter to 20, Gurobi will try to use up to 20 threads. 

    Thread count: 8 physical cores, 16 logical processors, using up to 20 threads

    Warning: Thread count (20) is larger than processor count (16)
             Reduce the value of the Threads parameter to improve performance

    Please note if you request Gurobi to use a greater number of threads than the available CPU cores, the operating system will need to manage the distribution of these threads, often resulting in decreased performance. 

    Best regards,
    Simran

     

    0

Please sign in to leave a comment.