After installing raspbian to the sd card it's time to plug in that SD card and fire up the Raspberry pi. If everything went well you should end up with a screen similar to mine:
![ncurses based interface that starts after boot that allows you to configure several Raspberry pi settings](./media/pi1-prev.jpg "raspi-config boot screen")
The first thing you should do is select the "Expand Filesystem" option, this will make sure the OS can access the entire SD card. After doing that you might want to change the user password (user = pi). The last thing you want to do is hidden in the "Advanced options", after going there you should see:
![ncurses based interface with the menu options of the 'expand filesystem' option](./media/pi2-prev.jpg "expand filesystem menu options")
In here, select the "A2 Hostname" option and rename it to something better. (I appended a 0, indicating this would be the master pi)
After doing all this hit finish, reboot the pi, and log back into the shell. (default user = pi pass= raspberry) The first thing we are going to do is update the pi, in case any updates have come out since the image was uploaded to raspbian.net. We can update the pi by running the following commands:
```bash
sudo apt-get update && sudo apt-get upgrade
```
After updating the pi we need to give the pi a static ip address (so we can find it later). We can do this by following a couple of steps:
After installing mpich3 we need to edit a file. Execute the following command:
```bash
sudo nano /home/pi/.profile
```
Scroll down all the way and add the following text:
```bash
PATH="$PATH:/home/rpimpi/mpich3-install/bin"
```
After adding that line hit ctrl + x and save your work. Then either restart the shell or reboot the pi.
After you have rebooted the pi you have to create a so-called "machine file", we will store this file in the folder "mpi_scripts" in our home directory. To do this execute the following commands:
The last command creates the machinefile and populates it with the ip of this (master) node automatically. With all of this setup we can do our first real test with the mpi commands, so try out the following command:
```bash
mpiexec -f machinefile -n 1 hostname
```
The -f is the filename parameter (so you would type the machinefile path behind that).
The -n is the number of nodes we want to use (we are working from 1 now). And finally "hostname" is the command.
if all went well you should now see the hostname of the raspberry pi (for me: raspberrypi0). After this we are done setting up the master (for now) and can begin copying the SD card. To shutdown the pi you can execute the following command: