Tuesday, September 23, 2008

How to install Folding@home in Ubuntu using origami

This is a quick "how to" tutorial in order to provide some of your CPU time for a good cause, which is called Folding@home. As they explain it at the F@h website:
Folding@home is a distributed computing project -- people from throughout the world download and run software to band together to make one of the largest supercomputers in the world. Every computer takes the project closer to our goals. Folding@home uses novel computational methods coupled to distributed computing, to simulate problems millions of times more challenging than previously achieved.

There are other projects out there, like BOINC. In that case, I suggest to install boinc-manager (menu Applications → Add/Remove) and check out Rosetta.

Now let's get down to business. You need to pick a name, which can be anything you like, as long as it's not taken - you can also pick a team, but that's optional. You do not need a password for a username, but you need one in order to create your own team.
Tip #1: A person is called a "Donor" in F@h.

Next is the application. Ubuntu is based on GNU/Linux, and the (good? :P) people of Stanford have created a console client. Despite the fact that we are left without a graphical interface, we can still get the client program and use it.

It's time to visit our good ol' friend, the Terminal (or Konsole for KDE users). Once you start terminal (menu Applications → Accessories → Terminal) we will install the origami package:
sudo apt-get install origami
Tip #2: Type in your password and press enter if you are asked to do so

The following step is to download and install the f@h client program.
The origami manual has several examples:
origami install -u Joe -t 45104
This example will install the Folding @ Home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team.

origami install -u Joe -t 45104 -c1
This example will install the Folding @ home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team, using the i386 Folding @ Home client and
toggling the cron option to auto-stop between the hours of 8:00am
and 5:00pm.

origami install -u Joe -t 45104 -p amd64
This example will install the Folding @ home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team, using the amd64 Folding @ Home client and
toggling the cron option to auto-stop between the hours of 8:00am
and 5:00pm.

Tip: If you are on your own and don't have a team, I urge you to join TeamUbuntu ( 45104 ) or UbuntuForums ( 45399 ).

Tip #3: Don't know whether you have a 32-bit or 64-bit operating system (OS)? If you're not sure, execute this:
uname -m
It shows whether you have 32-bit (x86/i386) or 64-bit (x86_64/amd64) OS. 64-bit users will want to fully use their processors, so they need to use the -p amd64 argument.

In short, the recommended command for 32-bit is:
sudo origami install -u YourName -t 45104 -c1
..and for 64-bit is:
sudo origami install -u YourName -t 45104 -c1

Tip #4: origami installs a crontab if you use -c1 in its own system user 'origami'. If you want to edit the hours it starts/stops (after you install it), execute: sudo crontab -u origami -e

Once your f@h client is installed, you have finished the installation! You can see how your folding process goes:
sudo origami status

Tip #5: Your origami configuration files are found in the /var/lib/origami/ folder. For example, my current CPU #1 configuration file is /var/lib/origami/foldingathome/CPU1/client.cfg

Tip #6: You can give a small boost to your folding process by making it use really low CPU instead of running when it's just idle. Execute:
sudo origami 
Wait for it to stop, then run your text editor to edit the configuration file:
gksu gedit /var/lib/origami/foldingathome/CPU1/client.cfg
Add the following at the bottom of the file:
[core]
priority=96
Save and close your text editor, and restart origami:
sudo origami start

Enjoy folding proteins folks! :) You'll actually be helping out various medical fields, such as Alzheimer's and Huntington's disease researching.

Finally, take a look at these sites:
http://en.wikipedia.org/wiki/List_of_distributed_computing_projects
http://www.gridrepublic.org/
http://game.bakerlab.org/portal/

2 comments:

Anonymous said...

Nice tutorial !! Thnx

For people that are uncomfortable with command line client let me mention that the Barkley University has released a GUI application called BOINC, to merge all this project and make the easy to install.. You can even have multiple projects running on the same computer.
There are packages in the repositories of the most known distros or you can download it from

http://boinc.berkeley.edu/download.php

Christer Edwards said...

I am the author of origami. I stumbled across your site while searching for origami usage "in the wild".

If you're still folding with origami I'd like to hear about it. Visit my URL to find contact information.

- Christer