# Setting the number of cores for a Gurobi license in JuMPg

**URL:** <https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809>\
**Category:** Optimization (Mathematical)\
**Tags:** gurobi\
**Created:** [November 27, 2023, 4:08pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809 "2023-11-27T16:08:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdavid16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hdavid16/32/11531_2.png) [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Post date:** [November 27, 2023, 4:08pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809/1 "2023-11-27T16:08:18Z")

</div>

Any help with the following error would be much appreciated. I tried `set_optimizer_attribute(model,"Threads",8)`, but still get the error…

```julia
julia> set_optimizer(model,Gurobi.Optimizer)
ERROR: Gurobi Error 10009: License is for 8 cores, machine has 12

```

---

<div class="post-metadata">

**Author:** ![hdavid16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hdavid16/32/11531_2.png) [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Post date:** [November 27, 2023, 5:37pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809/2 "2023-11-27T17:37:44Z")

</div>

Looks like I need to address this with Gurobi: [https://support.gurobi.com/hc/en-us/articles/360043663032-How-do-I-resolve-an-ERROR-10009-License-is-for-8-cores-machine-has-XX-](https://support.gurobi.com/hc/en-us/articles/360043663032-How-do-I-resolve-an-ERROR-10009-License-is-for-8-cores-machine-has-XX-)

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 27, 2023, 5:40pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809/3 "2023-11-27T17:40:36Z")

</div>

Contact Gurobi support. I dont think this is related to the Julia interface.

---

<div class="post-metadata">

**Author:** ![hdavid16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hdavid16/32/11531_2.png) [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Post date:** [November 27, 2023, 5:46pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809/4 "2023-11-27T17:46:33Z")

</div>

Yes, the license needs to be updated by Gurobi to match the cores. Thanks.
