Browse Source

info

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

61
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. 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 ## Quickstart
@ -20,9 +30,9 @@ This is a quickstart guide of howto use this *LabInstance to deploy MPI programs
### HowTo use it ### 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 - cd examples-mpi2/examples
@ -35,38 +45,38 @@ This is a quickstart guide of howto use this *LabInstance to deploy MPI programs
- Working Directory - Working Directory
> /ubuntu > /home/ubuntu
- Default user - Default user
> ubuntu > ubuntu
- Buid-in Web Server
--- #### Find lab workers
**INFO**
The host file that contains addresses of connected workers can be created with:
Usage: >
> swarmlab-getworkers > /home/ubuntu/invhosts
>
> touch /var/www/html/[name]/file
--- #### 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 - 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 - 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 # scp hello wrold to all clients. sudo -u mpi for auto scp connect. see /home/mpi/.ssh
while read -r line; while read -r line;
do do
sudo -u mpi scp /ubuntu/mpi_hello_world ubuntu@$line:/ubuntu/mpi_hello_world sudo -u mpi scp /home/ubuntu/mpi_hello_world ubuntu@$line:/home/ubuntu/mpi_hello_world
done < /ubuntu/hosts 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** **MORE INFO**

Loading…
Cancel
Save