Back
Close

Have fun with MPI in C

spagnuolocarmine
12.2K views
Previous: MPI Amazon AWS Cluster

Running on a local Docker environment

If you are looking for a simple environment to execute your MPI examples. The Docker platform is the best solution suits you.

Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating-system kernel and are thus more lightweight than virtual machines. Wikipedia

  • 🐳 Docker Ubuntu OpenMPI
  • 🆘 Usage of book Docker environment:
    • docker run -it --mount src="$(pwd)",target=/home,type=bind spagnuolocarmine/docker-mpi:latest, executes the docker container, which mounts the current path in the /home folder of the container.
    • However, in order to run the container (using the user root), you need to allow the execution of the mpirun command using the root user by adding the --allow-run-as-root option, for instance mpirun --allow-run-as-root -np 3 myprogram.out.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants