Search:  
Gentoo Wiki

Boinc

Contents

Introduction

BOINC (an acronym for Berkeley Open Infrastructure for Network Computing) is a grid computing program developed and managed by the University of California at Berkeley. It is designed to allow scientific researchers to harness the computing power of many computers asynchronously. Clients communicate with a project's server, download jobs, process the files locally, then check completed jobs back in. See BOINC project for more information.

Installation

The BOINC client application is available through portage, but as this article is being written, all versions are currently masked. In order to install the client, you will first need to edit /etc/portage/package.keywords to unmask the version you wish to install. You need to add the following line to your /etc/portage/package.keywords file:

File: /etc/portage/package.keywords
 
 sci-misc/boinc
  
Warning: Packages are masked for a reason: they are either being tested or are known to be unstable. Unmask and emerge masked packages at your own risk.

Once you have unmasked the package, you can simply emerge BOINC.

Code: emerge BOINC
 
foo # emerge -av boinc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sci-misc/boinc-5.10.45  USE="X unicode -server" 0 kB

Total size of downloads: 0 kB
Would you like to merge these packages? [Yes/No]    
  

Assuming that BOINC emerged correctly with no errors, you can now proceed to attaching to projects and running jobs.

Remember to make sure that BOINC starts on system boot:

Code: emerge BOINC
 
# rc-update add boinc default
  

Starting BOINC

Before we fire up BOINC, it is helpful to understand that BOINC actually consists of two components that run on your machine. One is called the "Client," and handles such backend tasks as communicating with project servers. The second is the Manager, which is the GUI that wraps the client. Before you can make use of boinc though, you first have to attach it to a project:

Code: Attaching BOINC
 
# /etc/init.d/boinc attach
    Enter the Project URL: <add project url here>
    Enter your Account Key: <add your account key here>
  

Starting the client is done with a init script created during install.

Code: Starting BOINC
 
# /etc/init.d/boinc start
  

Using the Graphical BOINC Manager

BOINC Manager will have been installed as a item on your panel menu in KDE, Gnome, or other desktop. For example, in KDE, it should appear under Science & Math | Boinc. Selecting this will start BOINC Manager.

You may get a message that the Manager is not currently connected to a client. If this is the case, you will need to select Advanced|Select Computer on the menu in BOINC Manager. This brings up a dialog that asks you for a hostname and password.

The hostname should either be 'localhost' or the host name you have assigned to your computer. If you have assigned a host name, then 'localhost' probably will not work.The password is not any password you might think of (your password or a password for a BOINC project). Rather, it is a password stored in /var/lib/boinc/gui_rpc_auth.cfg.

Using the Console Based BOINC Manager

After the installation you should have boinc_cmd available as root. This is a consolebased manager for BOINC in case you don't have X on your system.

To connect your running boinc daemon to your account manager enter the following command:

Code: Setup BOINC from the commandline to use your account
 
boinc_cmd --host localhost --passwd cfgpasswd --acct_mgr_rpc http://bam.boincstats.com/ myusername mypassword
  

In the above command substitute 'cfgpasswd' with the contents of the file /var/lib/boinc/gui_rpc_auth.cfg, 'http://bam.boincstats.com/' with your account manager's domain (it's strict so try prepending the protocol and appending a slash as in the example instead of just entering 'bam.boincstats.com') and substitute 'myusername' and 'mypassword' with your account details (in this case the account details from BAM). Once the command have been executed successfully, configuration will be written to files in the folder /var/lib/boinc/ hence you only have to enter the command ONCE. The default password in /var/lib/boinc/gui_rpc_auth.cfg is something random, but it's plaintext so just enter this command to use a password that's easy to remember:

Code: Change BOINC daemon access password
 
echo 'ThisPasswordIsEasyToRemember' > /var/lib/boinc/gui_rpc_auth.cfg
  

Note that until you restart BOINC the old password will be the correct one.

Code: Restart BOINC
 
/etc/init.d/boinc restart
  

For me the command failed the first time, but just run it a couple of times until it succeeds in both stopping and starting BOINC.

Joining Account Managers

An account manager is a web site that simplifies participating in BOINC, especially if you are new to BOINC, or if you have several computers, participate in several projects, or like to learn about new projects. The account manager concept was conceived and developed jointly by GridRepublic and BOINC. We will focus on attaching to the (BAM!) account manager.

BAM! Stats

Code: Joining BAM! Stats
 
boinc_cmd --host localhost --passwd PASSWORD --join_acct_mgr http://bam.boincstats.com/ USER PASSWORD
  

Joining a Project

Before you can actually run any projects, you need to join a project. You can do this either through the Web, or through the manager.

Joining a Project Using the Web

A listing of those projects currently registered with the official BOINC site can be found at Choosing BOINC projects. For each project you want to join, simply follow the link and create an account on their web site.

Joining a Project Using the Manager

Within BOINC manager, you can join a project by selecting Tools | Attach To Project. You will be asked to enter the Project URL. Just as with signing up via the Web, you can get a list of projects at their URLs at BOINC projects. In the event that a particular URL returns an error, you may wish to use a browser to visit the site, as it may have changed or the project may be down.

This brings up a dialog box that lets you create a new account, or attach to a project where you already have an account.

Joining a Project from Console

How to join project form linux console? Fisrt step is to obtain your key from project and than join project.

Code: Starting BOINC
 
./boinc_cmd --host localhost --lookup_account http://dist2.ist.tugraz.at/sudoku/ luvar@szm.sk HusteHeslo;-)
./boinc_cmd --host localhost --project_attach http://boinc.bakerlab.org/rosetta/ 14f9a4fxxx7d6c1e93xxx4fb2736e
  

Potential Problems

This section discusses potential problems users may encounter while running BOINC.

