From the FAH (Folding@home) homepage (http://folding.stanford.edu/): "What does Folding@Home do? Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases. We use novel computational methods and large scale distributed computing, to simulate timescales thousands to millions of times longer than previously achieved. This has allowed us to simulate folding for the first time, and to now direct our approach to examine folding related disease." ------------------------------------ * How to run a FAH Client on Linux * ------------------------------------ Before You could run a FAH client, You must download it: http://folding.stanford.edu/download.html Currently there is only a Console Client for Linux (latest version is 5.02): http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe 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 successful retrieve of 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: mkdir /folding cd folding wget http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe chmod +x FAH502-Linux.exe or mkdir /folding cd folding curl -O http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe chmod +x FAH502-Linux.exe 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: md5sum FAH502-Linux.exe In case of FAH client version 5.02, You should get: 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe Note: FAH MUST be started in dedicated directory! BAD EXAMPLE - NEVER USE IT: /folding/FAH502-Linux.exe GOOD EXAMPLE: cd /folding ./FAH502-Linux.exe ANOTHER GOOD EXAMPLE: cd /folding /folding/FAH502-Linux.exe "BAD EXAMPLE" will make FAH "home" directory to "who-knows-where". **** Important: Read the FAH license! **** To read the license run: cd /folding ./FAH502-Linux.exe -license | less There are several ways of running the FAH client: A) To get FAH Linux Console client to run manually. The easiest way is to fire up a console, change to FAH dedicated folder You created and run a FAH executable. Example: cd /folding ./FAH502-Linux.exe First time You run FAH client it will ask You a couple of configuration parameters: User name [Anonymous]? Team Number[0]? Ask before fetching/sending work [no]? Use proxy [no]? Allow receipt of work assignments and return of work results greater than 5MB in size (such work units may have large memory demands) (no/yes) [no]? Change advanced options [no] (yes/no)? Note: To change the configuration later, You must run the client with -config (or -configonly) switch: cd /folding ./FAH502-Linux.exe -config After the configuration client should fetch a Work Unit (WU), proper Core for it and start counting finished frames: [17:41:13] Finished a frame (75) [17:42:43] Finished a frame (76) [17:44:14] Finished a frame (77) To stop the client press CTRL+C. B) To get the FAH Linux Console client run as background service. 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. 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: cd /folding ./FAH502-Linux.exe >/dev/null & 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): su - RegularUser -c "cd /folding; ./FAH502-Linux.exe >/dev/null &" If You ran first-time-run as root or as some other user than RegularUser then You must change FAH folder privileges: su - chown -R RegularUser.RegularUserGroup /folding 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...): cd /folding kill -15 $(ps -C $(ls *Core_*.exe) -o pid=) 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...): cd /folding kill -9 $(ps -C $(ls *Core_*.exe) -o pid=) 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: killall -15 FAH502-Linux.exe and if it is still not dead (check it with "/sbin/pidof FAH502-Linux.exe") then: killall -9 FAH502-Linux.exe 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. II) Another way to run FAH Client as service is to use 'screen' utility: 1) Fire up 'screen'; 2) Start FAH Client: cd /folding ./FAH502-Linux.exe 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; Official information: http://folding.stanford.edu/linux.html http://folding.stanford.edu/console-userguide.txt Some scripts: Installation & startup script for RedHat, Mandrake, SuSE, ... - finstall: http://ra.vendomar.ee/~ivo/finstall http://ra.vendomar.ee/~ivo/bfinstall Finstall FAQ: http://www.vendomar.ee/~ivo/finstallFAQ.txt Also there is (was?) a crontab based FAH installation script: http://macaddict4life.dhs.org/install_folding.sh fpd & qd: http://boston.quik.com/rph/fah.html xfpd: http://nekohako.xware.cx/xfpd/ qdcsv: http://homepage.mac.com/iam_kranki2/qdcsv.html FAH Diskless Farm: http://www.extremeoverclocking.com/articles/howto/FAH_Diskless_Farm_1.html KFoldingApplet: http://home.houston.rr.com/epasveer/ kfolding: http://members.shaw.ca/khessels/kfolding/ KFold monitor: http://www.kdfold.com/ EM3 & Linux: http://folding.octeams.com/modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=24&categories=Samba+Guide+for+EMIII&parent_id=20 GKrellFAH - a Folding@Home client monitor plugin for GKrellM: http://gkrellfah.hypercubepc.com/ http://gkrellfah2.sourceforge.net/ http://sourceforge.net/projects/gkrellfah2/ gDesklet+FAH: http://gdesklets.gnomedesktop.org/categories.php?func=gd_show_app&gd_app_id=233 Folding at Home Karamba script: http://www.navyrain.net/folding-karamba/ Fold-Server: http://fold-server.sourceforge.net/ FAH installer for MACOSX - InCrease: http://teammacosx.homeunix.com/software.html http://teammacosx.homeunix.com/forum/cgi-bin/ikonboard.pl?act=ST;f=3;t=83 Jmol protein viewer: http://jmol.sourceforge.net/fah/ Folding@Home Client Info: http://fci.bile.nl/ The FAH Wiki (Community Beta): http://fahwiki.kakaostats.com/ Background information http://folding.stanford.edu/faq.html http://folding.stanford.edu/FoldingFAQ.pdf Glossary: http://folding.stanford.edu/education/glossary.html Unix related http://folding.stanford.edu/linux.html http://folding.stanford.edu/OSX/OSX.html http://folding.stanford.edu/console-userguide.txt OpenBSD + FAH: http://schnarff.com/fah.html FAH on SME Server: http://lordsfam.net/staticpages/index.php?page=200310251328303 ------------------------------------ * Configuring the FAH Linux client * ------------------------------------ Note: Settings involving project/WU selection are strictly only a wishes not a absolute choices donator can make. Only exception to this is the deadlineless WU selection. There are some command line switches in FAH and to get the list of these You must feed FAH something it will not understand (such as '-help'): cd /folding ./FAH502-Linux.exe -help You will get something like this: Folding@Home Version 5.02 Usage: FAH502-Linux.exe [-option1] [-option2] ... Options: -config Configure user information -configonly Configure user information, then exit -queueinfo Get information on queued work units -delete x Delete item #x from work queue -send x Send result #x to server then exit. Use x=all to send all results -verbosity x Sets the output level, from 1 to 9 (max). The default is 3 -pause Pause after finishing & trying to send current unit -oneunit Exit after completing one unit -forceasm Force core assembly optimizations to be used if available -advmethods Use new advanced scientific cores and/or work units if available -freeBSD Make brandelf system call on downloaded cores. -openBSD Make elf2olf system call on downloaded cores. Please note the above recognized flags and try again. Press any key to exit. Folding@Home Client Shutdown. Using the FAH client switches -config cd /folding ./FAH502-Linux.exe -config You will get the following: Note: FAH Heading is presented first. It is always at the top of the log and will not be repeated after this presentation. Note: Please read the license agreement (FAH4Console-Linux.exe -license). Further use of this software requires that you have read and accepted this agreement. Folding@home User Configuration --- Opening Log file [October 1 22:31:30] # Linux Console Edition ####################################################### ############################################################################### Folding@home Client Version 5.02 http://folding.stanford.edu ############################################################################### ############################################################################### Arguments: -config [22:31:30] - Ask before connecting: No [22:31:30] - User name: Anonymous (Team 0) [22:31:30] - User ID = 123456789ABCD [22:31:30] - Machine ID: 1 [22:31:30] [22:31:30] Configuring Folding@home... User name [Anonymous]? [ Type in the name You like to be associated with. Use http://folding.stanford.edu/download.html section "How do I choose a username?". ] Team Number[0]? [ Same here but as this is a number then look http://folding.stanford.edu/cgi-bin/searchteamstats for existing teams or http://folding.stanford.edu/cgi-bin/createteam to start new one... ] Ask before fetching/sending work [no] (yes/no)? [ Useful mostly for modem owners. If You run FAH as service then pay attention to the fact that in usual circumstances You will not be able to "answer" to any FAH presented questions. Note: Typing of plain 'y' or 'n' are working, too. ] Use proxy [no]? [ If there is a proxy blocking the free way to the (Inter)network then fill in the blanks: ] Use proxy [no]? yes Proxy Name [localhost]? Proxy Port [8080]? Use username & password with proxy [yes]? Proxy Username? Proxy Password? Allow receipt of work assignments and return of work results greater than 5MB in size (such work units may have large memory demands) (no/yes) [no]? [ To gain more ground in terms of science the FAH WUs will need to be larger in terms or simulated time and protein sizes. As these new WUs are large in file size and memory footprint (even 100MB), the Pande Group has decided not to send out these WUs to the donators who are not aware the risks of running these. If Your machine can cope these WUs then answer with "yes". Note: FAH assignment server will check the machine capabilities in terms of available memory and will not send You these WUs if there is not suitable amount of it. ] Change advanced options [no] (yes/no)? [ To get a more out of FAH client then You should answer 'yes'. ] Core Priority [low] (idle/low)? [ idle = priority 34 and nice level 19; low = priority 28 and nice level 13; (low is actually at higher level of priority than idle.) ] Disable highly optimized assembly code [no] (no/yes)? [ This is a opposite of -forceasm as this will disable Gromacs optimizations. ] Interval, in minutes, between checkpoints (3-30) [15]? [ It will specify the interval of writing state of the running WU back to disk. Only Gromacs WUs are using this option. For some unknown reason the checkpointing time is about 3 minutes shorter than You specify. ] Request work units without deadlines (no-pref/no/yes) [no-pref]? [ no-pref = FAH client will get the WUs of whatever project are available/urgent; no = You wish to get the normal mix of Tinker, Gromacs & DGromacs WUs; yes = You wish to get deadlineless Tinker & Gromacs WUs; Note: Deadlineless WUs were designed to replace GAH WUs and the "yes" option is intended for computers what are slow or the uptime is too infrequent to get the WUs completed before deadline. Running projects & deadlines are http://vspx27.stanford.edu/psummary.html ] Ignore deadline information (mainly useful if system clock frequently has errors)? [no] (no/yes)? [ As WUs from newer projects do incorporate the deadline checking there is a need for reliable system clock, but when system clock can not be trusted (dead battery maybe?) then it is advisable to ignore the system clock. ] Machine ID (1-8) [1]? [ This is useful if You want to run multiple copies of FAH client on the same machine (multi CPU machines). In order to run multiple FAH clients on the same machine it is better to have every FAH client set up with different MachineID value. !!!Attention!!! "People running multiple F@H clients on a cpu--even on hyperthreaded P4s, are having a negative impact on the science because the WU aren't being turned in quickly enough. For most projects except Timeless Gro/Tinker, new work unit generation requires the return of prior work units. When the prior units are delayed because they are sharing CPU time with other clients, it slows down the project. The impact is becoming significant for Stanford, and they would appreciate if you would avoid doing it." !!!Attention!!! Depending of Your FAH setup procedures and amount of FAH clients You want to run on one box, You have to pay attention to MachineID values: 1. If You download separate FAH clients to different directories - You can set MachineID to 1 for each client and get unlimited number of FAH clients per box, but You have to start every client twice as there is now a "lock file" in /tmp/ and FAH will check the MachineID value from there: "A potential conflict was detected: Process 2608 is currently running and may also be a client with Mach. ID 1. Program will now exit. Upon restart, this check will not be done -- you may wish to check that no client is currently running in /folding/ before restarting." Or You can issue "rm -ifdr /tmp/fah" before You start another client. 2. If You copy one FAH directory to another then either remove the "machineindependent.dat" files or change the MachineID value, so each "cloned" FAH client has different MachineID value (maximum 8 these kind of FAH clients per box). Note: If You remove the "machinedependent.dat" files then there is no need to change MachineID values and You can run unlimited number of FAH clients per box, but You still have to start the clients twice or use the "rm -ifdr /tmp/fah" to get these going. ] After these configure steps it will download and start the "crunching" of WUs. Note: To stop the client, press [CTRL+C]. -configonly It is the same as "-config" except it will terminate the FAH client after You have configured it: cd /folding ./FAH502-Linux.exe -configonly -queueinfo Status of finished but unsent WUs (server down again? take a look at http://folding.stanford.edu/serverstat.html): cd /folding ./FAH502-Linux.exe -queueinfo Note: FAH Heading is presented first then: Arguments: -queueinfo [11:39:16] - Ask before connecting: No [11:39:16] - User name: Anonymous (Team 0) [11:39:16] - User ID = 123456789ABCD [11:39:16] - Machine ID: 1 [11:39:16] [11:39:16] Loaded queue successfully. [11:39:16] Printing Queue Information CURRENT QUEUE: 00 EMPTY 01 EMPTY 02 EMPTY 03 EMPTY 04 EMPTY 05 *READY "Folding@Home" (78) 171.64.122.111:8080 December 24 11:19:42 | January 29 11:19 06 EMPTY 07 EMPTY 08 EMPTY 09 EMPTY Folding@home Client Shutdown. You may try to force an upload of queued WUs or delete these... -delete x If some particular WU is refusing to leave a queue, if this is not a server problem and it has been there for about weeks then You can remove it: cd /folding ./FAH502-Linux.exe -delete 4 Note: FAH Heading is presented first then: Arguments: -delete 5 [22:47:01] - Ask before connecting: No [22:47:01] - User name: Anonymous (Team 0) [22:47:01] - User ID = 123456789ABCD [22:47:01] - Machine ID: 1 [22:47:01] [22:47:01] Loaded queue successfully. [22:47:01] + Benchmarking ... [22:47:09] Deleting work unit #5 from work queue... Folding@home Client Shutdown. -send x To force a upload a some particular WU (0..9) or 'all': cd /folding ./FAH502-Linux.exe -send 0 Note: FAH Heading is presented first then: Arguments: -send 0 [22:48:53] - Ask before connecting: No [22:48:53] - User name: Anonymous (Team 0) [22:48:53] - User ID = 123456789ABCD [22:48:53] - Machine ID: 1 [22:48:53] [22:48:53] Loaded queue successfully. [22:48:53] + Benchmarking ... [22:49:01] Attempting to return result(s) to server... [22:49:01] - Failed to send unit 00 to server Folding@home Client Shutdown. (Bad luck. Try to upload again, delete this WU or fold on...) -verbosity x Should give a different amount of "human-readable" information. 0 - minimum amount of information ... 9 - maximum amount of information cd /folding ./FAH502-Linux.exe -verbosity 9 ...FAH client will be started with given verbosity setting. -pause Pause after finishing and trying to send current unit. cd /folding ./FAH502-Linux.exe -pause Note: FAH Heading is presented first then: Arguments: -pause [16:15:28] - Ask before connecting: No [16:15:28] - User name: Anonymous (Team 0) [16:15:28] - User ID = 123456789ABCD [16:15:28] - Machine ID: 1 [16:15:28] [16:15:28] Loaded queue successfully. [16:15:28] + Benchmarking ... [16:15:35] [16:15:35] + Processing work unit ... [17:28:20] Finished Work Unit: [17:28:21] ARC file integrity verified [17:28:21] logfile size: 2324 [17:28:21] Leaving Run [17:28:24] - Writing 264148 bytes of core data to disk. [17:28:24] end (WriteWorkResults) [17:28:25] - Shutting down core [17:28:25] [17:28:25] Folding@Home2 Core Shutdown: FINISHED_UNIT [17:28:25] CoreStatus = 64 (100) [17:28:25] Sending work to server [17:28:25] + Attempting to send results [17:28:36] + Results successfully sent [17:28:36] Thank you for your contribution to Folding@home. [17:28:36] + Number of Units Completed: 538 [17:28:36] + Paused after finishing unit [17:28:36] Press Enter to continue, Ctrl-C to exit... -oneunit It is almost the same as "-pause" except it will terminate the client when the WU is done. cd /folding ./FAH502-Linux.exe -oneunit -forceasm As Gromacs incorporates some/heavy SSE/SSE2/3DNow/Altivec optimizations, the calculations may go (terribly) wrong or core may crash or ... and FAH client may decide that optimization is to blame of this and will turn off the optimizations. Usual "crunching" penalty of this type of event is quite heavy (50% on AMD Athlon XP) and if You think it is a false alarm (each "crash" must be studied carefully and using this switch "just in case" do not make any good to FAH project!) then use this switch to turn these optimizations back on. Note: Tinker core do not have any settable optimization so this switch does have no effect in case of these. The -forceasm on Intel CPUs will result the usage of SSE/SSE2, AMD also will get SSE/SSE2 and Apple Altivec. If the requested extensions are not available, Gromacs will go back to unoptimized code. There was a serious issue with AMD running SSE optimized code and because of it the usage of SSE optimizations on AMD CPUs was not advicable. Eventually (it took "only" one year) AMD cooperated with Pande Group/Gromacs developers and identified the problem: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25759.pdf Now there is no direct need for the flag as Gromacs cores run SSE by default even on AMD CPUs. Note: If the Gromacs is using SSE, You will see "Extra SSE boost OK." message. cd /folding ./FAH502-Linux.exe -forceasm -advmethods It will turn the client to a Beta testing platform. If You run a FAH client with this switch then occasionally/constantly this client will be fed with experimental Cores and WUs so at the worst case there may be (some?) crashes (I have never seen any caused by FAH but ...) and/or degradation of "received points". cd /folding ./FAH502-Linux.exe -advmethods -freeBSD This will make it easier to run FAH client under FreeBSD (or any other BSD). cd /folding ./FAH502-Linux.exe -freeBSD -openBSD This will make it easier to run FAH client under OpenBSD. cd /folding ./FAH502-Linux.exe -openBSD [eof]