Seti@Home Native Client port
Seti@Home is a distributed computing project providing an open source BOINC application. We have used this application as an example to demonstrate the usage of the GridBee Native Client library. This page explains in a few simple steps how to compile the Seti@Home BOINC application into Native Client executables that can be handled by the GridBee framework.
Preparing the build environment
The Creating Native Client applications section describes how to port BOINC applications written in C/C++ into Native Client executables. This article only mentions the main steps and not in a strict order.
- Download and install the Native Client SDK (pepper_16 recommended)
- Download and build the GridBee NaCl library
- Create build scripts linking your application against the gridbee library and including the gridbee_boinc_framework
- Install any additionally necessary libraries
- Build while eliminating errors
The first three steps can be covered by downloading this starter package. It contains the precompiled GridBee NaCl library, the gridbee_boinc_framework and scons scripts for building the application.
The version we will build also requires the FFTW library. FFTW has already been ported to Native Client and you can grab it from the naclports site. Follow the steps in the naclports wiki to set up naclports on your computer.
Since for building Seti@Home you need not just the fftw3 library but fftw3f as well, you need to modify FFTW's install script before running it. Open the naclports/src/libraries/fftw-3.2.2/nacl-fftw-3.2.2.sh file and add the --enable-float option to the extra flags. You may have to remove the --enable-sse2 option to successfully compile the library.
Note: altough naclports is also available and supported on Windows, I have had no luck installing FFWT on Windows 7 64 bit.
Downloading and patching Seti@Home
Download the Seti@Home source code from the Seti@Home SVN repository by checking out https://setisvn.ssl.berkeley.edu/svn/seti_boinc.
Copy the seti_boinc source directory into the starter package root directory (where the scons files are). Apply this patch to the seti_boinc directory. The patch file has been created for rev. 1394 and is not guaranteed to work with different revisions.
Building the application
Specify the Native Client SDK path in the scons or scons.bat file depending on your platform and run the script.
Deploying the application
Once the build has been complete you should see 4 files in the build directory.
seti_x86_32.nexe seti_x86_64.nexe seti.nmf seti_1.00_nacl.html
Deploy these files on a BOINC server as an application under the nacl platform. The main file of the application is seti_1.00_nacl.html.
You can find further information about deployment in this corresponding article.
We have executed the compiled application in the GridBee web application. Below you can download the corresponding results.