Running the FAH client on Linux

This page is based on The FAH Linux HOWTO.

From FAH (Folding@home) homepage (http://folding.stanford.edu/):

 

Downloading and Installing the Client
Before You could run a FAH client, You must download it: http://folding.stanford.edu/English/Download Currently there is only a Console Client for Linux (latest versions are 6.02/6.24beta): http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz http://www.stanford.edu/group/pandegroup/folding/release/FAH6.24beta-Linux.tgz

1) Download this FAH client and place it to a separate folder as this client will create a set of files and folders when it is started; 2) After successfully retrieving the client set the binary as executable; Note: All examples in this document must be run at command prompt (such as console/konsole/xterm/...).

Example:

 

or

 

NOTE: When upgrading the FAH client then delete old FAH4Console-Linux.exe before getting new one with "wget"/"curl". Check the binary with md5sum/md5 to verify You have unmodified binary. Correct md5sum values for FAH clients are available at http://www.stanford.edu/group/pandegroup/folding/download.html.

Example:

 

In case of FAH client version 5.04, You should get:

 

Read First
Note: The FAH binary MUST be located in the Current Working Directory ($CWD) to work properly! BAD EXAMPLE - NEVER USE IT:

 

GOOD EXAMPLE:

 

ANOTHER GOOD EXAMPLE:

 

'''**** Important: Read the FAH license! ****''' To read the license run:

 </tt>

Running the Client Manually
The easiest way to run the FAH client is to fire up a console, change to FAH dedicated folder You created and run a FAH executable.

Example:

 </tt>

First time You run FAH client it will ask You a couple of configuration parameters:  </tt>

Note: To change the configuration later, You must run the client with -config (or -configonly) switch:

 </tt>

After the configuration client should fetch a Work Unit (WU), proper Core for it and start counting finished frames:

 </tt>

To stop the client press CTRL+C. B) To get the FAH Linux Console client run as background service.

<b>Q: Why to run FAH as a service? A: Service by definition will run on background and will be started when You boot up Your machine and will be "killed" when You turn off the box. It is the most effective way to increase the productivity of the FAH client and all the rest what will come out of it.</b>

I)	After previous steps (download and manual run) add couple lines of code to the end of rc.local (/etc/rc.d/rc.local) file:

 </tt> Note: This script will run FAH under root privileges as rc.local file will be run under root privileges (all created files/folders will be under root privileges, too). To overcome this and to run FAH as regular user (RegularUser must be set to one of user who is present on this system):

 </tt>

If You ran first-time-run as root or as some other user than RegularUser then You must change FAH folder privileges:

 </tt>

Only bad thing is that there is no easy (as easy as pressing [CRTL+C]) way to stop this client anymore. As FAH will start up several processes then there is nothing else to do than hunt down and kill these processes. To make our life a little easier FAH client will die if the running cores die (should be a rule but not always...):

 </tt>

Note: This is a "polite" termination (waiting FAH client and cores to finish their job) and if ps -ax should still show some cores running (newer cores may have this bug) then use a forced termination (no more waiting...):

 </tt>

Attention! As FAH and Core different versions tend to respond differently to "killing" of these then it may be advisable to issue the same kind of "kill routines" to FAH client itself, too:

 </tt>

and if it is still not dead (check it with "/sbin/pidof FAH504-Linux.exe") then:

 </tt>



Note: To get a FAH client to run on multi cpu machine, You must install as many FAH clients to separate directories as there are processors in Your machine and You may need to configure Your clients to use different Machine IDs (look to "Configuring the client"). Note: Never copy FAH files between separate clients as the usual outcome is more often bad than good.

Running via screen
Another way to run FAH Client as service is to use 'screen' utility:

Usage:

1) Fire up 'screen'; 2) Start FAH Client:

 </tt>

3) If You want to leave this console/session and let the FAH run press CTRL+a+CTRL+d or run 'screen -d' on this computer (from another console/session); 4) To regain the FAH session run 'screen -r' (if You have multiple screen utilities running then You must specify it).; 5) Goto 3;

Or, if you want to use screen to automatically launch folding @ home, add  </tt> To rc.local, as above, which will start a screen session as YourUsername in the background so you can use screen -r then control-C to shut it down.

Running as an Init Script
Yet another way to run the Linux Folding @ Home client is through init scripts. This will allow Folding @ Home to run as a daemon in the background at system startup.

NOTE: You will need to have configured the client before using this init script. You can configure the client by running the following command

 </tt>

This init script was made for Ubuntu, but will probably work on most Debian-based distributions.

 </tt>

Copy and paste the above script into a file named 'folding' in your home folder, then run the following commands. These commands set ownership to root, give the script execute permissions, and drops it in your /etc/init.d folder.

<tt> </tt>

To enable the folding client to run at startup, use the following command to add it to the startup sequence.

<tt> </tt>

Official information: http://folding.stanford.edu/linux.html http://folding.stanford.edu/console-userguide.txt