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.

90 lines
1.4 KiB

4 years ago
# mpi & Open JDK !
4 years ago
4 years ago
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 "")
[inspired by NLKNguyen](https://github.com/NLKNguyen/alpine-mpich)
## Quickstart
This is a quickstart guide of howto use this *LabInstance to deploy MPI programs*
### HowTo use it
4 years ago
- cd /ubuntu
4 years ago
4 years ago
> git clone https://git.swarmlab.io:3000/swarmlab/examples-mpi2.git
4 years ago
4 years ago
- cd examples-mpi2/examples
> make all
4 years ago
### Default Configuration
- Working Directory
> /ubuntu
4 years ago
- Default user
4 years ago
> ubuntu
- Buid-in Web Server
---
**INFO**
Usage:
> touch /var/www/html/[name]/file
---
- The host file that contains addresses of connected workers can be created with:
>
> get_hosts > /ubuntu/hosts
>
- Compile
> mpicc -o /ubuntu/mpi_hello_world examples/mpi_hello_world.c
- run the MPI hello world program
> sudo -u mpi mpirun -n 10 -f /ubuntu/hosts /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
sudo -u mpi scp /ubuntu/mpi_hello_world ubuntu@$line:/ubuntu/mpi_hello_world
done < /ubuntu/hosts
```
---
---
**MORE INFO**
See swarmlab and examples directory
---