# Linking solver binaries with models (JuMP)

**URL:** https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453
**Category:** Optimization (Mathematical)
**Tags:** jump, juliapro
**Created:** [January 18, 2018, 12:27pm UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453 "2018-01-18T12:27:08Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Curious1](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Curious1](https://discourse.julialang.org/u/Curious1)
#### Post date: [January 18, 2018, 12:27pm UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/1 "2018-01-18T12:27:08Z")

</div>

I have binaries of solvers in a particular directory of my linux systems. Now I want to solve my JuMP model using those binaries. How do I do that?

---

<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 21, 2018, 6:24am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/2 "2018-01-21T06:24:24Z")

</div>

To use a solver with JuMP the binary needs to be wrapped. Most of the common solvers have so you can just go

```julia
Pkg.add("Gurobi")
using Gurobi
m = Model(solver=GurobiSolver())

```

You can see a list of wrapped solvers in the table at the bottom of [http://www.juliaopt.org/](http://www.juliaopt.org/)

---

<div class="post-metadata">

### Author: ![Curious1](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Curious1](https://discourse.julialang.org/u/Curious1)
#### Post date: [January 23, 2018, 5:45am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/3 "2018-01-23T05:45:00Z")

</div>

Can this be done without the `Pkg.add()` command?

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [January 24, 2018, 9:19am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/4 "2018-01-24T09:19:39Z")

</div>

What is the solver you have in mind ?

---

<div class="post-metadata">

### Author: ![Curious1](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Curious1](https://discourse.julialang.org/u/Curious1)
#### Post date: [January 24, 2018, 9:27am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/5 "2018-01-24T09:27:11Z")

</div>

I am hoping to get a way to link all the optimisation solvers like Ipopt, Bonmin, Cbc, Clp, GLPK etc.

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [January 24, 2018, 11:30am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/6 "2018-01-24T11:30:54Z")

</div>

The available solvers are listed here: [http://www.juliaopt.org/](http://www.juliaopt.org/) As @odow says, you to use a solver in Julia, you need to install the corresponding package. By doing `Pkg.add("Gurobi")` for Gurobi, , `Pkg.add("Ipopt")` for Ipopt, …  
Then to use it with JuMP, you need to do

```julia
using Ipopt
using JuMP
m = Model(solver=IpoptSolver())

```

Why do you want to find a way that doesn’t use `Pkg.add()` ?

---

<div class="post-metadata">

### Author: ![Curious1](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Curious1](https://discourse.julialang.org/u/Curious1)
#### Post date: [January 24, 2018, 11:35am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/7 "2018-01-24T11:35:46Z")

</div>

Well, there are certain restrictions on me to use the `Pkg.add()` command. I cannot run the command.  
Also, does the `Pkg.build("Ipopt")` check for installed Ipopt solver? If thats the case then I can install the solver and then run the build after downloading the source code of Ipopt package.

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [January 24, 2018, 11:43am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453/8 "2018-01-24T11:43:57Z")

</div>

If you download `Ipopt.jl` manually, e.g. by clicking on “Clone or download zip” [here](https://github.com/JuliaOpt/Ipopt.jl). Then if it is on `/path/to/Ipopt`, you can do

```julia
julia> push!(LOAD_PATH, "/path/to")
julia> Pkg.build("Ipopt")
julia> using Ipopt

```
