# Multithread on JuMP for Benders cut

**URL:** <https://discourse.julialang.org/t/multithread-on-jump-for-benders-cut/62189>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [June 1, 2021, 1:40pm UTC](https://discourse.julialang.org/t/multithread-on-jump-for-benders-cut/62189 "2021-06-01T13:40:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hilaire\_Foillard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hilaire_foillard/32/25706_2.png) [@Hilaire\_Foillard](https://discourse.julialang.org/u/Hilaire_Foillard)\
**Post date:** [June 1, 2021, 1:40pm UTC](https://discourse.julialang.org/t/multithread-on-jump-for-benders-cut/62189/1 "2021-06-01T13:40:51Z")

</div>

Hello, I’m looking for multithreading for my Benders cuts: indeed, the subproblem can be decomposed in several independent subproblems that can be executed in parallel (i use CPLEX solver). When I run my program, my notebook tells me that the kernel has crashed. Could you tell me why?

---

<div class="post-metadata">

**Author:** ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Post date:** [June 1, 2021, 2:41pm UTC](https://discourse.julialang.org/t/multithread-on-jump-for-benders-cut/62189/2 "2021-06-01T14:41:25Z")

</div>

Assuming that you separate the Benders cuts via callbacks let me point you to the relevant lines in the example of the [CPLEX.jl readme](https://github.com/jump-dev/CPLEX.jl):

```julia
# This is very, very important!!! Only use callbacks in single-threaded mode.
MOI.set(model, MOI.NumberOfThreads(), 1)

```

However, I do not know if this also applies for auto-Benders.

---

<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:** [June 1, 2021, 8:33pm UTC](https://discourse.julialang.org/t/multithread-on-jump-for-benders-cut/62189/3 "2021-06-01T20:33:52Z")

</div>

Hi there! Since this is your first post, please read this announcement: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757).

It’s easier to help if you can provide a reproducible example.

This StackOverflow question should be helpful: [multithreading - Create JuMP model with multi-threading in Julia - Stack Overflow](https://stackoverflow.com/questions/64177415/create-jump-model-with-multi-threading-in-julia).

(I need to add something on this to the JuMP documentation: [https://github.com/jump-dev/JuMP.jl/issues/2348.](https://github.com/jump-dev/JuMP.jl/issues/2348.))
