Skip to main content

How can limit 'Thread count' instead of using 'all available processors'?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Eli Towle
    • Gurobi Staff Gurobi Staff

    Hi Kamal,

    This can be done as follows:

    optimizer = SolverFactory('gurobi')
    optimizer.options['threads'] = 1

    For more information about passing options to solvers, see the Pyomo documentation on the topic. I hope this helps!

    Eli

    1
  • Kamal Chowdhury
    • Gurobi-versary
    • First Question
    • First Comment

    Hi Eli,

    Thank you for the nice simple solution!

    Best,

    Kamal

    0

Post is closed for comments.