MPI

This is the area where you will quide you to use labroom MPI

Default Configuration

mpi network
Figure 1. mpi network

Working Directory

/project

Default user

docker

Default password

docker

Default password4root

pass

Directory Map

You can find it in Hybrid: Instances  More  Connect  Directory Maps

Ports

You can find it in Hybrid: Instances  More  Ports

Logs

You can find it in Hybrid: Instances  More  Logs

Connect

Connect Info in Hybrid: Instances  More  Connect  Open a terminal and Run

Connect via SSH

ssh -p [port] docker@[IP] # [port] [IP] = info from Ports

Connect via exec

Open a terminal and Run:

docker exec -it -udocker hybrid-mpi_master_1 /bin/bash

Find lab workers

Commands inside container
ifconfig

nmap -sP 172.130.0.0/24 # eth0 ip

or

/project/bin/swarmlab-nmap

HelloWorld Example

Commands inside container

Create hosts file

/project/bin/swarmlab-nmap > /project/hosts

Compile

mpicc -o /project/mpi_hello_world examples/mpi_hello_world.c

run the HelloWorld

mpirun -n 10 -f /project/hosts /project/mpi_hello_world

copy files to all clients

while read -r line;
do
scp /project/file docker@$line:/some_dir/file
done < /project/hosts

MORE Examples

Commands inside container

See examples directory

cd examples
make mpi_hello_world
make example ex=squares
...

Video

Start MPI

Learn how to start MPI

Stop MPI

Learn how to stop MPI