Étape 4: Installation de MPICH
Toujours en utilisant uniquement l' un Pi comme le maître, il faut maintenant installer le logiciel principal qui va nous permettre d’utiliser la puissance de traitement de tous le Pi sur notre réseau. Ce logiciel s’appelle MPICH, qui est un Message Passing Interface. Voici ce que vous devez faire pour l’installer :
sudo apt-get update
mkdir mpich2
cd ~/mpich2
wget http://www.mpich.org/static/downloads/3.1/mpich-3.1.tar.gz
tar xfz mpich-3.1.tar.gz
sudo mkdir /home/rpimpi/
sudo mkdir /home/rpimpi/mpi-install
mkdir /home/pi/mpi-build
cd /home/pi/mpi-build
sudo apt-get install gfortran
sudo /home/pi/mpich2/mpich-3.1/configure -prefix=/home/rpimpi/mpi-install
sudo make
sudo make install
nano .bashrc
PATH=$PATH:/home/rpimpi/mpi-install/bin
sudo reboot
mpiexec -n 1 hostname
Ces commandes vont télécharger et installer MPICH, ainsi ajouter comme un chemin d’accès à votre fichier de démarrage BASHRC. La dernière commande effectue un test pour voir si cela fonctionne. Si la dernière commande retourne « Pi01 », alors vous avez tout fait correctement.