6 Common Errors While Building a Raspberry Pi supercomputer

Though the Internet is a vast resource for getting a Raspberry pi supercomputer up and running, there is no full set of errors that you can refer to when you’re stuck. Many times it happens that the same error on two different clusters can have two totally different meanings, making it even more difficult to solve problems. The issues that come with building these clusters are increasingly relevant as their popularity increases in all parts of the world.

Raspberry Pi supercomputer can be called as computing clusters. It can be used for building and running many cool applications like desk automation Raspberry Pi: Make a Bench automation computer or document summarization, etc. Bobo Cloud, for example, is an open-source cloud service for students built on Raspberry Pis.

As these types clusters become more common, there will be an increasing need for documentation and other resources. This post intends to be a resource for troubleshooting problems. It describes five common types of errors that beginners in this field of Raspberry Pi may encounter and their possible solutions.

1. Power Issues

Errors:

  • First boot password change is not allowed or password change on first boot hangs the Pi each time.
  • Any time the Raspberry Pi is fired up, only two of its ports work. For example, only the two USB ports might work and the HDMI port connecting to a terminal and the ethernet port don’t. Or, the  HDMI and one USB work, disabling the rest of the ports on the device.
  • Midway into operating, the Raspberry Pi restarts and continues to restart repeatedly at irregular intervals.
  • All ports work fine but the Pi stops responding to key presses.

Problem and solution:

These problems are caused by lack of power to the Pi. Raspberry Pi is designed to run on low power but when the power supply goes much lower than required, it works but does not perform at its full capacity.

An ideal power supply for Raspberry Pi model B is 5v, 2A . You have to make sure that all the nodes in the Raspberry Pi supercomputer gets this much of power supply. Though most of the mobile adapters are used to power the Pi, most of the times it has much lesser power rating which leads to the above problems.

Also, if the adapter is built to send the power through a micro USB cord, low-quality adapters cause loss during power transmission so that the full 5V is not delivered.

You might be able to use a workaround for some of the above errors, like for detecting the key presses of a keyboard by changing the configuration of the speed of USB transfers, but doing so merely delays the onset of the other errors. Instead, get a good quality adapter to fix these errors.

2. Overlapping MPI Problems

Errors:

  • mpiexec crash
  • ssh error: error passing parameters

Problem and solution:

When you are building the raspberry pi supercomputer, there is a good chance you are using MPI libraries and there are some errors that might occur with regard to that.These errors occur generally due to the overlapping of multiple MPI distributions. The most commonly used and ideal distributions are OpenMPI and MPICH. Linux generally uses MPICH.

When you install packages directly to the system with one of the MPI distributions, overlapping occurs leading to the corruption of mpiexec and behaviour of mpicc. For example, direct installation of Python packages to run with MPI or multiple installations of the same MPI distribution (shared and unshared) leads to clashing. This happens because direct installation sometimes doesn’t check the full compatibility. It just checks for the dependencies and if that check is passed, the packages get downloaded and installed. Unknowingly these packages might install the MPI distribution, even if you’ve already installed an MPI distribution. It might also change the system path for MPI. This can corrupt the entire MPI installation.

The solution is to build each package manually. Installation guides specific to each
MPI distribution is typically available.  If they aren’t or if a manual build is not possible, make sure you have a restore point created before the installation so that any corruption can be backtracked

3. Hostname Issues

Errors:

  • hostname not resolved
  • $pi@(none):

Problem and solution:

While I was building the raspberry pi supercomputer, I found this error to be the most confusing to me. Why? Because a node wouldn’t know its hostname and it would give this error but would perform the task given to it 60 percent of the time. This occurs only if the hostname is changed from its default to something the user would want so that he/she can differentiate between the nodes.

The “hostname not resolved” error can be cleared by changing the hostnames in two places:

  • sudo nano /etc/hostname
  • sudo nano /etc/hosts

Run the above commands, each of which opens a file. In that file, change the default

hostname to the hostname that is required.

