# Multi-core parallel support for JuMP supported solvers?

**URL:** <https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump, parallel, nonlinear\
**Created:** [April 2, 2024, 12:24am UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392 "2024-04-02T00:24:09Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![charshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charshaw/32/10361_2.png) [@charshaw](https://discourse.julialang.org/u/charshaw)\
**Post date:** [April 16, 2024, 2:20pm UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/21 "2024-04-16T14:20:30Z")

</div>

Okay, I’m reporting back here: we got about 1.4x speed up on the HPC using this multi-threaded SCS. I appreciate the help!

Looking forward to hearing about how to use the new distributed capabilities when you get the chance!

---

<div class="post-metadata">

**Author:** ![abulak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abulak/32/28314_2.png) [@abulak](https://discourse.julialang.org/u/abulak)\
**Post date:** [April 18, 2024, 8:03am UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/22 "2024-04-18T08:03:01Z")

</div>

@charshaw SCS is not a **distributed** solver. As indicated above there are only two places where it can benefit from **multithreading** (openmp) and the speedup will be very much problem dependent.

You’re probably thinking of MPI-enabled solver, but this is not what SCS supports. Maybe @odow knows if any solver wrapped in MOI can use MPI?

---

<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:** [April 18, 2024, 8:11am UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/23 "2024-04-18T08:11:03Z")

</div>

> Maybe @odow knows if any solver wrapped in MOI can use MPI?

Nope. Again, trying to solve this on some sort of HPC is the wrong approach. You can scale to a few cores of a laptop or workstation.

---

<div class="post-metadata">

**Author:** ![abulak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abulak/32/28314_2.png) [@abulak](https://discourse.julialang.org/u/abulak)\
**Post date:** [April 18, 2024, 8:53am UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/24 "2024-04-18T08:53:56Z")

</div>

I concur 😉 the only benefits of my remote workstation over my laptop are that I don’t hear it 😃 and I can run a problem and disconnect/close my laptop/etc and still get a solution in a few hours.

Tbh since I got a laptop with modern Ryzen the workstation is noticeably slower 😉

@charshaw I wanted to ask this earlier: are the sd problems really that random, or do they have some internal structure? In such cases you’re always better using sparsity (chordal decomposition) and/or symmetry (Wedderburn + orbit decomposition) than throwing more computational resources on the problem.

---

<div class="post-metadata">

**Author:** ![charshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charshaw/32/10361_2.png) [@charshaw](https://discourse.julialang.org/u/charshaw)\
**Post date:** [April 30, 2024, 5:35pm UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/25 "2024-04-30T17:35:30Z")

</div>

Thanks again for your help @odow and @abulak ! I really appreciate it. It’s brought down the run time to less than 24 hours, which is very helpful for our cluster scheduler.

I’ve accepted @abulak 's answer for using multi-threading, because I think it addresses what I was getting at!

---

<div class="post-metadata">

**Author:** ![charshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charshaw/32/10361_2.png) [@charshaw](https://discourse.julialang.org/u/charshaw)\
**Post date:** [April 30, 2024, 5:43pm UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/26 "2024-04-30T17:43:12Z")

</div>

You’re exactly right - the SDPs are not this random. The constraints (i.e. the elements of \Omega in my earlier post above) are _usually_ corresponding to edges in of a graph with low degree.

I agree that more sophisticated decompositions (i.e. chordal decompositions) would be very useful to try here. But, I don’t understand them well enough to implement at the moment. We’ve also found that the solutions are always low-rank (much lower rank than (# of constraints)^2) so that’s worth possibly exploiting too.

Nevertheless, I think we’re going to stop trying to optimize the runtime for a while, because we have it down low enough to finish our simulations. If the statistical method we are proposing takes off in the future, it’d be worth re-visiting this and writing a specific solver for the underlying SDPs in our case.

Thanks again for being so generous with your time 🙂

---

<div class="post-metadata">

**Author:** ![abulak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abulak/32/28314_2.png) [@abulak](https://discourse.julialang.org/u/abulak)\
**Post date:** [May 8, 2024, 9:38am UTC](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/27 "2024-05-08T09:38:02Z")

</div>

try COSMO.jl, it implements chordal decomposition and does it on its own.

For low rank (i.e. really low) You might have some luck with SDPLR.jl, or ProxSDP.jl.

[Previous page](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392.md?page=1)
