# How to speed up ipopt with HSL ma86 using parallel processing

**URL:** <https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump, ipopt\
**Created:** [July 28, 2024, 1:32pm UTC](https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567 "2024-07-28T13:32:35Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [July 30, 2024, 2:42am UTC](https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567/8 "2024-07-30T02:42:18Z")

</div>

I thought this model looked familiar:

> [@Struggle at large scale problem of nlp using ipopt](https://discourse.julialang.org/t/struggle-at-large-scale-problem-of-nlp-using-ipopt/116240/):
>
> hi there, I have a non-linear problem where the decision variable is a matrix of dimensions m \* n \* k. The constraints may also be somewhat complex. When I set m to a small subset of the dataset, e.g., 10, the program seems to work normally. However, when I set m to a slightly larger value, e.g., 50, the program does not produce any output, even though I set print\_level to 12. There is no output at all. I am a bit confused and don’t know how to debug this. Is the program running normally (even t…

Your build issue is constraints like this:

```Julia
for f in F
    if f == "NULL"
        continue
    end
    B = sum([decision_var[f, r, i, t, d] * matrix_1[r, i, t, d] * matrix_2[r, i, t, d, f] for (r, i, t, d) in product(R, I, T, D)])
    A = sum([decision_var[f, r, i, t, d] * matrix_1[r, i, t, d] * matrix_2[r, i, t, d, f] * matrix_3[r, i, t, d, f] for (r, i, t, d) in product(R, I, T, D)])
    C = sum([decision_var[f, r, i, t, d] * matrix_1[r, i, t, d] * matrix_2[r, i, t, d, f] * matrix_4[r, i, t, d, f] for (r, i, t, d) in product(R, I, T, D)])
    AB = A / B
    CB = C / B
    expr = AB * (1 - CB) - CB
    @constraint(model, P_lower[f] <= expr <= P_upper[f])
end

```

JuMP doesn’t (currently) exploit repeated subexpressions, so even though you have only 5103 variables, there are 14,885,451 terms in the Hessian. That’s a lot!

---

_[View the full topic](https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567)._
