SETI Forum | Linux Forum

Site Navigation:

Get Firefox!

Compile BOINC for Linux


This tutorial is now somewhat out of date. Whilst I have no specific plans to update it at the current time, the information contained herein is still generally applicable, and as such, I will leave it here in the hope that it remains useful.

One of the main differences between SETI@Home classic and BOINC is that the BOINC project is open source, hence the source code is freely available. This means we can download and compile the source code with optimizations specifically tailored for our own individual hardware.To compile the BOINC source code you will need to have all the appropriate development packages installed on your system. A list of required development packages is available here (as we are only going to be compiling the client applications, we do not need to have MySQL installed). I initially used Fedora Core 2 with gcc-3.3.3-7 and make-3.80-3 for this tutorial. More recently I have found gcc-3.4.2 as included with Fedora Core 3 gives significantly faster benchmark results.

The reason why the Windows BOINC client returns much faster benchmark results than the Linux client is due to the different compilers used and their relative efficiency (see here for a more detailed discussion on this).

The first thing we need to do is download the source code for BOINC from here. Nightly builds are available in 4 flavours and we need a recent boinc_public-cvs.tar.gz version (I used the nightly builds from October 16, 2004 which are for version 4.13). The non _public versions are test versions and the zip files are Windows sources. Once downloaded, place the tar.gz file in /usr/src and extract:

cd /usr/src

tar xvzf boinc_public-cvs-2004-10-16.tar.gz

Now change to the source directory (boinc_public) and build the BOINC client:

cd boinc_public

export CFLAGS="-march=athlon-xp -O3 -fomit-frame-pointer -funroll-loops -fforce-addr -ffast-math -ftracer"


./configure --disable-server

make clean


The two export commands set the optimizations to be used. -march=athlon-xp is specific for Athlon XP processors (replace with -march=i686 for Intel processors) and -O3 uses level 3 optimizations (the highest available). For a detailed analysis of the optimizations used and their effect, see the discussion thread here. The configure command runs a configuration script and the --disable-server switch tells it we only want to compile the client, not the server software (this allows us to configure and compile the source without having MySQL installed). The make command actually does the compiling.


If you want to optimize for other processors, try -march=k8 for 64-bit AMD processors, or try -march=pentium3 or -march=pentium4 for 32-bit Intel processors. Some experimentation may be useful here as some unexpected results have been noted. Some good information on different gcc compiler flags can be found here or in the gcc online manual available here.

The configure and final make commands may take a few minutes and lots of output will scroll to the screen, but if all went well you will now have a newly compiled copy of the BOINC client (boinc_4.13_i686-pc-linux.gnu) located in the /usr/src/boinc_public/client directory. Simply copy this file to your boinc directory replacing the original BOINC client. At this point it might be a good idea to rerun the benchmarks using the -run_cpu_benchmarks switch.


When compiling some later versions of the BOINC client (for example, V4.43) on Red Hat or Fedora systems, the --build=i686-pc-linux-gnu switch should be added to the configure script otherwise the build system is incorrectly identified as i686-redhat-linux-gnu causing the client to fail to connect to the project server. This bug has been fixed in subsequent releases (for example, V4.72).

Lets have a look at the difference our efforts have made (data for an Athlon XP 2100+ and DDR2100 memory at stock speeds):

Downloaded BOINC client:
Whetstone – 896
Dhrystone – 2155

Optimized BOINC client (percentage performance increase):
Whetstone – 1656 (85%)
Dhrystone – 2640 (22%)

That's a pretty large improvement, particularly on the Whetstone benchmark, for less than 30 minutes work.

Optimized BOINC clients for AMD (Athlon XP) and Intel (i686) based systems compiled as described herein can be downloaded from the appropriate links located here.

To discuss this guide and for a more detailed discussion of the optimizations used, please see this thread.

Why not now visit the tutorial on how to compile the SETI client.