How to Run Rosetta@Home on Arm-Powered Devices
This week, after an amazing Arm community effort, the Rosetta@Home project released support for sending work units to 64-bit Arm devices, such as the Raspberry Pi 4, Nvidia Jetson Nano, Rockchip RK3399-based single board computers, and other SBC’s that have 2gb of memory or more.
Sahaj Sarup from Linaro, the Neocortix team, Arm, and the Baker Lab at the University of Washington all played in role helping us port the Rosetta software to aarch64, get it tested in their Ralph (Rosetta ALPHa) staging environment, validate the scientific results, and eventually push it to Rosetta@Home.
Now, anyone with spare compute capacity on their Arm-powered SBC’s running a 64-bit OS can help contribute to the project by running BOINC, and crunch data and perform protein folding calculations that help doctors target the COVID-19 spike proteins (among other medicine and scientific workloads).
Here is a quick tutorial on how to get started, using a native operating system for your devices. This methodology is not the only way to run Rosetta@Home, but, is intended for the technical users who want to run their own OS and manage the system themselves.
Raspberry Pi 4
To fight Covid-19 using a Raspberry Pi 4, you need a Raspberry Pi 4 with 2gb or 4gb of RAM. The Rosetta work units are large scientific calculations, and they require 1.9gb of memory to run. You will need to use a 64-bit OS for this, so Raspbian will not work, as it is a 32-bit OS. Instead, you will need to download and flash Ubuntu Server from their official sources, located here: https://ubuntu.com/download/raspberry-pi. Once the SD Card is written, and your Pi 4 has booted up, connect an ethernet cable, and be sure to run ‘sudo apt-get update && sudo apt-get upgrade’ to make sure the system is up to date. At this point a reboot may be necessary, and once the system comes back up, we can start to install BOINC and Rosetta. Run ‘sudo apt-get install boinc-client boinctui’ to bring in the BOINC packages. If you are using a 2gb RAM version of the Pi 4, we need to override one setting to cross that 1.9gb threshold mentioned earlier. If you have a 4gb RAM version of the Pi 4, you can skip this next item. But, 2gb users, you will need to type ‘sudo nano /var/lib/boinc-client/global_prefs_override.xml’ and enter the following to increase the default memory available to Rosetta to the maximum amount of memory on the board:
<global_preferences> |
<ram_max_used_busy_pct>100.000000</ram_max_used_busy_pct> |
<ram_max_used_idle_pct>100.000000</ram_max_used_idle_pct> |
<cpu_usage_limit>100.000000</cpu_usage_limit> |
</global_preferences> |
Press “Control-o” on the keyboard to save the file, and then press Enter to keep the file name the same. Next, press “Control-x” to quit nano.
Next, using your desktop or laptop PC, head to http://boinc.bakerlab.org and create an account, and while there, be sure to join the “crunch-on-arm” team!
Back on the Raspberry Pi, we can now run ‘boinctui’ from the command prompt, and a terminal GUI will load. Press F9 on the keyboard, to bring down the menu choices. Navigate to the right, to Projects. Make sure Add Project is highlighted, and press Enter. You will see the list of available projects to choose from, choose Rosetta, select “Existing User” and enter the credentials you created on the website a moment ago.
It will take a moment, but, Rosetta will begin downloading the necessary files and then download some work units, and begin crunching data on your Raspberry Pi 4!
You can press ‘Q’ to quit boinctui and it will continue crunching in the background.
Nvidia Jetson
If you have an Nvidia Jetson Nano, you can actually follow the same directions outlined above directly on the Nvidia-provided version of Ubuntu. To recap, these are the steps:
- Open a Terminal, and run ‘sudo apt-get update && sudo apt-get upgrade’. After that is complete, reboot.
- Using your desktop or laptop PC, head to http://boinc.bakerlab.org and create an account, and join the “crunch-on-arm” team
- Back on the Jetson Nano, run ‘sudo apt-get install boinc-client boinctui’
- Run ‘boinctui’, press F9, navigate to Projects, Add Project, and choose Rosetta@Home. Choose an Existing Account, enter your credentials, and wait for some work units to arrive!
Other Boards
If you have other single board computers that are 64-bit, and have 2gb of RAM, that run Armbian, the process is the same for those devices as well! Examples of boards that could work include Rockchip RK3399 boards like the NanoPi M4 or T4, OrangePi 4, or RockPro64, Allwinner H5 boards like the Libre Computer Tritium H5 or NanoPi K1 Plus, or AmLogic boards like the Odroid C2, Odroid N2, or Libre Computer Le Potato. Additionally, 96Boards offers high performance boards such as the HiKey960 and HiKey970, Qualcomm RB3, or Rock960 that all have excellent 64-bit Debian-based operating systems available.
For any of those, simply install the ‘boinc-client’ and ‘boinctui’ packages, and add the Rosetta project!
Of course, if you just so happen to have a spare Ampere eMAG, Marvell ThunderX or ThunderX2 laying around, those would work quite nicely as well.
[…] explained in an article on miniNodes, you’ll need a board with at least 2GB RAM and running a 64-bit operating system. That means […]
Tried RPi 4 with 2G memory using the config above but won’t run as it says not enough memory says it needs 1907.35 MB but only 1848.20 MB is available.
You’ll need to make sure that the Global Preferences are set as described, and it may be worth rebooting to make sure they have taken effect.
I did do Global prefs as described and also set gpu_mem to 16M this improved things to 1898.00 MB but still not enough.
I’ll just stick with the 4G one that I have.
Same problem here. I gained some of the memory back by setting gpu_mem=16 but I’m still only at 1898.00.
Try it again now, if you can.
I’m getting “couldn’t connect to server”? Pi Can see Internet fine
Hi,
Same as Brian Welsby, not enough memory on Pi 4 2 Go, headless Ubuntu server 18.04.4 via ssh. I also tried 19.10 but again same error. Even on reducing GPU memory to 16 or 5, still not working.
Try again. 😉
[…] объясняется в статье на miniNodes, вам понадобиться плата с оперативной памятью не […]
Hi,
Same here fom a LInux newby.
Rosetta for Portable Devices needs 1907.35 MB RAM but only 1848.20 MB is available for use.
Must be something we can kill to relase memory…??
Following on from my post yesterday I reduced GPU memory to 16 by placing:
gpu_mem_16
in the usercfg.txt and rebooting.
Same message about memory but it now seems to be downloading and processing work units.
ubuntu 19.10.1 for ARM64 RP4 with 2gig memory. Have also added
over_voltage=4
arm_freq=2000
to usrcfg.txt
Excellent! Thanks for the pointers.
Apparently you don’t need to install a 64-bit OS. You can quickly change raspbian to run in 64 bit mode. See:
http://marksrpicluster.blogspot.com/2020/04/do-something-useful-with-your-pi4.html .
Supposedly there may be some compatibility issues with other applications. But I haven’t noticed anything yet.
Wow, that is awesome!
You better install a 64-bit OS, as a 64-bit OS can run 32-bit code via alternative platform, but a 32-bit OS can’t run 64-bit code. I too tested the 64-bit kernel within 32-bit Raspbian, but it is very limited.
Tips:
You can set the percentage of maximum memory utilization above 100%. Doing this effectively disables the check that your system has enough memory to handle the task. Be prepared for swapping!
On my RPi 4B 2G, are use this trick to keep all four cores busy at all times. I have a USB stick being used as swap space and file swap on the SD card as a back up.
I use thrash-protect to prevent thrashing and system slow down as a result of the high swap utilization. I’m getting really good performance and the device is always fully utilized.