VASSAR COLLEGE
POUGHKEEPSIE · NEW YORK
Department of Pirates
 
 

BOINC Developers' Notes


This page contains notes, tips and links for those interested in developing BOINC applications. One way to get up to speed quickly with BOINC is to work your way through the applications, from the "Hello World" program for BOINC through Sextant, the screensaver for Einstein@Home.

Last modified: Sunday, 27-Jan-2008 14:46:32 EST
Topics
BOINC Client
Building BOINC
Applications
Graphics
Project Managment
Developers Links
BOINC is complicated, especially when you are first introduced to it. The notes and links below collect together much of what I have learned about BOINC from setting up a BOINC project and creating several BOINC applications.

A quick overview of terminology might be helpful. The BOINC "client" is the software you download from Berkeley and install and run on your own computer. The client will in turn download BOINC "applications", which are programs which perform scientific calculations (and optionally display screensaver graphics). A BOINC "project" is a server which provides applications to BOINC clients and allows participants to monitor their participation, as well as talk to each other via disucssion forums and a help desk.

If you just want to run BOINC on your home computer and contribute computer time to one or more projects, then read below about the BOINC client.

If you want to set up your own BOINC project then you might start by reading about how to create and manage BOINC applications, and then read about BOINC project managment.

Other useful sources of information about creating BOINC projects or applications are

The BOINC "Client"

The BOINC "client" (sometimes also called the "core client", though I think "client core" is a more accurate description) is a program which runs on your computer and manages the BOINC "applications" which come from the various projects to which you are "attched" (participating in). The BOINC "Manager" is a graphical program which lets you monitor and manage the core client.

You can download the BOINC client and manager from the main BOINC site:

Installation is easy on both Windows and Mac.

Installation of the client and manager is not so well developed on Linux, though it is not difficult. These notes may help, though they may be a little bit out of date:

Test versions of the core client, which may not be ready for public consumption but interesting to play with, may be obtained from

Building BOINC and applications

If you want to create your own BOINC project then you will need to get the BOINC source code and create your own BOINC application. These notes tell you how to set up the build environment and build the sample applications:
(These three pages are slowly being converted into a larger number of smaller pages on more specific topics. It's a work in progress, so please bear with me.)

If you have your build environment setup and working you can verify that everything is working well using a script I've written to automatically check out the latest code and build BOINC:

You'll likely only want to try this after you have your build machine properly configured.

BOINC Applications

The easiest way to learn to write your own BOINC application is to work your way through the examples listed below. Two of the examples come with the BOINC distribution, concat and upper_case. I have written the others as I have myself learned more and more about creating BOINC applications. I hope the notes are useful, at least for getting someone started.

BOINC examples: The source code for "concat" is in the BOINC source distribtuion in boinc/apps, while 'uppercase' is in the separate "boinc_samples" collection, in boinc_samples/uppercase. The "upper_case" program in boinc/apps (not the slight name difference) is for elementary testing of a project installation and is not a full working application.

Spy Hill examples: A collection of at least the last few versions of the source code and build files for my own sample applications is available as tarballs here.

The source code for some of the applications is now also available via CVS, via

cvs -d :pserver:anonymous@spy-hill.net/usr/local/cvsroot/boinc checkout src/apps
Please note however that not all of these applications are up to date.

BOINC Graphics

BOINC graphics are programmed in OpenGL, and use GLUT (the GL Utilities Toolkit), at least on on Linux and Mac. You can quickly test your graphics without BOINC using the 'boinclet', an interface between the BOINC graphics API and GLUT. You can also test your graphics with the science code by running the application in "standalone" mode. Just be sure that the input and output files already exist -- output files are not automatically created in standalone mode.

BOINC:

OpenGL Graphics

GLUT (GL Utility Toolkit)

BOINC does not use the full GLUT API, but it does borrow some functionality and functions. The amount of GLUT in BOINC is different on different platforms. On Windows GLUT is used just for fonts. On Linux GLUT is also used to open windows and so the Linux version of BOINC is more dependent on GLUT than the Windows version. (I will try to fill in more details later...)

Here are some useful links for GLUT:

JPEG Library

There are various versions of the JPEG code or at least headers available on the net or through different software distributions. You cannot go wrong by building the libraries yourself from the canonical sources, though it may take some extra effort. The library may be either static or dynamic, and you can now also build BOINC with SANS_JPEG to exclude dependence on the JPEG library (I've not yet tested this).

On Windows I built the JPEG library from the source here, and I created Solution and Project files for this which others can use:

On Linux you may already have the JPEG library installed on your system, though you need to use the "developer" package, which includes the proper headers. That is, you need the libjpeg-devel package, not just libjpeg. The library installed by this package may be either static or dynamic. I found that in Fedora Core 4 the library is static (libjpeg.a) while in Fedora Core 5 it is dynamic (libjpeg.so). Either will do, but you may have to adjust the Makefile for your application to use a dynamic library.

The one problem with using a dynamic library is that the executable will fail on a client computer where the dynamic library is unavailable. To avoid this you can build the static library from source if it is not available on your build machine. Doing so is easy:

I see no compelling reason to prefer use of a dynamic version of the JPEG library, while there is a good reason to link statically.

On Mac you can get a pre-built version of the JPEG library via Fink, or you can build the static library from source, as just described above. (It may also be included as Framework in XCode, but I'm not yet sure of that.)

BOINC Project Management

BOINC developers links (from the BOINC site)


Please send corrections or suggestions for improvement to
myers@spy-hill.net
http:// pirates.spy-hill.net /help/index.html Last modified: Sunday, 27-Jan-2008 14:46:32 EST