# Error Handling JuMP and CPLEX

**URL:** <https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, cplex\
**Created:** [March 2, 2021, 8:17pm UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360 "2021-03-02T20:17:41Z")\
**Posts on this page:** 6\
**Page:** 2

<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:** [March 17, 2021, 1:06am UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/21 "2021-03-17T01:06:02Z")

</div>

This is a bug in CPLEX. It’s probably related to [https://github.com/jump-dev/CPLEX.jl/issues/357](https://github.com/jump-dev/CPLEX.jl/issues/357), which I have already reported to the CPLEX developers.

What’s your `versioninfo()`?

---

<div class="post-metadata">

**Author:** ![Paul\_McVay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_mcvay/32/4307_2.png) [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Post date:** [March 17, 2021, 3:23pm UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/22 "2021-03-17T15:23:10Z")

</div>

```julia
julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1* (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-10.0.1 (ORCJIT, broadwell)

```

---

<div class="post-metadata">

**Author:** ![Paul\_McVay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_mcvay/32/4307_2.png) [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Post date:** [March 18, 2021, 4:56am UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/23 "2021-03-18T04:56:23Z")

</div>

I’m not sure if this is helpful information or not, but if I get the output values after the error is thrown, `value.(all_variables(m))`, and compare them to the output values on my other computer that does not have the error, the values are only off by a small amount (average difference 4e-5, max difference 2e-3)

---

<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:** [March 18, 2021, 5:24am UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/24 "2021-03-18T05:24:30Z")

</div>

You should update to the latest CPLEX (20.1) and check if it has been fixed yet.

Or use OSQP ([https://github.com/oxfordcontrol/OSQP.jl](https://github.com/oxfordcontrol/OSQP.jl)).

If you have a commercial agreement with IBM, you should contact IBM support. Otherwise I don’t have an ETA for when you could expect it to be fixed.

---

<div class="post-metadata">

**Author:** ![Paul\_McVay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_mcvay/32/4307_2.png) [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Post date:** [March 24, 2021, 5:30pm UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/25 "2021-03-24T17:30:39Z")

</div>

Updating to CPLEX 20.1, julia 1.5.4 unfortunately did not fix the problem. Thank you for your help though. Could you briefly explain why you think it is still a CPLEX bug when it seems to be machine dependent (aka it works on your computer and one of mine, but not my other one)?

OSQP appears to work well for my problem set.

---

<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:** [March 25, 2021, 5:56pm UTC](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360/26 "2021-03-25T17:56:30Z")

</div>

It probably depends on the linear algebra library that CPLEX is using. Different machines can get different results on the same problem.

[Previous page](https://discourse.julialang.org/t/error-handling-jump-and-cplex/56360.md?page=1)
