Openmpi containers for running distributed computing programs (for lab) in local pc
(Mostly) NITK students who want to work on distributing computed lab without access to the actual cluster.
- Linux PC
- Docker
- User in the
dockergroup
-
Build the image
docker build . -t openmpi -
Start the cluster
docker-compose up --scale head=1 --scale node=<n> -
View the running containers
docker container ls -
Login to head
docker container exec -it bash <name of head node> -
Current directory will be accesible in
/mntls /mnt -
Compile the example program
mpicc test.c -o test -
Execute it in current node
mpirun test -
Prepare a hosts list. From the output of
docker container lsecho <host name> >> host_list.txt -
Run your program on all hosts
mpirun --hostfile host_list.txt test -
Cleanup
docker-compose down
This repository is forked from https://github.com/oweidner/docker.openmpi