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.

Friday, March 6, 2020

7th of March

I got a replacement Pimoroni fan shim for the one that failed. The place I got them refunded the purchase price so all I had to pay was the postage. I have installed it and got the 2nd Pi4B crunching again.

At the moment I have 2 x Pi4B's and 6 x Pi3B's running 24/7 with the rest off until I can find alternative power supplies.

Saturday, February 22, 2020

February 2020

The cluster is currently running all available Pi's with Einstein BRP4 work. I still need to get Pimoroni fan shim replaced.

I still need to find replacement power supplies. I had no success with companies that make custom power supplies, they all want a large order not just a few of them. Thats the couple that replied, the rest didn't bother.

As its hot again (currently 30 degrees C in the computer room) I will have to let them idle once they've finished their current work.

Sunday, January 26, 2020

Hot January

Preservation
The weather seems to have returned to some sense of normality so that means its hot and humid. I have been limiting the cluster to running on the Pi's that have their own (official) power supply in an attempt to preserve the multi-port USB chargers. I can't get the same ones any more.

In addition to the power supplies one of the Pimoroni fan shims has failed. The fan won't spin up so it has stopped one of the Pi4B's running. I'll be returning it under warranty. The other one is making noises so it will probably die soon.

That leaves the cluster currently running at a reduced capacity of 1 x Pi4B and 6 x Pi3B for the moment.