• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

The Ultimate FAH Install Guide

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Wedo

Senior Kitty Power!
Joined
Oct 31, 2001
Location
Lost Angeles
***I penned this thread in 09/03 and it was in need of a serious redo. Team member Dark_15 completed an exquisite monster edit and re-formatting recently (04/05). He also whipped up the .bat files for starting/stopping the service as well. My many thanks for his hard work.***

Since you have made the effort to come to our forum and want to install folding, here's the "How-To" for you. There are numerous ways to fold which can be as easy as downloading the program and running it or as complex as building a diskless farm (each cpu/mobo is without a HD) while pulling data from a server or using a CDROM based OS.
How simple or complex is all up to you. However, there are ways to fold which will result in less maintenance for you and a higher output from your machine. The following is a list that will explain the most widely used ways to install FAH and hopefully make it easier for the new team members to get started and the veterans to find tools to create that farm of all farms or stretch their mad skillz to new heights. If there is something discussed that you don't understand (flags, Core's, Diskless stuff etc) just read on as it will probably be explained below or you can always ask in the forum.



The One-Click Install


Essentially, the One-Click does everything in one click that you do long hand when you download the client, make the directories, hit "Start/Run/[some directory]/FAH502-Console.exe -config" and answer all the setup questions. In addition, the greatest benefit of the One-Click is that it sets FAH up as a service so when ever the computer is powered up, it's folding.

Most FAH veterans from our team carry the One-Click around on a floppy or USB pen drive with their client.cfg already edited. This enables a quick plug n' borg when you find a rig and have permission to install FAH.

The first four sections deal with the various version of the One-Click FAH Install program as the six versions are split into two categories, with or without the -advmethods flags. All versions have the four basic flags (-local -service -verbosity 9 -forceasm) as they seem to be a popular choice amongst the power folders.

Each version comes either with or without the -advmethods flag. The rule of thumb with the -advmethods flag is that if the rig has a cpu of greater speed than 2Ghz, use the -advmethods version, if the cpu is less than 2Ghz, use the regular, or non-advmethods version.

There is an extra edit required in the client.cfg if you want to fold BigPacket WU's. There has been ample discussion about this, but here's the basic rules: If you have more than 1GB of RAM per CPU, then you can fold BigPackets. If you want BigPackets, simply edit the client.cfg's to "bigpackets=yes". I find that most of my borgs are not worthy of BigPacket fun, so the default is set to "no".



Windows 2k/XP One-Click versions with -Advmethods

  • Single CPU with -advmethods
    This one-click installer is the simplest way to install FAH on any Windows 2000 or XP Machine. Includes -advmethods flag.

    Installation Instructions:
    1. Download the file listed above
    2. Edit the client.cfg file with NOTEPAD to your username and bigpackets answer ("yes" or "no" - default is "no").
    3. Run the *.exe file.
    4. The One-click will then create a directory (C:\Program Files\FAH), download the FAH console client, creates and installs FAH as a service in the registry, starts the FAH Service, and cleans up the extra download files after the install is completed.

  • Dually/HT with -advmethods
    This one-click installer is the simplest way to install FAH on a Windows 2000 or XP Machine that has either two processors or a single P4 Processor with Hyperthread enabled. Includes -advmethods flag.

    Installation Instructions:
    1. Download the file listed above
    2. Edit both client.cfg files with NOTEPAD to your username and bigpackets answer ("yes" or "no" - default is "no").
    3. Run the *.exe file.
    4. The One-click will then create a directory (C:\Program Files\FAH), download the FAH console client, creates and installs FAH as a service in the registry, starts the FAH Service, and cleans up the extra download files after the install is completed.

  • Quad version with -advmethods
    This one-click installer is the simplest way to install FAH on a Windows 2000 or XP Machine that has either Dual Processors with Hyperthreading or Quad CPU's. Includes -advmethods flag.

    Installation Instructions:
    1. Download the file listed above
    2. Edit all four client.cfg files with NOTEPAD to your username and bigpackets answer ("yes" or "no" - default is "no").
    3. Run the *.exe file.
    4. The One-click will then create a directory (C:\Program Files\FAH), download the FAH console client, creates and installs FAH as a service in the registry, starts the FAH Service, and cleans up the extra download files after the install is completed.


