# Developing MPI code using VSCode

**URL:** <https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108>\
**Category:** General Usage\
**Tags:** mpi, vscode\
**Created:** [June 22, 2025, 12:52pm UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108 "2025-06-22T12:52:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salmon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salmon/32/22968_2.png) [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Post date:** [June 22, 2025, 12:52pm UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/1 "2025-06-22T12:52:49Z")

</div>

Hi everyone,

I want to parallelize some code on multiple nodes and am considering MPI.jl

One thing that feels a bit suboptimal, is that MPI seems quite incompatible with the interactive workflow. Ideally, I would like to keep my VS-code based workflow. But there seems to be no documented way to start a julia session with more than one worker (I assume this is likely not possible).

Since I haven’t found too much online, I want to ask you guys: What is your preferred way of developing MPI code.  
Do you do it the “old-fashioned” way, i.e. write a script, and the exectute that with `mpiexecjl -n ...` , or is there anything more convenient to skip repeated compilation?

I have also briefly considered Distributed.jl / Dagger.jl but I am less sure it is the right choice here, as it seems to be more designed to parallelizing pure functions…

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 22, 2025, 1:38pm UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/2 "2025-06-22T13:38:26Z")

</div>

> [@Salmon](#):
>
> Do you do it the “old-fashioned” way, i.e. write a script, and the exectute that with `mpiexecjl -n ...` ,

That is what I do. I haven’t found anything to substitute for this.

---

<div class="post-metadata">

**Author:** ![fabiangans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fabiangans/32/2624_2.png) [@fabiangans](https://discourse.julialang.org/u/fabiangans)\
**Post date:** [June 23, 2025, 8:37am UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/3 "2025-06-23T08:37:12Z")

</div>

> [@Salmon](#):
>
> I have also briefly considered [Distributed.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/Distributed) / [Dagger.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/Dagger) but I am less sure it is the right choice here, as it seems to be more designed to parallelizing pure functions…

I have no idea about your actual workflow, I am just interested in which feature/performance characteristic exactly you are missing from Distributed/Dagger.

---

<div class="post-metadata">

**Author:** ![Salmon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salmon/32/22968_2.png) [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Post date:** [June 23, 2025, 11:39am UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/4 "2025-06-23T11:39:34Z")

</div>

I am not at that stage yet where i am missing anything, but I felt a bit discouraged by this statement im the documentation:

> Normally, Dagger tasks should be functional and “pure”: never mutating their inputs, always producing identical outputs for a given set of inputs, and never producing side effects which might affect future program behavior. However, for certain codes, this restriction ends up costing the user performance and engineering time to work around.

> **[Data Management · Dagger.jl](https://juliaparallel.org/Dagger.jl/stable/data-management/#Mutation)**
>
> Documentation for Dagger.jl.

I suppose the solution to it is written below, but the text makes it look like it is more a workaround. But maybe i am interpreting it too pessimistically:D

---

<div class="post-metadata">

**Author:** ![Devansh1106](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devansh1106/32/207983_2.png) [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Post date:** [December 23, 2025, 9:32am UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/5 "2025-12-23T09:32:24Z")

</div>

Hi @Salmon,  
I wanted to ask you if you have found any other better way to avoid compilation of the code again and again while using MPI with Julia?

---

<div class="post-metadata">

**Author:** ![Salmon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salmon/32/22968_2.png) [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Post date:** [December 24, 2025, 1:13am UTC](https://discourse.julialang.org/t/developing-mpi-code-using-vscode/130108/6 "2025-12-24T01:13:02Z")

</div>

no unfortunately not ☹
