# Julia Distributed, redundant iterations appearing

**URL:** <https://discourse.julialang.org/t/julia-distributed-redundant-iterations-appearing/57682>\
**Category:** New to Julia\
**Tags:** cluster, mpi, distributed\
**Created:** [March 22, 2021, 4:44am UTC](https://discourse.julialang.org/t/julia-distributed-redundant-iterations-appearing/57682 "2021-03-22T04:44:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [March 23, 2021, 4:34am UTC](https://discourse.julialang.org/t/julia-distributed-redundant-iterations-appearing/57682/3 "2021-03-23T04:34:03Z")

</div>

You shouldn’t be mixing `mpiexec` and `Distributed`. As you have written your script now, every node starts a `julia` process, and executes every element in your for loop serially. Instead (assuming that you want to use `Distributed`), you need to invoke your script like normal, and call `addprocs` to tell `julia` about other nodes.

`ClusterManagers.jl` might be useful:

> **[GitHub - JuliaParallel/ClusterManagers.jl](https://github.com/JuliaParallel/ClusterManagers.jl)**
>
> Contribute to JuliaParallel/ClusterManagers.jl development by creating an account on GitHub.

---

_[View the full topic](https://discourse.julialang.org/t/julia-distributed-redundant-iterations-appearing/57682)._
