-
Notifications
You must be signed in to change notification settings - Fork 4
OpenMPI Raspberry Pi
Option 1
Downloading OpenMPI and getting it up and running on a Raspberry Pi
This was done using CentOS on the RPi. You'll need some type of internet connection.
sudo yum install wget
wget "Link of what you want to download"
I used this link: https://www.open-mpi.org/nightly/master/ . Hover your mouse over the tarball at the top with the extension .gz.tar and in the bottom left hand corner you'll see a full link for this download. Put it in quotes in front of wget.
Option 2
If this doesn't work. Another option is to download the tarball onto your computer and then use fileZilla or some other file transfer protocol to connect to the Pi and then just drag and drop it.
mv /home/tarballName /home/whatEverDirectoryYouWish (It might not be necessary to move this file)
gunzip openmpi-master-X-Y.tar.gz
tar -xvf openmpi-master-X-Y.tar
If you have to change the date on the Pi:
timedatectl set-time 'YYYY-MM-DD HH:MM:SS'
In the next steps, you might have trouble. In this link, check out the section on paths as your paths need to be set right so your machine knows where to look for commands. This will be done after configure and make install.
Option 3
git clone https://github.com/open-mpi/ompi
./autogen.pl
To enable dynamic linking and run tests: Both of these commands might take some time
./configure
sudo make install
sudo yum install {Packages}
Attempt to install all these packages: gcc, libtool automake autoconf, open-ssl, openssl, openssl-devel, gcc-g++, gcc-c++, gcc-fortran, man, gdb
cd intoTheTarballFolder
cd examples
mpicc hello_c.c -o hello_c
./hello_c
ldd ./hello_c
which mpirun
mpirun -np 3 {optionalCommands} ./hello_c
optionalCommands: --display-map, --oversubscribe (Allows you to add more jobs than there are cores)
To enable static linking and run tests: Both of these commands might take some time
./configure --prefix=/directory/to/place/folder/build --enable-static --enable-orterun-prefix-by-default
The --prefix command allows you to put the build where you want. If you then cd into the folder /directory/to/place/folder/build, inside you'll be able to cd into /bin and you'll be able to see where all of the MPI commands are.
sudo make install
sudo yum install zlib-static
sudo yum install glibc-static
sudo yum install {Packages}
Attempt to install all these packages: gcc, libtool automake autoconf, open-ssl, openssl, openssl-devel, gcc-g++, gcc-c++, gcc-fortran, man, gdb
cd intoTheTarballFolder
cd examples
mpicc -static hello_c.c -o hello_c
./hello_c
ldd ./hello_c
which mpirun
mpirun -np 3 {optionalCommands} ./hello_c
optionalCommands: --display-map, --oversubscribe (Allows you to add more jobs than there are cores)