|
|
@ -28,6 +28,7 @@ This is a quickstart guide of how you can typically use this *LabInstance to dep |
|
|
|
- The host file that contains addresses of connected workers can created with: |
|
|
|
|
|
|
|
> IP_ADDR=$(ip addr show | grep "inet " | grep "eth0" | awk '{print $2}') |
|
|
|
> |
|
|
|
> nmap -sP $IP_ADDR | grep ondemand_mpi_worker | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' > /project/hosts |
|
|
|
|
|
|
|
- Compile |
|
|
@ -38,13 +39,9 @@ This is a quickstart guide of how you can typically use this *LabInstance to dep |
|
|
|
|
|
|
|
sudo -u mpi mpirun -n 10 -f /project/hosts /project/mpi_hello_world |
|
|
|
|
|
|
|
<div class="panel panel-info"> |
|
|
|
**Note** |
|
|
|
{: .panel-heading} |
|
|
|
<div class="panel-body"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
**NOTE** |
|
|
|
|
|
|
|
```bash |
|
|
|
# scp hello wrold to all clients. sudo -u mpi for auto scp connect. see /home/mpi/.ssh |
|
|
@ -53,6 +50,5 @@ while read -r line; |
|
|
|
sudo -u mpi scp /project/mpi_hello_world mpi@$line:/project/mpi_hello_world |
|
|
|
done < /project/hosts |
|
|
|
``` |
|
|
|
--- |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|