# Juniper doesn't seem to be using all available threads

**URL:** <https://discourse.julialang.org/t/juniper-doesnt-seem-to-be-using-all-available-threads/88568>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [October 11, 2022, 10:02am UTC](https://discourse.julialang.org/t/juniper-doesnt-seem-to-be-using-all-available-threads/88568 "2022-10-11T10:02:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![this\_josh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/this_josh/32/42679_2.png) [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Post date:** [October 11, 2022, 10:02am UTC](https://discourse.julialang.org/t/juniper-doesnt-seem-to-be-using-all-available-threads/88568/1 "2022-10-11T10:02:17Z")

</div>

I run Julia with 8 threads, as verified by `Threads.nthreads()`, but when I try to solve a problem using Juniper I get the warning `Julia was started with less processors than you defined in your options. Start julia with: `julia -p 1`. After profiling my code it does seem to be bound to a single thread.

MWE

```nohighlight
using JuMP, Juniper, Gurobi, Ipopt
@show Threads.nthreads()

juniper_opt = optimizer_with_attributes(Juniper.Optimizer, "nl_solver" => Ipopt.Optimizer, "mip_solver" => Gurobi.Optimizer, "processors" => Threads.nthreads())

model = Model(juniper_opt)
@variable(model, 0 ≤ x ≤ 1)
@objective(model, Min, x)
optimize!(model)

```

How can I get Juniper to use all available threads? I’ve seen people referencing [this issue](https://github.com/jump-dev/Ipopt.jl/issues/190) but this seems to have been fixed.

---

<div class="post-metadata">

**Author:** ![this\_josh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/this_josh/32/42679_2.png) [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Post date:** [October 11, 2022, 10:14am UTC](https://discourse.julialang.org/t/juniper-doesnt-seem-to-be-using-all-available-threads/88568/2 "2022-10-11T10:14:19Z")

</div>

I am confusing number of processors and threads.
