# Creating two processes on single node and communicating with MPI.jl

**URL:** <https://discourse.julialang.org/t/creating-two-processes-on-single-node-and-communicating-with-mpi-jl/66013>\
**Category:** New to Julia\
**Tags:** parallel\
**Created:** [August 8, 2021, 10:56am UTC](https://discourse.julialang.org/t/creating-two-processes-on-single-node-and-communicating-with-mpi-jl/66013 "2021-08-08T10:56:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ba2tripleO](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ba2tripleo/32/26517_2.png) [@ba2tripleO](https://discourse.julialang.org/u/ba2tripleO)\
**Post date:** [August 8, 2021, 10:56am UTC](https://discourse.julialang.org/t/creating-two-processes-on-single-node-and-communicating-with-mpi-jl/66013/1 "2021-08-08T10:56:21Z")

</div>

Hey there! I am new to julia and trying to get two processes to communicate on my laptop with MPI.jl can anyone help me get started. So far I’ve tried out this script:

 ![Screenshot (14)](https://global.discourse-cdn.com/julialang/original/3X/0/f/0f0eadd27e60979d1c7551e42b154b25d5696c2f.png)

which outputs:  
Hello world, I am rank 0 of 1  
Ultimately I wish to send/receive data between two processes with the help of mpi  
and generate the bandwidth vs message size plot

---

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [August 8, 2021, 11:05am UTC](https://discourse.julialang.org/t/creating-two-processes-on-single-node-and-communicating-with-mpi-jl/66013/2 "2021-08-08T11:05:14Z")

</div>

This is a good start, it means that MPI is working ok. Try running your script from the system prompt using `mpirun -np 2 julia scriptname.jl`

---

<div class="post-metadata">

**Author:** ![ba2tripleO](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ba2tripleo/32/26517_2.png) [@ba2tripleO](https://discourse.julialang.org/u/ba2tripleO)\
**Post date:** [August 8, 2021, 12:00pm UTC](https://discourse.julialang.org/t/creating-two-processes-on-single-node-and-communicating-with-mpi-jl/66013/3 "2021-08-08T12:00:37Z")

</div>

Thanks for the suggestion, although the exact command didn’t work, but this led me to try out this command I found in the mpi.jl documentation.

![Screenshot (15)](https://global.discourse-cdn.com/julialang/original/3X/8/9/896bee37f416d5c9107f3f0df359a4931a4a4b61.png)

Strangely mpirun is not getting recognized by my system, but mpiexec happens to work 🙂
