# Parallel starting from array of JuMP models

**URL:** <https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297>\
**Category:** Optimization (Mathematical)\
**Created:** [February 24, 2018, 4:52pm UTC](https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297 "2018-02-24T16:52:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbrunaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bbrunaud/32/1737_2.png) [@bbrunaud](https://discourse.julialang.org/u/bbrunaud)\
**Post date:** [February 24, 2018, 4:52pm UTC](https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297/1 "2018-02-24T16:52:10Z")

</div>

Hello,

I am writing an algorithm that receives an array of JuMP models that need to be solved in parallel. I’ve read the recommendations on this forum to just send the data to the worker to build and solve the model. However, If I don’t have access to the function or just received an array of models, what would be the correct process?. I must also mention that this solution is going to be iterative.

I am not sure on how to use the different tools. I believe that If I use pmap, the model will be moved to the worker at each iteration. Should I use @spawn or something like that?.

thanks!

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [February 24, 2018, 7:01pm UTC](https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297/2 "2018-02-24T19:01:19Z")

</div>

`@spawnat` and `remotecall` let you choose the worker that gets each model, so you could manually ensure it’s the same process each time via `mod1(idx in array,length(array))`.

Dagger may be worth a look:

> **[GitHub - JuliaParallel/Dagger.jl: A framework for out-of-core and parallel...](https://github.com/JuliaParallel/Dagger.jl)**
>
> A framework for out-of-core and parallel execution - GitHub - JuliaParallel/Dagger.jl: A framework for out-of-core and parallel execution