Windows 2k/XP One-Click versions without -Advmethods

These installs just like the installs listed above, but lacks the -advmethods flag. This is especially useful for sub 2ghz processors and other machines that have trouble with the -advmethods flag.



Windows 9x One-Click Version

  • Windows 9x One Click
    Nitro-Boie made this nice batch install for Win9x machines.

    Installation Instructions:
    1. Download the file and unzip it to the desktop.
    2. Run the *.bat file.
    3. Restart the machine.


The ~UberBuzzard FAH Windows Installer Package
  • UberBuzzard Installer
    Buzzard from the OCAU team made an excellent install for people who want to chose all the options themselves (flags, run as a service, install directory etc).


FAH Network Installs

Say you're lucky enough to find yourself in the data center for your local school district and the admin is FAH friendly. You have 10 minutes to load FAH on as many computers as you can before he has to go reload on caffeine and Doritos, what do you do?
You have 4 options:

  1. Ultimate FAH Network Installer
    Use the FAH Deployer that was originally created by Doc-of-FC (Brenton) of OCAU Forums and massively overhauled by Wedo. Then our own team member Dark_15 took the Deployer to new levels and solved some issues with domain networks.

    And finally...

    Helsyeah, another team 32 member, finished the whole thing off with his own improvements and changed the name to the not-very-original-but-very-descriptive title of "FAH_Network_Installer." :D

    Installation Instructions:
    • Download and unzip the file.
    • Read the README thoroughly!!

    Pro's: Fast, easy, gets FAH installed on 10 to 10,000 computers in minutes.
    Con's: There are no cons. This is THE best network installer available.

  2. DGROM's RemoteService Installer
    Created by the folding god DGROMS of OCAU, this has been modified by Wedo to add the -advmethods and -forceSSE flags to the registry and also uses the FAH 4 client.


    Installation Instructions:
    • Download and unzip the file.
    • Read the README thoroughly!!

    Pro's: Easy, with a little configuring you can get it to work with duallys too.
    Con's: You have to make about four entries into a batch file for each client which can be a pain if you are installing to more than five machines. Uses the older FAH4 client.

  3. Microsoft Installer (MSI) FAH Installer
    Uses an MSI Package on the network. If the network you are installing on has a domain controller and is running nt/w2k/w2k3, you can use the network install function with the One-Click's .msi file and push FAH out to each machine.

    Installation Instructions:
    • Download and unzip the file.
    • Read the README thoroughly!!

    Pro's: Fast, gets FAH installed on 10 to 10,000 computers as soon as they all reboot.
    Con's: Not all networks run a domain controller nor are all networks Windows-based. Requires some semi-advanced networking skills. Computers must be rebooted to start the client. Also uses FAH4 client and needs to be updated.

  4. Grab a floppy or pen drive and start running.
    The last resort... and probably the most desperate... :D

    Pro's: Easy as most people are probably more familiar with installing a borg from a floppy or pen drive.
    Con's: 10,000 computers, one floppy. That's a lot of coffee.


Alternate Linux FAH Installs

We have some sick talent on our team. Talent that makes American Idol look like the Gong Show. Arkaine, David, and Gator have worked for hours behind the flickering lights of their monitors to give us more choices for folding than there are reality TV shows on Fox. We also have some farmers that could rival the potatoe production of Idaho and I'm sure our creativity far exceeds those dirt guys as well. Here's a list of possible alternative solutions for FAH that include Linux and Farming.

  • Overfoldix
    If I remember correctly, David took the work Gator did and in open source fashion created the original diskless client that is only 17MB and will run sans HD.


  • Overclockix
    Say you want to build a farm with as little hardware as possible, Arkaine has made the proggie for you. He crafted an install out of a Linux distro that will run from a CDROM so each layer of your farm needs only a CDROM drive in addition to the normal cpu, mobo, and memory.



How to Stop/Pause the FAH service for benchies and gaming

