# Pardiso linear solver with Ipopt

**URL:** <https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417>\
**Category:** Optimization (Mathematical)\
**Created:** [October 12, 2017, 10:51pm UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417 "2017-10-12T22:51:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackDevine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackdevine/32/1048_2.png) [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Post date:** [October 12, 2017, 10:51pm UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/1 "2017-10-12T22:51:51Z")

</div>

I have installed Pardiso 5.0 and I have gotten it to work with [Pardiso.jl](https://github.com/JuliaSparse/Pardiso.jl) by following the instructions in the README. When I try getting Ipopt.jl to work with PARDISO by following the steps in this issue, I run into problems

[https://github.com/JuliaOpt/Ipopt.jl/issues/83](https://github.com/JuliaOpt/Ipopt.jl/issues/83)

I put my `libpardiso.so` into `julia/lib`, ran `Pkg.build("Ipopt")` and then tried solving a model with `Model(solver=IpoptSolver(linear_solver="pardiso"))`. Upon doing so, I get the following error:

```julia
Exception of type: OPTION_INVALID in file "IpAlgBuilder.cpp" at line 416:
 Exception message: Selected linear solver Pardiso not available.
Tried to obtain Pardiso from shared library "libpardiso.so", but the following error occured:
/home/devja964/julia/bin/../lib/libpardiso.so: undefined symbol: _gfortran_concat_string

EXIT: Invalid option encountered.
WARNING: Ipopt finished with status Invalid_Option
WARNING: Not solved to optimality, status: Error
  3.952053 seconds (3.86 M allocations: 205.034 MiB, 1.98% gc time)
:Error

```

Some extra information that may be useful…

```julia
julia> versioninfo()
Julia Version 0.6.0
Commit 9036443 (2017-06-19 13:05 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Pkg.status("Ipopt")
 - Ipopt 0.2.6

```

**Update:**  
I managed to get things working on my laptop running OSX, so this seems to be a linux issue. If anyone has experience getting ipopt/pardiso playing together on linux, then I would love to hear of any tricks that you might have up your sleeve.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 13, 2017, 8:17am UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/2 "2017-10-13T08:17:32Z")

</div>

What happens if you do `Libdl.dlopen("libgfortran", Libdl.RTLD_GLOBAL)`?

---

<div class="post-metadata">

**Author:** ![JackDevine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackdevine/32/1048_2.png) [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Post date:** [October 13, 2017, 8:37am UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/3 "2017-10-13T08:37:25Z")

</div>

On my OSX machine (where things are working) I get:

```julia
julia> Libdl.dlopen("libgfortran", Libdl.RTLD_GLOBAL)
Ptr{Void} @0x00007feb6cd572c0

```

But I can’t test the linux machine until tomorrow morning (which is in about 12 hours from now in New Zealand), sorry.

I do have a seperate issue on my OSX machine related to Pardiso.jl. I noticed that the README says that support for macOS is experimental. I managed to get things working, but I had to change the location of some gfortran libraries. I assumed that the problem was not your fault and I wanted to do a little bit more research before I told you about it.

Basically, to get things working I had to move all of the files in the folder `/usr/local/gfortran/lib` to `/usr/local/lib`. Before I moved all of the files, I got the following error:

```julia
julia> Pkg.build("Pardiso")
INFO: Building Pardiso
found library but it failed to load due to:
could not load library "/Users/jackdevine/.julia/v0.6/Pardiso/deps/libpardiso500-MACOS-X86-64.dylib"
dlopen(/Users/jackdevine/.julia/v0.6/Pardiso/deps/libpardiso500-MACOS-X86-64.dylib, 9): Library not loaded: /usr/local/lib/libgomp.1.dylib
  Referenced from: /Users/jackdevine/.julia/v0.6/Pardiso/deps/libpardiso500-MACOS-X86-64.dylib
  Reason: image not foundfound library but it failed to load due to:
could not load library "libpardiso500-MACOS-X86-64.dylib"
dlopen(libpardiso500-MACOS-X86-64.dylib, 9): Library not loaded: /usr/local/lib/libgomp.1.dylib
  Referenced from: /Users/jackdevine/.julia/v0.6/Pardiso/deps/libpardiso500-MACOS-X86-64.dylib
  Reason: image not founddid not find libpardiso, assuming PARDISO 5.0 is not installed
found MKLROOT key, using it

```

---

<div class="post-metadata">

**Author:** ![JackDevine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackdevine/32/1048_2.png) [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Post date:** [October 14, 2017, 2:35am UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/4 "2017-10-14T02:35:40Z")

</div>

On my linux machine (where things are not working), I get:

```julia
julia> Libdl.dlopen("libgfortran", Libdl.RTLD_GLOBAL)
Ptr{Void} @0x000000000348dbd0

```

---

<div class="post-metadata">

**Author:** ![pedrohvbsilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrohvbsilva/32/12524_2.png) [@pedrohvbsilva](https://discourse.julialang.org/u/pedrohvbsilva)\
**Post date:** [March 28, 2019, 2:24pm UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/5 "2019-03-28T14:24:25Z")

</div>

Trying to use pardiso with Ipopt.jl with JuMP.jl as well, now with Julia 1.1.0 and JuMP v0.19, i can’t find the path to insert the libpardiso.dll.

Any sugestions?

---

<div class="post-metadata">

**Author:** ![JackDevine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackdevine/32/1048_2.png) [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Post date:** [March 28, 2019, 7:51pm UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/6 "2019-03-28T19:51:21Z")

</div>

I had a discussion here:

> <https://github.com/jump-dev/Ipopt.jl/issues/106>
>
> I am trying to build Ipopt with the pardiso solver by following the instructions… on the README. I used the exact same code as the README, except I changed the configure line to be:
> \`\`\`
> ./configure --with-pardiso="-qsmp=omp /lib/libpardiso500-GNU461-X86-64.so"
> \`\`\`
> This results in a big long message which ends with
> \`\`\`
> checking whether user-supplied Pardiso library "-qsmp=omp /lib/libpardiso500-GNU461-X86-64.so" works... configure: error: Pardiso library -qsmp=omp /lib/libpardiso500-GNU461-X86-64.so does not seem to work
> \`\`\`
> I have managed to get the library to work with Pardiso.jl, so it is not as though I downloaded a bad library/licence key.
> 
> I also opened a \[discourse thread\](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417) about this a while ago, but this issue is separate, because now I am trying to custom install the Pardiso solver. 
> 
> Not sure if this helps, but here is my Julia versioninfo:
> \`\`\`julia
> julia\> versioninfo()
> Julia Version 0.6.2
> Commit d386e40c17 (2017-12-13 18:08 UTC)
> Platform Info:
> OS: Linux (x86\_64-pc-linux-gnu)
> CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
> WORD\_SIZE: 64
> BLAS: libopenblas (USE64BITINT DYNAMIC\_ARCH NO\_AFFINITY Haswell)
> LAPACK: libopenblas64\_
> LIBM: libopenlibm
> LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
> \`\`\`
> 
> And my gfortran version:
> \`\`\`
> $ gfortran --version
> GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
> Copyright (C) 2015 Free Software Foundation, Inc.
> 
> GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute copies of GNU Fortran
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING
> \`\`\`
> 
> Any help would be greatly appreciated.

In the end I used the pardiso bundled with MKL and it worked. Try looking at the last comment of that thread.

Since that discussion I haven’t been using pardiso with ipopt very much, so I can’t comment on any recent changes of where libpardiso.dll goes, sorry.

---

<div class="post-metadata">

**Author:** ![pedrohvbsilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrohvbsilva/32/12524_2.png) [@pedrohvbsilva](https://discourse.julialang.org/u/pedrohvbsilva)\
**Post date:** [March 29, 2019, 2:52pm UTC](https://discourse.julialang.org/t/pardiso-linear-solver-with-ipopt/6417/7 "2019-03-29T14:52:27Z")

</div>

Thank you, i’ll check it!!
