You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
1.3 KiB

4 years ago
# hybri-mpi !
Instances of Ubuntu Linux with [MPICH](https://www.mpich.org) -- portable implementation of Message Passing Interface (MPI) standard. Designed for MPI program development and deployment.
## LabInstance mpi2
![alt text](images/swarmlab-network.png "")
## Quickstart
This is a quickstart guide of howto use this *LabInstance to deploy MPI programs*
### HowTo use it
### Default Configuration
- Working Directory
> /project
- Default user
> docker
- Default password
> docker
- Default password4root
> pass
#### Find lab workers
> ifconfig
>
> nmap -sP 172.130.0.0/24
>
#### connect to workers
```bash
ssh docker@[IP]
```
4 years ago
#### Create hosts file
```bash
```
4 years ago
#### Compile
4 years ago
> mpicc -o /project/mpi_hello_world examples/mpi_hello_world.c
4 years ago
#### run the MPI hello world program
> mpirun -n 10 -f /home/ubuntu/hosts /home/ubuntu/mpi_hello_world
---
**NOTE:** copy hello world to all clients
```bash
# scp hello wrold to all clients. sudo -u mpi for auto scp connect. see /home/mpi/.ssh
while read -r line;
do
4 years ago
scp /project/mpi_hello_world ubuntu@$line:/project/mpi_hello_world
done < /project/hosts
4 years ago
```
---
---
**MORE INFO**
See examples directory
```bash
cd examples
make mpi_hello_world
make example ex=squares
...
```
---
4 years ago