# Problem with running Ipopt with Pardiso on jupyter notebook

**URL:** https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424
**Category:** Optimization (Mathematical)
**Tags:** jump, ipopt
**Created:** [January 29, 2022, 4:58pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424 "2022-01-29T16:58:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [January 29, 2022, 4:58pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424/1 "2022-01-29T16:58:52Z")

</div>

Dear all,

I am trying to solve an optimization problem from jupyter notebook using `JuMP` with solver `Ipopt` (`Pardiso` linear solver). I can solve the problem without any problem when the code is in a `filename.jl` file and I run it using `include("filename.jl")` method. However, when I am trying to run the same code line by line from the jupyter notebook, I get the following errors:

1. While running the codeblock:

```julia
Libdl.dlopen("/usr/lib/x86_64-linux-gnu/libomp.so.5", RTLD_GLOBAL)

```

(_the path name is correct, it does contain the file and so on_)

I get the error:

```julia
LoadError: could not load library "/usr/lib/x86_64-linux-gnu/libomp.so.5"
/usr/lib/x86_64-linux-gnu/libomp.so.5/libomp.so.5: cannot open shared object file: No such file or directory

```

1. While running the codeblock

```julia
set_optimizer_attribute(model, "linear_solver", "pardiso")

```

I get the error:

```julia
Exception of type: DYNAMIC_LIBRARY_FAILURE in file "Common/IpLibraryLoader.cpp" at line 67:
 Exception message: libpardiso.so: cannot open shared object file: No such file or directory

```

I am not sure what is going on. Any tips/suggestion will be much appreciated.

---

<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: [January 30, 2022, 9:55pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424/2 "2022-01-30T21:55:46Z")

</div>

> I can solve the problem without any problem when the code is in a `filename.jl` file and I run it using `include("filename.jl")` method

I’m not sure then. It’s likely that Jupyter is messing with your load path. This seems more like a Jupyter question than one specific to Ipopt.

---

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [January 30, 2022, 10:16pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424/3 "2022-01-30T22:16:03Z")

</div>

Yes, I think so too as well. I was trying to run this on `MIT Supercloud`’s jupyter environment and found that it does not have the same environment variables as their terminal system. I have asked the people in charge of `MIT Supercloud` to help with this. I am closing this issue, thanks @odow !

---

<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: [January 31, 2022, 2:10am UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424/4 "2022-01-31T02:10:08Z")

</div>

Okay, yeah if this is on MIT’s cloud environment any number of things could be set up differently.

If you can’t figure out the problem, you should be able to compile a new version of Ipopt with Pardiso included, and then use an override:  
[https://jump.dev/JuMP.jl/stable/developers/custom\_solver\_binaries/](https://jump.dev/JuMP.jl/stable/developers/custom_solver_binaries/)

---

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [January 31, 2022, 10:54pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424/5 "2022-01-31T22:54:25Z")

</div>

Thanks @odow ! Sounds good, the supercloud admins have given me some tips, let me try to implement those and see if I can make it work. If not, I will try to compile a new version of Ipopt as you suggested.
