-
Notifications
You must be signed in to change notification settings - Fork 4
OpenMPI Raspberry Pi
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.
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'
________________________________________________________________________________________________
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 --enable-static
sudo make install
sudo yum install zlib-static
sudo yum install glibc-static
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)