Intro
As a follow-up to my previous post:
Finding Pulsars on Raspberry Pi (BOINC & einstein@home)
I also wanted to run BOINC and einstein@home on my Beaglebone Black (BBB). BOINC is, of course, the Berkeley Open Infrastructure for Network Computing, a crowdsourcing computer clustering system to solve scientific problems. I have a few BBB setting in a drawer (more than I like to admit), so why not put them to use? Beaglebone is running a fairly modern debian image, so it should be similar to but different from a raspberry Pi.
The debian operating system that my BBB reports when I run the command uname -a is 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 armv7l GNU/Linux,
That's not the latest kernel, but fairly recent. I did try it with an older version of BBB debian, but boinc could not resolve the dependencies.
On the raspberry Pi, BOINC was easy to install and configure because I could use the simple synaptics software manager to install boinc-client, and boinc-manager. With the BBB, one issue to consider is beaglebone.org seems to be moving toward headless only images. As a matter of fact, for performance reasons, I set up several of my BBB with the "IoT" version flashed onto them. So I figured command line boinc configuration would be a good thing to learn. I did get it working, but as it turned out, (so far) I have only been able to get it working by setting it up with what I'll call a hybrid command line and GUI system. Let me explain below.
Installation
Googling around (actually https://duckduckgo.com -ing around), I found a few instructions such as:
https://boinc.berkeley.edu/wiki/Installing_BOINC_on_Debian
and
https://boinc.berkeley.edu/wiki/Client_configuration
and
https://boinc.berkeley.edu/wiki/Stop_or_start_BOINC_daemon_after_boot
These confirmed that I do the typical commands.
$ sudo apt-get update
$ sudo apt-get install boinc-client
and then needed to edit one or two xml files, The configuration files are located at two places:
/etc/boinc-client
/var/lib/boinc-client
Config
The file listing at /etc/boinc-client is:
debian@beagle0:/etc/boinc-client$ ls -l
-rw-rw-r-- 1 boinc boinc 356 May 8 2017 cc_config.xml
-rw-rw-r-- 1 root boinc 1498 Apr 12 22:40 global_prefs_override.xml
-rw-r----- 1 root boinc 1 May 5 2017 gui_rpc_auth.cfg
-rw-r--r-- 1 root boinc 312 Apr 9 18:36 remote_hosts.cfg
See below, I did end up editing the file remote_hosts.cfg, because I decided to control it remotely. Looking through /var/lib/boinc-client, it wasn't obvious to me what to enter in the xml files to get my project running. Maybe it's just me, but I need a few examples to be able to get the xml entries put in the right place. The boinc.berkeley.edu wiki provided information, but with the long list of options it was not clear to me how I would get the client running, and get it to use my einstein@home account.
Most helpful was this posting from pimylifeup. Yes it's a raspberry Pi tutorial, but it often happens that Pi answers help guide me when I'm learning to use my beaglebone.
https://pimylifeup.com/raspberry-pi-boinc/
This was quite useful because of the examples using "boinccmd" to configure the client. I also used the following two commands. I had previously set up my username and password when I first configured my raspberry Pi. For my project, I'm not running setiathome, I'm running einsteinathome, so in the following commands I substituted the web site http://einstein.phys.uwm.edu
$ boinccmd --lookup_account http://setiathome.berkeley.edu <your_email> <your_password>
$ boinccmd --project_attach http://setiathome.berkeley.edu <your_account_key>
This got me attached to my einstein@home account, great. And I could see (with "top" command) that the client was running. But, alas, it still didn't start processing data. The " boinccmd --get_tasks " returned a blank result, no processing was going on. Probably if I'd spent more time, the options with boinccmd would have gotten me going. At this point, I thought I'd backtrack and install boinc-manager, and set up the BBB with a keyboard and monitor. So I ran the typical command to do that.
$ sudo apt-get install boinc-manager
But then, in my searching, I decided to try the "hybrid" approach. My raspberry Pi 4 was busy running BOINC and einstein@home. I had the both beaglebone and my raspberry Pi on the same network, and the Pi already had the GUI boinc manager running. I had seen on the boinc wiki that remote control was possible, so I figured I would try to control the beaglebone remotely using the boinc-manager running on my Pi. I knew my BBB IP address. I went into /etc/boinc-client and edited the remote_hosts.cfg as follows, typing in the last line, the IP address of my Pi 4 that I want to use.
# This file contains a list of hostnames or IP addresses (one per line)
# of remote hosts, that are allowed to connect and to control the local BOINC core client via GUI RPCs.
# Lines beginning with a # or a ; are treated like comments and will be ignored.
# allen's Pi4 is at IP address .15
#host.example.com
192.168.0.15
https://boinc.berkeley.edu/wiki/Controlling_BOINC_remotely
This web page has some information, but as above, the instructions were lacking details. The goal was to get the beaglebone processing data and link it to my account. I knew that setting up user name and starting an einstein project was easy using the GUI boinc-manager. What worked was going into the Pi boinc manager, with the Advanced View, and open another window:
From that window, I chose the BBB client rather than the local (Pi) client. For Host name entering the IP address. I typed in 192.168.0.41 (my BBB), and for a Password, no password, leave it blank, and I was in. (originally I thought I had to type the BBB password, but my Pi 4 crashed today, and when I redid the connection, only the IP address was needed.) If I do enter a password at this step, no connection is established, leaving the password blank is what makes it connect properly.
Now I'm connected remotely, and I can easily enter my username and add the einstein@home project to my BBB.
OK. that's all working well now. It's been running a few days. If you look carefully at the above image, with the speed of the BBB, it takes more than 2 days to process one task from einstein@home. I'm not going to win any awards for best contributor, but the journey was interesting. After using the remote host to configure the BBB, in directory /var/lib/boinc-client, it now has a lot of configuration files that were created. The command line boinccmd --get_tasks now gives me the status of my boinc client, so I can monitor it that way using the command line.
debian@beagle0:/var/lib/boinc-client$ boinccmd --get_tasks
======== Tasks ========
1) -----------
name: p2030.20170503.G39.54+01.50.S.b2s0g_240_0
WU name: p2030.20170503.G39.54+01.50.S.b2s0g0._240
project URL: http://einstein.phys.uwm.edu/
report deadline: Mon Apr 27 12:11:46 2020
ready to report: no
got server ack: no
final CPU time: 0.000000
state: downloaded
scheduler state: scheduled
exit_status: 0
signal: 0
suspended via GUI: no
active_task_state: EXECUTING
app version num: 147
checkpoint CPU time: 60733.660000
current CPU time: 60752.690000
fraction done: 0.298859
swap size: 134 MB
working set size: 134 MB
estimated CPU time remaining: 157904.272082
Next
Next step, learn a fully command line configuration of boinc. Using the auto-generated xml files as my guide, I may be able to figure it out.