Browse Source

info

master
test2 5 years ago
parent
commit
4d2639a2a5
  1. 63
      README.md

63
README.md

@ -1,4 +1,4 @@
# mpi & Open JDK !
# 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.
@ -9,8 +9,18 @@ Instances of Ubuntu Linux with [MPICH](https://www.mpich.org) -- portable implem
> ### NOTE
>
> Vlabs are reset every night around 02:00!
>
>> If you would like to keep your work please refer to "publish".
>
> Vlabs dont have firewall restrictions BUT the machines are not exposed to the internet.
>
> You share all machines so please be cooperative and discrete.
>
[inspired by NLKNguyen](https://github.com/NLKNguyen/alpine-mpich)
## Quickstart
@ -20,9 +30,9 @@ This is a quickstart guide of howto use this *LabInstance to deploy MPI programs
### HowTo use it
- cd /ubuntu
- cd /home/ubuntu
> git clone https://git.swarmlab.io:3000/swarmlab/examples-mpi2.git
> git clone https://git.swarmlab.io:3000/labs/examples-mpi2.git
- cd examples-mpi2/examples
@ -35,38 +45,38 @@ This is a quickstart guide of howto use this *LabInstance to deploy MPI programs
- Working Directory
> /ubuntu
> /home/ubuntu
- Default user
> ubuntu
- Buid-in Web Server
---
**INFO**
#### Find lab workers
Usage:
The host file that contains addresses of connected workers can be created with:
> touch /var/www/html/[name]/file
>
> swarmlab-getworkers > /home/ubuntu/invhosts
>
---
#### connect to workers
```bash
ssh ubuntu@[IP]
Info: user has sudo privileges without a password
```
- 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
> mpicc -o /home/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
> sudo -u mpi mpirun -n 10 -f /home/ubuntu/hosts /home/ubuntu/mpi_hello_world
---
@ -76,12 +86,25 @@ Usage:
# 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
sudo -u mpi scp /home/ubuntu/mpi_hello_world ubuntu@$line:/home/ubuntu/mpi_hello_world
done < /home/ubuntu/hosts
```
---
#### Publish Your Work
```bash
mkdir /home/ubuntu/directory
put your files and other directories into /home/ubuntu/directory
swarmlab-publish /home/ubuntu/directory
open URL in Browser
```
---
**MORE INFO**

Loading…
Cancel
Save