Let's say you were brilliant enough to install FAH as a service so it runs 24/7 even when the computer is logged off but now you need an easy way to stop the service. I'm a team member of OCG (OverClocked Gamerz) and when ever I play a match I stop my service, turn off Anti-Virus, and pretty much stop every extra goody I have running. It probably does nothing to help, but I like to know that my computer is 100% focused on killing other people (virtually, of course).

We now have the Batch Files already pre-made for you! All you simply need to do is download one of the attached files at the bottom of this post.



Very Important!When you use the stop service it will take about 10 to 15 seconds to stop the service completely as the Core_XX.exe takes time to disengage. Do not start the service before it has completely stopped. This will cause WU corruption and your instance will just sit there with error messages in the log file. Check task manager to verify that the service has stopped prior to restarting.

The "sc" calls on sc.exe (which should be in your \Windows\System32 directory, if not, get it here. The program is merely a command line services control program that enables you to manage services from the cmd window.

Use this as a tool, but don't stop the service unless you need to as there are proteins to fold!



The "Flags" explained

Thread on Flags

You'll notice that in the above registry export file under the second key (\FAH\Parameters) there is a little line called "AppParamters", herein lies the much talked about option flags for running FAH.

Here is your guide to the flags:

  • -local
    Used with multiple cpu rigs (dually, HT, quad cpus etc) to set up FAH as one client per one cpu. If this flag isn't used on a dually and two instances are running, your rig will show up as running at 50% in task manager as both instances will split the processing power of one cpu leaving the other to sit at idle.

  • -service
    Sets FAH as a service. Very important flag that will tell your rig to use srvany.exe to run FAH4Console.exe as a service instead of running the client in the console window. Thereby keeping your rig folding even when no one is logged on.

  • -forceSSE
    Forces SSE use for AMD's. P4's do not need this flag, but it doesn't hurt so it's including in most automated FAH installs like the One-Click.

  • -forceasm
    Forces the use of 3DNow and SSE. In some instances, if a power failure occured, your computer locks up (not due to FAH), or your kid brother kicks over your tower, FAH will restart in a form of "safe mode" that doesn't use 3DNow/SSE. This will cause your machine to fold much slower so this flag forces the higher setting on no matter how the client was turned off previously.

  • -advmethods
    The gromacs flag. This flag tells FAH to only seek out Gromacs (a type of protein) from the Stanford servers. Gromacs used to be the end-all-be-all of point production. However, recent changes to the point value for Tinkers have made this flag counter-productive on AMD rigs.

  • -verbosity 9
    Gives you the uber update in your log files. More info will be written in case your having issues or are just interested in what FAH is doing.



FAH in the registry

(Appropriate Disclaimer here: editing you registry can kill your OS, blow up your computer, and make your pets pee on your carpet. Wedo, The One-Click, and all partners therein are not responsible for your actions on your computer. Do so at your own risk)

To set up FAH in the registry, you need to only make a handful of registry additions in one location. An example of an exported install reg file is located below (one could copy/paste this into notepad, save it as "FAH-Install.reg" and merge it if need be):

---copy below this line ----

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FAH]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\
6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,46,00,41,00,48,00,31,00,5c,\
00,73,00,72,00,76,00,61,00,6e,00,79,00,2e,00,65,00,78,00,65,00,22,00,00,00
"DisplayName"="[email protected] 1"
"ObjectName"="LocalSystem"
"Description"="Uses your computer's spare CPU cycles to solve complex scientific problems."

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FAH\Parameters]
"Application"="D:\\Program Files\\FAH\\FAH4Console.exe"
"AppDirectory"="D:\\Program Files\\FAH1"
"AppParameters"="-local -service -forceSSE -advmethods"

---copy above this line----

In the above settings, "Type", "Start", and "ErrorControl" are DWORD hex values. When you create the keys manually, you would use the actual values of:

Type: "16"
Start: "2"
ErrorControl: "1"

and Windows will convert them to hex values. Furthermore, "ImagePath" is a string value that should match the directory for your FAH installation, such as: "C:\Program Files\FAH\srvany.exe"

Note the reference to the 'srvany.exe' here, this is what kicks FAH into a service.

In addition, for additional client installs (dually/quad installs) the service name is changed in the registry from FAH to FAH1, FAH2 and so on. The appropriate paths would also have to be placed in the registry entries to point to directories such as C:\Program Files\FAH\FAH1 and FAH\FAH2 etc.
 
Last edited:

mdcomp

Classic Administrator
Joined
Nov 23, 2001
Add which cpu's work with SSE Boost, that would be helpful. Nice job!!!

Matt
 

flixotide

Member
Joined
Oct 29, 2002
Location
Denmark
Hey Wedo...

Although a bit opposed to genre, I would like to know if there's an uninstall script avaible to use with ADS?

Lets say I get a go at 1000 puters for a month, install using the one-click .msi and then have to remove em again once the time's up. I would need a script to remove registry entries, directories etc.

As I am too bored to do it myself, I would just love to see one such script... would grant me some excellent boosts here and there.

Cheers, Flix
 

nikhsub1

Unoriginal Macho Moderator
Joined
Oct 12, 2001
Location
Los Angeles
A few requests :D
1. Make a version of One-Click that installs into the WINDOWS directory, NOT program files... Most never venture into that WINDOWS folder so it will be better hidden. ALSO name the folding folder FAH and NOT [email protected]

2. Now we should have 2 versions.

3. Make the above 2 versions WITHOUT the -forceasm flag for those of us with farms that do NOT want to run that flag for fear of the machine crashing, as my farm likes to do with the -forceasm flag. The -advmethods flag is still needed.

4. This should bring us to 4 versions.

Looks great Wedo! If I could just get a one click that installs into the WINDOWS folder as FAH with only the -advmethods flag I will be a happy man! On the 80+ XP 2400's I can NOT use -forceasm as I do not want the rigs to crash!
 

wannaoc

Member
Joined
May 6, 2003
Location
Buried in UPS packages
Change the value of the key to: -service -advmethods –forceasm

Can I just put -service -advmethods as I don't want to chance crashing. Also what does this do... in detail please. Is this a Gromac thing and what is a Gromac? TIA.
 

flixotide

Member
Joined
Oct 29, 2002
Location
Denmark
nikhsub1 said:
A few requests :D
1. Make a version of One-Click that installs into the WINDOWS directory, NOT program files... Most never venture into that WINDOWS folder so it will be better hidden. ALSO name the folding folder FAH and NOT [email protected]

Sayyyy.. Nikhsub1.... this sounds a lot like unethical "I wanna hide this stuff from admin people" folding!!! Huh? Dare me man if thats not so!

*thwaps Nikhsub with a large trout* Shame on you dude!

Flix
 

modenaf1

Member
Joined
Mar 1, 2003
Location
the terran system
nikhsub1 said:
A few requests
1. Make a version of One-Click that installs into the WINDOWS directory, NOT program files... Most never venture into that WINDOWS folder so it will be better hidden. ALSO name the folding folder FAH and NOT [email protected]


YES! YES!! if it goes in some not veiwed directory, AND it would be nice if the network install was 1 click, AND it folded gromacs and used SSE :-D

*click* *modenaf1- :-D*
*click* *modenaf1- :-D*
*click* *modenaf1- :-D*
*click* *modenaf1- :D*
*click* *modenaf1- :D*
*click* *modenaf1- :D*
*click* *modenaf1- :D*
*click* *modenaf1- ocau=pwned*

j/k :D

Cheers!
-f1
 

modenaf1

Member
Joined
Mar 1, 2003
Location
the terran system
i give this thread 5 stars for its excellence :D

btw, how does this work? sometimes when i do it it gives the stars, and sometimes it dosnet give any stars. does it need to be a "hot thread" for stars? or does it have to be stickied?
 

Arkaine23

Captain Random Senior Evil
Joined
Nov 8, 2001
Here is a how-to service install for Linux (long version)

New installer script!!!

1) includes simple scripts to stop, start, reconfigure, and view progress
2) works for up to 8 cpu's (physical or HT)
3) selects -advmethods if SSE is available
4) enables big packets if enough ram is installed
5) each client will have a flags file where you can manually alter the flags used by the launching script
6) when run for the first time it will automatically grab the newest linux folding client available
7) reports info about the service installed including cpu speed, number of clients, and flags used
8) includes readme with instrcutions

Basically-
extract the tarball
become root using the su command
cd /directory/with/extracted/files
chmod +x *
./install_fah username (where username is the name of a regular user on your system)


http://overclockix.octeams.com/foldinstaller.tgz







Or follow the lessons below and learn a little bit about scripting-







If you follow these instructions, folding will run as a service on your linux box. It will start at boot-time. You will also create a few custom commands that will make it easy to stop, start, reconfigure user/team, and view the folding logfile with simple one-word commands. So this goes a bit beyond just a service install.


Part 1. Shell scripting

These scripts will make managing your folding a little easier and will be step one in setting it up as an automatic service. Only a very slight familiarity with linux is assumed.

Create some new text files by right-clicking your desktop and choosing create new text file. Paste the following scripts into these new test files. For all of these scripts, change the FoldDir variable so that it points to your actual folding directory. For the purposes of this guide, you will also want to make sure to rename your folding client .exe file to FAH502-Linux.exe. If you have not already, you need to make FAH502-Linux.exe executable.

cd /your/folding/directory
(I suggest /home/your_username/fold for the folding directory)
chmod +x FAH502-Linux.exe


Note: I use -advmethods and -forceasm as examples throughout these scripts because I fold big packets. Be sure you know which flags are best for your CPU when using this guide to write your own scripts. At this time, enabling big packets in client.cfg and -advmethods -forceasm[ is best if you have at least 256mb ram and an SSE-capable CPU.

Script I (I usually name this one foldon)

#!/bin/sh
#This script starts [email protected] as a background service
# it uses gromacs flags
# Change your FoldDir variable to refelct your actual folding directory's location
# your folding client's .exe should be named FAH502-Linux.exe
FoldDir=/path/to/your/folding
cd $FoldDir
./FAH502-Linux.exe -advmethods -forceasm > /dev/null &
echo "Starting [email protected] service..."

Script II (I call this one viewfold)

#!/bin/sh
# This script displays a portion of the folding log file
# tail -20 can be set to any number you want, just not too large
# that will be the number of lines displayed
# Change your FoldDir variable to refelct your actual folding directory's location
FoldDir=/path/to/your/folding
more $FoldDir/FAHlog.txt | tail -20


Script III ( I call this one foldoff)

#!/bin/sh
# This script safely kills [email protected]
killall -15 FAH502-Linux.exe


Script IV (this one's optional. Its an easy way to reset the client.cfg file)

#!/bin/sh
#This script starts [email protected] and uses gromacs flags
# It also runs the -config option to let you enter new user information
# Change your FoldDir variable to reflect your actual folding directory's location
# your folding client's .exe should be named FAH502-Linux.exe
FoldDir=/path/to/your/folding
cd $FoldDir
./FAH502-Linux.exe -configonly



Part 2. Preparing the scripts for use.

Now, hopefully you've got some new text files and have saved them and named them. The name will also be the command to launch the script from a terminal.

Now you'll want to move them to a location where other executables are kept. I suggest /usr/local/bin. You might need to be root in order to write to that directory, so become root by using the su command. Replace your_user_name in the commands below with your normal username.

su
(enter root's password)

mv /home/your_username_here/Desktop/foldon /usr/local/bin
mv /home/your_username_here/Desktop/foldoff /usr/local/bin
mv /home/your_username_here/Desktop/cfgfold /usr/local/bin
mv /home/your_username_here/Desktop/viewfold /usr/local/bin


Now you need to make these scripts executable.


cd /usr/local/bin
chmod +x foldon
chmod +x foldoff
chmod +x viewfold
chmod +x cfgfold

(That can probably all be done as one command, but for new linux users, repetition of common commands is a good thing. )


Part 3. Making it start when the system boots

This procedure can vary depending on the distro you have. You will either be entering a command into a file (rc.local method), or you will be creating a link to your script in a startup folder (rc5.d method). You should still be root, but if not, become root with the su command.

su
(enter root's password)


Look at your system's /etc directory for some specific files.

cd /etc
ls

You want to find rc.local if it exists. Or if it doesn't, then rc5.d, rc3.d, and rc2.d.


For rc.local:


Open rc.local with a text editor. If you have one you like, good. My example uses vi.

vi rc.local


(press the i key to insert text and type the following line, but replace "your_username" with your normal username)

su -c "/usr/local/bin/foldon" your_username

(To save in vi, press the escape key followed by a :wq and then press enter.)



For rc5.d, rc3.d, and rc2.d:

These folders contain shortcuts to system services (also called init scripts because these scripts can be issued to start, stop, or restart system services). Rc5.d is run control 5 which means the stuff isnside it runs when you boot straight to graphical mode (default from many distros and especially preferred by newbies). Rc3.d and rc2.d are both run levels that go to a text prompt, aka text mode. The difference between them is that rc3.d starts more networking services than rc2.d. If you are unsure you can edit all three of these, though you actually only boot into one of these run levels by default.

ln -s /usr/local/bin/foldon /etc/rc5.d/S99foldon



Step 4. Optional, and only needed if you modified the rc#.d file(s). If you edited rc.local, skip this section.


One problem is that folding will be run by root instead of by an ordinary user. This is not a big deal, but you should run it as a normal user for the sake of this paranoid administrator.


You can leave it as is, or you can do this one last step:

cd /usr/local/bin
cp foldon fold
vi foldon

(press the i key to insert text. Here's what you're looking at. The text in red is what you need to add.)

#!/bin/sh
#This script starts [email protected] as a background service
# it uses gromacs flags
# Change your FoldDir variable to refelct your actual folding directory's location
# your folding client's .exe should be named FAH4Console.exe
FoldDir=/path/to/your/folding
cd $FoldDir
su -c "./FAH502-Linux.exe -advmethods -forceasm > /dev/null & " your_username_here


(Make sure to replace your_username_here with your normal username. Save the file by pressing escape and then :wq and enter)

Run this command as root to make sure the permissions for everything are set correctly:
chown -R username:username /your/folding/directory
(where username is the user who will be running [email protected])
Launch the client for the first time as the regular folding user with the cfgfold script and configure it.

Part 5. Congratulations!!


It's not very hard to make desktop icon shortcuts to your scripts or to place shortcuts in a "quick launch bar" in the same style as a windows system. Tune in next time for more Linux tweaking tips....


Please report any errors in this how-to so that they can be corrected ASAP. Updated for v5.02 [email protected]
 
Last edited:

modenaf1

Member
Joined
Mar 1, 2003
Location
the terran system
hey wedo, just wondering, any estimated time when the super dooper network installer will be ready?

oh and i will not have a chance to practice installing it, so it isnt hard is it?
 

bubba gump

Member
Joined
Sep 19, 2002
Location
CA, USA
Hmm....I seem to get an error when I try to foldon...I did this after I had done the necesary steps to not run [email protected] as root...it will start the client when I did cfgfold, but it won't start it when I do foldon...and it seems to work when I do "fold" (the older script that we copied).....

My script is the exact same one that is up there (with the necesary changes of course, which I know are correct)

and this is the error I get..

bash: line 1: FAHlog.txt: Permission denied

Hmm....good scripts though :)

Fold and Frag on
Brian
 

Arkaine23

Captain Random Senior Evil
Joined
Nov 8, 2001
sudo chmod 777 /home/knoppix/fold/FAHlog.txt

It must be set writeable only to knoppix and that's why root can't write to it or vice versa.
 

bubba gump

Member
Joined
Sep 19, 2002
Location
CA, USA
Well, w/win9x there is an application called FireDaemon or FireDeamon or something like that that allows you to run NT (NT4, W2k, XP, etc) services on Win9x, I'll try to find al ink for it...hopefully..that and an install guide for [email protected] and FireDa/emon

Fold and Frag on
Brian

*edit*It looks fairly simple, but when you use [email protected] as a service, for the paramaters option in FireDeamon you must remember to add the -service flag in there....I've never had to do it becuase luckily all the computers I ahve put [email protected] on are NT based OSs *phew*

GL
 
Last edited:
OP
Wedo

Wedo

Senior Kitty Power!
Joined
Oct 31, 2001
Location
Lost Angeles
Edited with the new version of the program formerly know as the One-Click.

Wedo