# Ipopt with JuMP -- Restoration Failure Crashing Julia

**URL:** https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753
**Category:** Optimization (Mathematical)
**Created:** [July 8, 2020, 7:27pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753 "2020-07-08T19:27:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 8, 2020, 7:27pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/1 "2020-07-08T19:27:07Z")

</div>

I have some code calling Ipopt through JuMP. I’m in the testing phase and have a small and large-ish problem. Small problem runs without issue.

The large problem hits a Restoration Failure (ok, I can work to fix that). On Windows running Julia 1.4.2, Ipopt v0.6.2, and JuMP v0.21.2

> Restoration phase is called at point that is almost feasible,  
> with constraint violation 5.674943e-06. Abort.
> 
> Number of Iterations…: 411  
> The program finishes OK.

In Ubuntu julia 1.4.1, Ipopt v0.6.2, and JuMP v0.21.2, I get the same, plus a stack trace and Julia crashes.

> Restoration phase is called at point that is almost feasible,  
> with constraint violation 5.674943e-06. Abort.
> 
> signal (6): Aborted  
> in expression starting at /home/dompazz/files/Pacing/hierarchy/pcf\_pacing\_hier.jl:492  
> gsignal at /usr/bin/…/lib/x86\_64-linux-gnu/libc.so.6 (unknown line)  
> abort at /usr/bin/…/lib/x86\_64-linux-gnu/libc.so.6 (unknown line)  
> unknown function (ip: 0x7f32c2400675)  
> \_ZN5Ipopt22BacktrackingLineSearch24FindAcceptableTrialPointEv.cold.221 at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> \_ZN5Ipopt14IpoptAlgorithm8OptimizeEb at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> \_ZN5Ipopt16IpoptApplication13call\_optimizeEv at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> \_ZN5Ipopt16IpoptApplication11OptimizeNLPERKNS\_8SmartPtrINS\_3NLPEEERNS1\_INS\_16AlgorithmBuilderEEE at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> \_ZN5Ipopt16IpoptApplication11OptimizeNLPERKNS\_8SmartPtrINS\_3NLPEEE at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> \_ZN5Ipopt16IpoptApplication12OptimizeTNLPERKNS\_8SmartPtrINS\_4TNLPEEE at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> IpoptSolve at /home/dompazz/.julia/artifacts/6ab67e4ac077183345b1d6dec8ee7fd34b4e9fd7/lib/libipopt.so (unknown line)  
> solveProblem at /home/dompazz/.julia/packages/Ipopt/YJcu4/src/Ipopt.jl:361  
> …  
> unknown function (ip: (nil))  
> Allocations: 19822480084 (Pool: 19822426594; Big: 53490); GC: 8184
> 
> Julia has exited.

Julia was installed with `apt-install` on Ubuntu and 1.4.1 is the most recent version available. I can manually upgrade if that is the issue. I would prefer to develop on the Ubuntu machine as it has newer and more processors.

Is this a known issue with Julia 1.4.1 or something else?

---

<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 8, 2020, 7:44pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/2 "2020-07-08T19:44:25Z")

</div>

Do you have a reproducible example we can run to test?

---

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 8, 2020, 8:07pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/3 "2020-07-08T20:07:39Z")

</div>

Input data on the large problem is about 500M. I cannot reproduce on a small data set, I only see it on the larger problem.

---

<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 8, 2020, 8:15pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/4 "2020-07-08T20:15:24Z")

</div>

I don’t think we can be of much help then. Are you running out of memory or something?

---

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 8, 2020, 8:17pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/5 "2020-07-08T20:17:14Z")

</div>

Nope. In fact windows has less memory than the Ubuntu machine. This looks like a return code from the Ipopt library that is causing Julia to abort. Maybe this is better put as an issue in Ipopt.jl?

---

<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 8, 2020, 8:52pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/6 "2020-07-08T20:52:50Z")

</div>

A non-zero return code from Ipopt shouldn’t cause Julia to crash: [https://github.com/jump-dev/Ipopt.jl/blob/291436532375db9154aec6a562c3781f65ff4967/src/Ipopt.jl#L361-L362](https://github.com/jump-dev/Ipopt.jl/blob/291436532375db9154aec6a562c3781f65ff4967/src/Ipopt.jl#L361-L362)  
The fact that Windows is okay suggests it is not an Ipopt.jl issue.

It’s coming from here:  
[https://github.com/coin-or/Ipopt/blob/af96dbf5b2f90ded99937ae94df82a92cb63a78a/src/Algorithm/IpBacktrackingLineSearch.cpp#L584-L587](https://github.com/coin-or/Ipopt/blob/af96dbf5b2f90ded99937ae94df82a92cb63a78a/src/Algorithm/IpBacktrackingLineSearch.cpp#L584-L587)

---

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 8, 2020, 8:57pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/7 "2020-07-08T20:57:15Z")

</div>

> [@odow](#):
>
> A non-zero return code from Ipopt shouldn’t cause Julia to crash:

Agree that it shouldn’t, but can see empirically that it does.

I’m going to search around for an small example that produces this error from Ipopt. If you know of one, please let me know.

I will test it on both machines and see if that can reproduce the crash.

---

<div class="post-metadata">

### Author: ![joaquimg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaquimg/32/223_2.png) [@joaquimg](https://discourse.julialang.org/u/joaquimg)
#### Post date: [July 8, 2020, 10:56pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/8 "2020-07-08T22:56:27Z")

</div>

@odow suggested that the issue is probably not due to Ipopt.jl the wrapper, although it could be an error in Ipopt itself. From you stacktrace, it looks like a C error in libipopt.so .

---

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 8, 2020, 11:53pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/9 "2020-07-08T23:53:39Z")

</div>

I’ll be standing up a new Linux box tomorrow. I can see if that has the same problem. It could be an issue with the Windows vs Linux builds of Ipopt, true. The versions are the same.

---

<div class="post-metadata">

### Author: ![Dominic\_Pazzula](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dominic_pazzula/32/12783_2.png) [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)
#### Post date: [July 9, 2020, 3:13pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753/10 "2020-07-09T15:13:18Z")

</div>

Looks like this is either an issue with Julia 1.4.1 or the Unofficial package available through `apt` in Ubuntu.

Removed the Ubuntu package and installed the official 1.4.2 binary. Same error, but does not cause a crash in Julia.
