# SCIP solver

**URL:** <https://discourse.julialang.org/t/scip-solver/59497>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [April 17, 2021, 8:45pm UTC](https://discourse.julialang.org/t/scip-solver/59497 "2021-04-17T20:45:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjanun](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mjanun](https://discourse.julialang.org/u/mjanun)\
**Post date:** [April 17, 2021, 8:45pm UTC](https://discourse.julialang.org/t/scip-solver/59497/1 "2021-04-17T20:45:21Z")

</div>

How do we set number of threads for integer problems (MINLP or MILP) in SCIP?  
This code returns an error and I am not 100% sure that parallel\_maxnthreads is the right parameter to use.

```julia
optimizer = SCIP.Optimizer(parallel_maxnthreads=4)
 model = Model(optimizer)

```

---

<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:** [April 18, 2021, 5:06am UTC](https://discourse.julialang.org/t/scip-solver/59497/2 "2021-04-18T05:06:33Z")

</div>

You probably need

```nohighlight
model = Model(() -> SCIP.Optimizer(parallel_maxnthreads = 4))

# or 

model = Model() do
    SCIP.Optimizer(parallel_maxnthreads = 4)
end

```

`JuMP.Model` takes a function that creates an optimizer, not an instance of an optimizer.

---

<div class="post-metadata">

**Author:** ![mjanun](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mjanun](https://discourse.julialang.org/u/mjanun)\
**Post date:** [April 18, 2021, 10:42am UTC](https://discourse.julialang.org/t/scip-solver/59497/3 "2021-04-18T10:42:04Z")

</div>

Thank you. Are you sure one of the `parallel_maxnthreads` or `parallel_minnthreads` is the right parameter to use to set number of threads for integer programs? I have read to use more threads one need to start it in concurrent mode: [parallel processing - Use of threads in SCIP - Stack Overflow](https://stackoverflow.com/questions/55537388/use-of-threads-in-scip)

---

<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:** [April 18, 2021, 8:46pm UTC](https://discourse.julialang.org/t/scip-solver/59497/4 "2021-04-18T20:46:25Z")

</div>

That’s a question for @mbesancon

---

<div class="post-metadata">

**Author:** ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Post date:** [April 19, 2021, 7:30am UTC](https://discourse.julialang.org/t/scip-solver/59497/5 "2021-04-19T07:30:30Z")

</div>

I have not used SCIP in “concurrent mode”, but reading the answers in the linked Stack Overflow question, it looks like it’s not enough to set some parameters. Rather, a different C function call is required to start the optimization. This requires changes to the SCIP.jl code.

FiberSCIP (to parallelize the actual B&B search) is a different piece of software yet again, not covered by SCIP.jl.
