Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

OpenMPI NFS Raspberry Pi

Dylan Christopherson edited this page Aug 3, 2018 · 13 revisions

Download the tarball into the shared folder (How to do that here: https://github.com/dylanchristopherson/aws-pmix-scale-testing/wiki/OpenMPI-Raspberry-Pi). Then:

cd /opt/nfsshare
mkdir build         //I gave the same permissions to build as nfsshare had. Check using ls -al

./configure --prefix=/opt/nfsshare/build --enable-static --enable-orterun-prefix-by-default  

The --prefix stores the files in the build folder. The path (in this example /opt/nfsshare/build) can be to where ever you'd like. The default path is /usr/local/bin I believe. --enable-static allows for static building. And --enable-orterun-prefix-by-default is supposed to set the path for the client so it could execute the mpirun/orterun commands. However, it did not work for me.

PATH

To check if the path is set correctly (on either the server or client):

which mpirun          //Or which orterun

If a line comes up saying something along the lines of not found:

cd /opt/nfsshare/build/bin           //mpirun and orterun folders should be in here
PATH=$PATH:/opt/nfsshare/build/bin
export PATH

Now try

which mpirun       //Or which orterun

To make things easier:

cd ~
vim .bashrc
export PATH=$PATH:/path/to/bin                        //Add to end of file
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/bin  //Add to end of file and save

source .bashrc
which mpirun          //Should be good to go now

And a path to those commands should pop up. If it doesn't, find the directory the mpirun and orterun directories are held in and set the path to there.

There is another path called LD_LIBRARY_PATH, do the same step for it that you did to PATH and make sure it points to the openmpi and orterun directories.

To run the server as a master node and the other as a slave node, we need to find the openmpi-default-hostfile on the server.

cd /opt/nfsshare/build/etc/openmpi-default-hostfile
sudo vim openmpi-default-hostfile

To the bottom of this file, just add the hostname of your client or the IP address.

To check if the configuration is working, create a file as follows (I called mine runsOn.sh)

vim runsOn.sh

Testing

Testing is quite simple

mpirun -np 3 echo $HOSTNAME
Clone this wiki locally