Help with COVID-19 research - protein folding on Raspberry Pi4
Hello, it has been a while since I wrote here last time.
Today I want to share with you something I’ve been doing in the last couple of days. The lock down measures for COVID-19 and some free time brought me to tinker a bit with my Raspberry Pi4.
The project Rosetta@home allows people to give compute power to scientists for designing new proteins. The compute power could come from any device: a laptop, a desktop, a server and even a portable device.
Recently I bumped into the news of running Rosetta@home on aarch64 (arm64) hardware and, in my case, on my new and shiny Raspebrry Pi4.
In theory what you need is:
- An account on: https://boinc.bakerlab.org
- A Raspberry Pi4
- A 64-bit OS
- The BOINC client
$ sudo apt-get update $ sudo apt-get install boinc-client boinctui
- The client configure with your email/password
A good write-up could be found here
While I was setting it up I found few “issues”. Hopefully they could save you some time.
Rosetta doesn’t work on Raspbian
If you own a Raspberry Pi4, I’m sure you’ll have a Raspbian based system. It runs without
any problem but unfortunately it is not suitable for running Rosetta@home.
Although the hardware supports 64-bit, Raspbian is a 32-bit OS and this means
it cannot run 64-bit applications.
Solution: install a 64-bit distribution.
Ubuntu officially supports Raspberry
Pi4. Download the 64-bit version from here or follow this tutorial from
Ubuntu
I had issue with WiFi module hence reverted to wired connection!
The SD card is a bit slow.
Although SD cards nowadays are fast, they are slower than HDD/SDD and when you
run high I/O computations on them, they could fail fairly quick.
Solution: move the root file system out from the SD card to an external hard
disk.
I had a 1TB portable one and it works like a charm.
It’s not that straightforward to move the root file system to an external disk
but it’s a doable. What you need is a good guide
The Pi4 is slow.
Those are the specs.
As you can see it has 4 CPUs running at 1.5GHz. Not bad for a small board.
Solution: overclock the CPU.
Just follow this tutorial.
I did try to overclock it to 2GHz but it kept power cycling (likely due to
power consumption) so I stuck with 1.75GHz.
If you overclock it, I strongly suggest something to cool down the CPU.
I have a Fan SHIM: a bit noisy
but it does the job.
High memory usage
Even I have the 4GB version, I found the Raspberry Pi4 to be very unstable
while doing computations. Memory is somehow limited and when processes use a
large amount of it, the OOM killer could be invoked killing processes that
make the system unstable.
Solution: create a swapfile
Like any other Linux distribution create swap space to use part of the hard disk as
“extention” of the memory. I created a 4GB swap file and it seems working OK.
Comments