Finally, The  pi@(none) or (none) hostname errors occur when the hostname given has
the ‘-’ (hyphen symbol)  or any other symbol. The solution is to edit both the files mentioned above and replace the illegal symbol for the hostname with an
‘_’   (underscore symbol).        

Below are two images of  file /etc/hosts before and after changing  hostname from
“akshay” to “akshay_001.”

 

Rpi1

Rpi2
    

Finally, the same has to be done for the other file. Save and reboot for the changes to be applied successfully.

4. HDMI Port Problems

Errors:

  • insufficient ports for connecting a display terminal
  • choosing the right display

Problem and solution:

More than any error this is a difficulty which many beginners might face. It happens
when you don’t have an HDMI port on a terminal/monitor or when you want to connect a different display to the Raspberry Pi.

So, the solution lies in the availability of materials. Consequently, the options for connecting to the display are:

  • You can make use of a display with an HDMI port.
  • An HDMI to VGA converter to connect it to the display.
  • How about using an Ethernet cable to connect to a laptop’s display (this is recommended if you don’t need the Ethernet port for a LAN connection).
  • Use any computer or laptop’s display wirelessly using SSH. When SSH has been configured on both laptop and the Raspberry Pi supercomputer, then it can be connected remotely, which means none of the ports on the device will be required.

5. Repeat Login Problems

Errors:

  • Connection to another node through SSH fails.
  • Login credentials required for each remote login to other nodes.
  • Error: RSA key not safe.
  • Warning: unprotected private key file.

Problem and solution:

The main aim for using SSH is what many computer experts call “secure gateway without login.” What this means is that you have to provide the login credential only for the first time you log into the other node.  If you are asked to input credentials each time you log into a node, it means something is wrong. In fact, it’s a disaster if the raspberry pi supercomputer has around 64 nodes and login is needed for each of them. This error generally occurs when the file containing the private key is copied to another location or its access permission has been tampered with.

Another possible reason is that the hostname is not correctly configured, in which case SSH is not sure whether that node exists in its network or not. This leads the SSH to believe that the default setting no longer exists and concludes that the network is not safe and secure. Hence, these errors.

I fixed these errors by changing the access permissions to only read and execute by the owner and no permissions to the group or  to others. If the hostnames are not configured properly, use the solution given for Hostname Issues above.

6. Shared Libraries Problem on the raspberry pi supercomputer:

Errors:

  •  Build failed : mpicc not found.
  • –enable-shared option not recognised.

Problem and solution:

We had experienced these errors because of two reasons. Firstly, we had already built mpich2 without shared libraries. And then tried to build a shared version parallel to it. Now, theoretically, it shouldn’t be a problem and many papers published with regard to this suggest that it is possible to build  mpich2  with shared libraries parallel to the version without shared libraries.  But turns out that, with the newer versions of mpich it doesn’t work.

For some users, only the –enable-shared option might not be recognised. This is because the build script is not able to locate the path of mpicc or some other dependencies.

The solution is to build only the mpich with the shared library.  And it’s advisable to build it in the /usr/local directory of the Raspbian OS. So this removes any ambiguity in PATH information and leads to a successful build. It is important to know that having shared library is only important when there is a need for a dynamic library(.so) and not a static library(.a) . So if there any need to load libraries at runtime, mpich should be configured with shared libraries.

Remember, building  a raspberry pi supercomputer isn’t that easy when you have a lot of nodes, but definitely possible if you are determined. If you found this article to be useful and interesting, then do share it with your friends on facebook, google plus, twitter and more… and comment below to share your thoughts!

akshay pai

I am a data science engineer and I love working on machine learning problems. I have experience in computer vision, OCR and NLP. I love writing and sharing my knowledge with others. This is why I created Source Dexter. Here I write about Python, Machine Learning, and Raspberry Pi the most. I also write about technology in general, books and topics related to science. I am also a freelance writer with over 3 years of writing high-quality, SEO optimized content for the web. I have written for startups, websites, and universities all across the globe. Get in Touch! We can discuss more.

4 thoughts on “6 Common Errors While Building a Raspberry Pi supercomputer

Leave a Reply

%d bloggers like this: