Saturday, April 11, 2020

11th of April

Marks Rpi Cluster currently consists of:
2 x Pi4 model B (4GB)
2 x Pi4 model B (2GB)
14 x Pi3 model B+
6 x Pi3 model B

The two Pi4 4GB are concentrating on Rosetta work. The two Pi4 2GB are support nodes. The Pi3's are concentrating on Einstein work.


Cooling
The two Pi4 4GB models were using Pimorni fan shims for cooling but another one seized up today. I had to use a Noctua 40MM fan in its place. The Pimoroni fans only seem to last about 3 to 4 months of constant running. I have already replaced one under warranty.


Power
I purchased a number of Mean Well power supplies to run the Pi4's. I will be replacing the Pi3's with Pi4's. This power supply is the LRS-75-5 model which provides 5 volts at 14 amps which should be more than enough to run 4 x Pi4 nodes.
As you can see they are a bare-bones power supply with no wiring. I will probably have the cases 3D printed as there is nothing available that would suit them.


Rosetta tips
If you want to help with Covid-19 research and are familiar with BOINC and have a Pi4 I would encourage you to run the Rosetta@home project. See my previous blog post on how to get Raspbian into aarch64 mode and BOINC requesting aarch64 work.

Tasks need up to 1.3GB of memory (it depends on the work unit) so a Pi4 2GB could run one and a Pi4 4GB could run 3 at a time. Unfortunately the Pi3's and Pi4 1GB don't have enough memory.

The tasks have a 3 day deadline, so run a small cache setting. The project recommend 1 day, however I run mine with 0.3 days. Tasks have a fixed run time which defaults to 8 hours.

Each running task can use up to 2GB of disk space, so use a 8GB micro SD card or larger. I'm using 16GB micro SD cards. Change the BOINC setting to allow up to 6GB of disk space to be used.

To reduce the writes to the micro SD card I recommend setting the BOINC checkpoint interval to 300 or 600 seconds. Mine are set to 600 seconds

Friday, April 3, 2020

Do something useful with your Pi4

You can now run Rosetta@home on the Pi4. They released a new app called "Rosetta for Portable devices" that will run under Raspbian but its for the ARM64 architecture.

Link to Rosetta@home: http://boinc.bakerlab.org/rosetta/

For those that don't know Rosetta is searching for proteins in relation to the Covid-19 virus. Its a BOINC-based project so you'll need to install that first. There are a few catches though.
  • You'll have to put the kernel into 64 bit mode.
  • You have to tell BOINC its an aarch64 platform (ARM64).
  • Some tasks can use up to 1.3GB of memory each so you need to limit how many run at the same time.

Most BOINC projects don't have aarch64 apps, particularly Einstein which gave me an incompatible app and then all the work units failed. You can go back to armhf (32 bit) mode later by reversing these steps.

Before somebody asks, yes you could theoretically do this on a Pi3B or a Pi3B+ but they only have 1GB of memory so its not worthwhile.

Assuming you still want to proceed this is the process.


1. Install BOINC
If you already have it installed then skip this step.If not install it and sign up to any projects you want to run. I won't go into detail here but if there is interest I can cover it in another blog post.

Set it to No New Tasks for all projects. If it has any work in progress let it finish and report it before proceeding.


2. Put the kernel into 64 bit mode
This tells the kernel to use 64 bit mode also known as ARM64 or aarch64. By default the kernel runs in 32 bit mode for compatibility with the older Pi software. You'll need the 4.19.75 or later kernel. To find out what you have currently type the following in a terminal or ssh session:
uname -a

If you have an older one then you'd better upgrade it to the latest packages and then come back to this step.

Make a copy of the config.txt first. Type:
cd /boot
sudo cp config.txt config.old

Edit the config.txt. Type:
sudo nano config.txt

Once in nano (its a text editor) scroll to the very end and add "arm_64bit=1" (without the quotes) on a new line.

Press Control-O to save the file.

Press Control-X to exit from nano.

Now reboot it by typing:
sudo reboot


3. Tell BOINC to use aarch64
Back in a terminal or ssh session type:
uname -a

You should see it says "aarch64" on the end of the line. If not then you need to fix that up first. If it does we now need to edit the cc_config.xml file that BOINC uses. Type:
cd /etc/boinc-client
sudo nano cc_config.xml

Blank out the contents using the delete or backspace keys and then paste or type this in:
<cc_config>
  <log_flags>
    <task>1</task>
    <file_xfer>1</file_xfer>
    <sched_ops>1</sched_ops>
  </log_flags>
  <options>
    <alt_platform>aarch64-unknown-linux-gnu</alt_platform>
  </options>
</cc_config>

Press Control-O to save the file.

Press Control-X to exit from nano.

We need to restart BOINC to pick up this change so type the following command:
sudo systemctl restart boinc-client

Now you can allow BOINC to accept tasks.


Why do we need to this?
When you install Raspbian on your Pi its all 32 bit, all the add-on programs and so on. Its known as armhf (ARM hard float). The Raspberry Pi Foundation made kernel changes to allow it to run in 64 bit mode. That's the kernel taken care of but the apps are still 32 bit.

When you install BOINC you get the armhf version. That is because the Foundation don't have aarch64 repositories. We then need to tell BOINC to use aarch64 as an alternative to armhf in order get 64 bit apps.