Graphics

To get the "Show graphics" button to work in the BOINC Manager, compile x11-libs/wxGTK with the opengl USE flag.

Code: /etc/portage/package.use

x11-libs/wxGTK opengl

AMD64

Currently, BOINC works best as a 32-bit application, although it will compile as 64-bit. This is because BOINC must also be able to run the specific apps for each project, which may not support 64-bit. In such an event, you will notice that the Messages tab in BOINC manager gives an error stating: "Message from server: platform 'x86_64_pc-linux-gnu' not found.

Since most projects have tried to ensure backward compatibility to maintain their installed base, few project apps support 64-bit currently. Your choices, therefore, are to either attach only to this projects that have implemented as x86_64, or to compile and install a 32-bit version.

You want the 32-bit version? Let's go! To get the startup scripts the portage BOINC would have, we emerge boinc. After that is done download the binary from here (take the 5.8.16 for linux/x86). By executing it, you unzip the files to the directory ./BOINC . I recommend to store it in the directory /home/boinc with the owner and group set to boinc, for security reasons. Now we have to tell the startup scripts to use our binary, and to allow remote control.

Code: /etc/conf.d/boinc
 
# Owner of BOINC process (must be existing)
USER="boinc"
GROUP="boinc"

# Directory with runtime data: Work units, project binaries, user info etc.
RUNTIMEDIR="/var/lib/boinc"

# Location of the boinc command line binary
BOINCBIN="/path/to"

# Logfile (/dev/null for nowhere)
LOGFILE="/var/log/boinc.log"

# Allow remote gui RPC yes or no
ALLOW_REMOTE_RPC="yes"

# nice level
NICELEVEL="19"
  

Now, we need to start and stop boinc, so that everything is created in /var/lib/boinc. So run /etc/init.d/boinc start, followed by /etc/init.d/boinc stop. As the password for the remote login is very hard to remember set it to something you easier for your brain.

Code: setting the password
 
echo "password" > /var/lib/boinc/gui_rpc_auth.cfg
  

Everything should work now, so you can add boinc to your runlevel and start crunching on your 64-bit CPU.

Setting the Default Web Browser

Solution 1: Although many have tried setting the BROWSER environmental variable, with the default pointing to epiphany, this suggestion has known to fail on Linux. One fix is to modify the mime settings to associate the mime type in this case html/text to the proper web browser. It turns out that boinc does not respect the default_application_id property. It either determines the default web browser from short_list_application_ids_for_novice_user_level, short_list_application_ids_for_intermediate_user_level, and short_list_application_ids_for_advanced_user_level in the gnome-vfs.keys file. To set the default web browser change the first (left most) program to point to your web browser, in this case we set it below to use Firefox as the default web browser for boinc. Not adding the target web browser to the front of the list will not load the url into the web browser thats is currently loaded on your desktop. In this case below, opera will not load boinc homepage. This is a known problem in 5.10.21.

Code: /usr/share/mime-info/gnome-vfs.keys
 
text/html
        ...
        short_list_application_ids_for_novice_user_level=firefox,opera,...
        short_list_application_ids_for_intermediate_user_level=firefox,...
        short_list_application_ids_for_advanced_user_level=firefox,opera,...
  


Solution 2: The above may not work... Another fix is to set the default browser using gnome control panel. Go to System > Preferences > Preferred Applications or run gnome-default-applications-properties and set the default browser there.

Boinc cannot connect to WorldCommunityGrid (WCG) servers

Boinc relies on curl (libcurl actually) to download/upload data through SSL-encrypted streams. It seems that enabling gnutls USE flag on curl breaks boinc ability to connect to WCG servers. I don't know if other servers have the same issue...

Here are the message i got from boinc log file :

Code: /var/log/boinc.log
 
25-Feb-2008 20:11:30 [---] Starting BOINC client version 5.10.28 for x86_64-pc-linux-gnu
25-Feb-2008 20:11:30 [---] log flags: task, file_xfer, sched_ops
25-Feb-2008 20:11:30 [---] Libraries: libcurl/7.17.1 GnuTLS/2.0.4 zlib/1.2.3
[...]
25-Feb-2008 20:12:20 [World Community Grid] Started upload of lo288_00012_18_0
25-Feb-2008 20:12:23 [---] Project communication failed: attempting access to reference site
25-Feb-2008 20:12:23 [World Community Grid] Temporarily failed upload of lo288_00012_18_0: http error
25-Feb-2008 20:12:23 [World Community Grid] Backing off 3 min 45 sec on upload of lo288_00012_18_0
25-Feb-2008 20:12:25 [---] Access to reference site succeeded - project servers may be temporarily down.
[...]
25-Feb-2008 20:30:13 [World Community Grid] Sending scheduler request: Requested by user. Requesting 95040 seconds of work, reporting 1 completed tasks
25-Feb-2008 20:30:14 [---] Project communication failed: attempting access to reference site
25-Feb-2008 20:30:15 [---] Access to reference site succeeded - project servers may be temporarily down.
25-Feb-2008 20:30:18 [World Community Grid] Scheduler request failed: SSL connect error
  

Look for the "SSL connect error" in your log file if you can't connect. Here's the Appropriate thread in WCG forums.

I guess if this is not a WCG specifig issue, the ebuilds should be updated to warn if curl is compile with gnutls USE flag on.

to fix this, the easy way is to edit

Code: /etc/portage/package.use

net-misc/curl -gnutls

then

Code: re-emerge curl and restart boinc
 
foo # emerge -1v curl
foo # /etc/init.d/boinc restart
  
Retrieved from "http://www.gentoo-wiki.info/Boinc"

Last modified: Sat, 13 Sep 2008 08:16:00 +0000 Hits: 7,717