AMD Processors
Decrease font size
Increase font size
Topic Title: Guide: Folding@Home Distributed Computing.
Topic Summary:
Created On: 07/29/2006 11:14 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 07/29/2006 11:14 AM
User is offline View Users Profile Print this message

Author Icon
TLH
Moderator

Posts: 3641
Joined: 11/19/2004



A Comprehensive Guide to Folding @ Home.

What is Folding@Home.

Folding@Home (F@H for short) is a Distributed Computing project run by Vijay Pande and Stanford University.In simple terms it examines how proteins "fold" and what happens when this process goes wrong.When these proteins "misfold" there can be serious consequences including diseases such as Alzheimer's,Mad Cows disease (BSE),CJD,ALS,Huntington's,Parkinson's disease,and many Cancers and cancer-related syndromes.

F@H uses our computers to form one great big supercomputer in order to study and find the relationship between misfolding molecules and diseases,and to hopefully one day find a cure.

Which client to download and Install.

Choose the correct client install for your OS from http://folding.stanford.edu/download.html
Now you have a choice between the Graphical or the No Nonsense Text Only Console.
There were some problems with the Graphical Client when I used it some time ago.Every time I left it open and it sent in results it would just shutdown.I never lost any results but it was a pain nonetheless.
I have no idea whether they have been fixed or not at this time but I find the Text Only Console version is far superior anyway and doesn't tend to get under my feet when using the computer for the miriad of other daytime things it does.

Download the file into a folder (I have mine on the desktop so I can access the logfile if I need to easily) and then run the FAH502-Console application.This will bring up a black dos box where you can enter options according to what spec computer and internet connection you have.

Flags and their usefulness.

Unfortunately, at this time, the only way to add flags to the service is to edit the registry entry for that service.

1/ Shut down that instance through the Services manager snap-in
2/ Run regedit and go to key HKLM\SYSTEM\CurrentControlSet\Services\<service name> and edit the entry ImagePath, adding whatever flags you wish to the end. Exit regedit.
3/ Re-open the Services manager snap-in, and verify that your changes appear there, and then restart the service.

Note: Registry editing can be dangerous if you do it wrong, although the above is pretty straight forward. Use this procedure at your own risk!

How do I add flags when running the console in service mode?
From FaHWiki

To add flags to the Windows NT/2000/XP Console client, when run as a service, you have to make some changes in the registry. You MUST be logged into an account with Administrative privledges, to make any changes to the registry. Please read the Note: at the bottom, before even attempting this.

1. Shut down the folding instance through the Services manager snap-in.

There are several methods to get to the services snap-in as follows.

* Click Start -> Click Run -> type in services.msc -> Click OK.
* Click Start -> Go to Settings -> Click Control Panel -> Double Click Administrative Tools -> Double Click Services.

Find the service entry for folding. By default, it will be something that starts like this: FAH@......

To stop the service, use one of the following methods.

* Click once on the Service to select it -> Click Action -> Click Stop.
* Right Click on the Service -> Click Stop.
* Double Click the Service -> Click Stop.
* Right click on the Service -> Click Properties -> Click Stop.

You should see the Service stop.

You can then minimize the services snap-in, or close it.

2. Run regedit.

* Click Start -> Click Run -> Type in regedit -> Click OK.
* Go to HKLM\SYSTEM\CurrentControlSet\Services\<service name>
* Right Click ImagePath -> Click Modify.
* Add whatever flags you wish to the end (after a space).
EG....


* Click OK.
* Exit regedit.


3. Restart the Folding Service.

* Re-open the Services manager snap-in.
* Verify that your changes appear there.
* Restart the service.
o Basically the same way that you stopped it. Just click Start.

Note:Editing your registry can be dangerous to your system, if you do it wrong!!! Although the above is a fairly comprehensive guide, use this procedure at your own risk! I can not be held responsible if you do something wrong.

Folding@Home Console Client: User Guide

Note:The below is intended for Folding@Home v.5. Older versions support similar flags, and an exact listing can be seen by running the program with the argument -?.

F@H Client Do's and Don'ts.

The console is not an installer, but the actual Folding@Home client executable. In general, just download it, run it, and don't worry about it. However, if you like to be "hands on" with F@H, please keep in mind:

* Each different running copy of F@H has to have its own Machine ID number. If you download each copy of F@H from the web site and configure fresh, there will be no problems.
* Please don't manually retry to send WUs soon after a netsend failure. The netsend failure means that the server was probably overloaded and retrying will just make things worse.
* Do not run multiple copies of FAH from the same directory
* We have seen some issues with running the Windows console client with the service option and the Windows GUI version simultaneously. While we debug this, we recommend not combining these two options simultaneously.

Console Client Configuration Options

-config
Allows users to change their configuration information. This includes user & team names (reflected in the stats), whether or not to ask before a network connection is made to fetch/send work, set up proxy servers, preferred work unit type (Folding/Genome), process priority, CPU usage requested (5-100%), whether or not to use assembly loops, whether or not to use deadline information, and Machine ID changes.

-configonly
Same as above, but quit following configuration instead of beginning work.

-delete x
Delete item #x from work queue. This option should only be used if there is a serious error with the current unit that the client does not automatically recover from (e.g. crash-inducing). This should not normally happen, and if it does, we would be grateful if you could send us the FAHlog.txt file from the unit that causes the error.

-license
Displays the end-user license agreement

-queueinfo
Get information on queued work units. Includes for each unit the status (READY/FINISHED/EMPTY), unit type (Folding/Genome), originating server, and date when the unit was received (local time in GMT), as well as deadline if the server sent that information.

-send x
Send result #x back to server. Exits after trying to send unit (successfully or unsuccessfully). Use "-send all" to send all results outstanding. If unit x is not a completed work unit then the client exits without doing anything.

-verbosity x
Sets the output level, from 1 to 9 (max). The default is 3. This option should be used if the user wishes to see more detailed client output, particularly useful if there is a problem which needs to be reported to the F@H client development team.

-oneunit
Instruct the client to quit following the completion of one work unit.

-forceasm
Instruct the core to use SSE/3DNow assembly instructions if possible, even if it has previously made the determination that the machine may not be handling this well.

-advmethods
Request to be assigned work units from new projects, before they are broadly released to the rest of Folding@home. As among the first to try out new advanced simulations, you may wish to post any observations (positive or negative), questions, or issues at the user Forum.

-local
Use configuration files from local directory. This option has no meaning on Linux, but is vital on Windows and Macintosh for running multiple clients on a machine. It instructs the client to read its config information from the client.cfg file in the current directory rather than, on Windows, from the installation directory specified in the registry, or, on Macintosh, the Library/Folding@home directory. Information such as the user name, team name, proxy information, machine ID are maintained in the client.cfg file. The flag ensures that work does not conflict. Use "-local" only if you are planning on running more than one instance of Folding@Home on the same machine (this is only useful if you are running on a multi-processor machine). Create as many directories as there are processors on the machine, copy the exe files and client.cfg file into each of these directories, run "FAH3Console -local -config" on each and specify unique machine IDs for each directory (under the Advanced Settings option). From then onwards you may run each copy by switching to its directory and running with the -local flag.

-help
Print out the command line flags available and then exit.

Linux Specific

-freeBSD
For use by those wishing to use the Linux client on a machine running FreeBSD. See our FAQ for details on how to do this, but with this flag, all Cores downloaded will automatically be branded as being a Linux executable.

Windows Specific

-pause
Pause after finishing and trying to send current unit. Allows a user to shut down after finishing a unit, by pressing Ctrl-C, without then getting new work to process. This is recommended if you are planning on shutting down your machine for a long time (e.g. for a vacation), or are planning to un/re-install F@H after finishing the currently processing work unit.

-service
Run in service mode (for programs such as firedaemon). This prevents the client from exiting when it detects the current user is logging out. If this option is used when the client is not run as a service then it will run normally, but will not shut down automatically if the user logs out, and a "Wait for program to close." dialog box will be displayed.

-svcstart
This flag is used if you configure the console client to be run as a service (through the standard client Configuration). The user should NOT give this flag manually, it is automatically given by the Windows scheduler and is just listed here for information.

How do I add flags using a shortcut to the console client?
From FaHWiki

1. If you currently do not have a shortcut to the console client, one can easily be created several ways.

* Right click the console executable.
* Select Create Shortcut from the pop-up menu.

This will add a shortcut to the console client in the current dir.

Or you can:

* Right click on the console executable.
* Click Copy.
* Go to where you want to place the shortcut to the console client.
* Right Click on a blank area.
* Select Paste Shortcut.

This will paste a shortcut to the console client where you want it.

2. To add a switch to your console client:

* Right click on the console shortcut.
* Select Properties.
* Go to the end of the line in the Target: box.
* Add a space
* Add the desired switch (including the leading hyphen.)
* If you are adding more than one switch, be sure to use a space between each switch.
* Click Apply.
* Close the window.

Visual Example:


Repeat this process for each client you are running.

FAH will now use the switch(s) every time you start the console using this shortcut.

Or, you can place the shortcut in your startup folder, if you want the client to load every time you log on.

To make it load everytime any user logs on, you need to place the shortcut in to the ALL USERS -> Startup folder.

Or just use the consoles clients built in Windows NT/2000/XP service option.

Adding flags when run as a service is a bit more complicated and can be found in this article.

How do I reconfigure the console client options?
From FaHWiki

There are several methods to accomplish this task.
[edit]
Adding -config via a client shortcut.

* Shutdown the client.
* Right click on your FAH shortcut.
* Select Properties
* In the Target: field type in -config at the end of the line (leave a space between).
* Click Apply.
* Click OK.
* Double Click the shortcut.
* Answer the questions.

Visual Aid:


You will either have to remove the config switch from the shortcut, or only use this shortcut when you want to re-config the client.

It is ok to make multiple sortcuts that do any of several things.

Just remember to rename the shortcut for its purpose. That way you will be able to tell what it is for.

IE.... Start FAH, Config FAH, Queue Info, Send All, ect....
[edit]
Running -config via the Run Command.

* Stop the client.
* Click Start
* Click Run.
* Click Browse.
* Locate the client executable.
* Add the -config switch
* Click OK.
* Answer the questions.

Visual Aid:


You can also use the -configonly switch in either of these cases.

This will run the client through the config changes and then stop.

Transfering your client Service folder from one install to another.

Make a back-up of your client install folder whenever you re-install the operating system.It's just as easy to transfer this over from the old to the new as download a new client app. and there are a couple of benefits of doing this,

1.You will still be able to see how many units you've completed in full.
2.You active cpu count on the stats page will not show an extra cpu for 50 days because you installed a new service.
3.You don't have to download all the cores again.

Simply put the F@H folder back where you want it and create a shortcut for the FAH502/3/4-Console application by right click/Make new shortcut.Now edit the shortcut target by right click and add the " -configonly" flag.Make sure you add a space before the "-" as with all flags.This will bring up the DOS box for install of the console and you can re-input all your decisions as for normal install.

Setting up on a dual core machine.

You may want to read Logans Guide on Forcing CPU Affinity to help explain this better.

Open a net browser and go to the downloads page on the Folding@Home main site - here

Download a copy of FAH502-Console.exe to your first F@H folder, and then copy the exe to the second folder.

Start back at the first folder. Run the executable. It should go into Config mode automatically. It will prompt you for a bunch of variables, enter them as required but be sure to install F@H as a SERVICE. When that's done, it will tell you that it will start automatically on the next reboot. It will also download your first WU and begin calcs.

Move on to the second folder. Repeat the process and specify a different machine ID for this folder. It can be anything but the one you used for the first one.

When both executables are running, open the Services pane as described above. Both instances should be listed. Both should be set to Automatic, but not started.

At this point, you can either keep crunching to ensure system stability (and 100% total CPU utilization - both cores, that is. Check the Task Manager to ensure that), or reboot and test the services themselves.

Upon rebooting, check your Task Manager and ensure that both processes are getting 50% CPU each. This means that each one is actually using one core. Also, check the Services pane to see if both services for F@H have reported as Started.

From there on in, you can download and configure FahMon if you so choose, or just create desktop shortcuts to each folder's unitinfo.txt file. You can open it, inspect the progress (represented as a percentile of finished work) and then close it again, being careful not to save if ever asked.

This means that you're forcing each instance of F@H to run on its own core - either core 1 or 2, also called CPU 0 or 1. You'll want to follow the instructions as listed, being sure to force uniprocessor mode first and then binding CPU affinity. I'm happy to help with that as well.

Extra SSE Boost

This makes an awful lot of difference to the speed of Folding so you want to make sure it's active.
If for some reason it got turned off then you could be progressing at only 50% or thereabouts of your original speed.

Possible reasons for it not being active are varied.Improper shutdowns for one will make it use a different table when you restart.You may need to shutdown properly before it will start as usual.

Forcing a restart of your client (GUI or CLI/service) after noticing an EUE will resume computations with any SSEx optimizations enabled.

As far as I know Amber and Tinker core Work Units don't make use of SSE anyway so check your units.

Early Unit Ends

These can happen for a variety of reasons although the main one is overclocked machines that are unstable or have become unstable over time due to component degradation or ambient heat build up.If this is the case then you will likely notice multiple units ending early.
Software can interfere to cause these at times aswell but that is very rare.Only once when I installed RealMedia Player have I experienced problems.

E.U.E's can also be a legitimate end to a unit and nothing to worry about.Some units just cannot be finished properly.The Beta Testing team usually sort this out before the general folding populace get to work on them so hopefully you won't get many.

For further info you can refer to the EUE Types and FaHWiki EUE's pages which explain more about unstable work units and inherent work unit problems.

F@H overclock testing and stability guides:

When overclocking at all, and especially as concerns F@H... stability is king. F@H is great for exposing minor instabilities you were otherwise unaware of.

When you ramp your clockspeed up, chances are you're overclocking your RAM at the same time as well. Keep this in mind as it means you'll have two main points of failure for stability (CPU and RAM).

Generally, most newer AMD64 processors (AMD64 Athlon, Athlon X2 and Opteron processors) have a decent amount of "headroom", or overclocking capacity in them. AMD tends to test them high and issue them low, so to speak. This seems to go double for the Opterons, as they're enterprise-level chips that have also been issued for S939 - this removes the stipulation of registered / ECC RAM and allows them to be easily overclocked.

But enough backstory

Raise your HTT frequency by increments of 5-10 MHz at first to start, and a good rule of thumb is that you will achieve an overclock of 10-15% on stock core voltage for the CPU. However, that doesn't mean that you'll do the same for the RAM. Depending on your RAM, you may need to:

- add voltage
- increase latencies
- drop to a lower ram divider

or any combination of the above in order to ensure stability.

At this point, as you're wringing your hands, eager to overclock... I recommend stopping and thinking. Do you have a motherboard from one of the following manufacturers:

- Asus, DFI, MSI, Abit

If so, then you'd likely end up with a good overclocking experience... RAM notwithstanding. If you've replied Asrock, ECS, Soltek or anuthing else... especially anything with a SiS chipset... I would actually recommend NOT overclocking. Others may say otherwise, but in my 6+ years of overclocking and PC building, I've yet to see SiS do anything right. Nvidia is the OC chipset of choice, and Via is sometimes livable.

Now for RAM testing. RAM should always be tested first, as it can be done at a "low" level (before the OS loads) and this removes any OS instability or incompatibilties. Also, it keeps any OS from hiding any issues as well. Download Memtest86+ from this site. Burn the ISO to a CD and boot your computer from it. You might need to select the CD-ROM/DVD-ROM as a boot device from a quick boot-time menu (F12 for a lot of boards) or set it higher than the hard drive in your BIOS.

Do a standard sweep with Memtest86+ and see if anything dies. Also, as a point of interest, it will tell you roughly your CPU type, your CPU speed, your memory latencies and unbuffered memory bandwidth. For AMD systems, take that last (lowest) unbuffererd amount and multiply it by 2 for the dual-channel unbuffered bandwidth. As a sidenote, most DFI Ultra boards have Memtest as part of the BIOS ROM... just go to the Genie BIOS page and it should be at the bottom of the main CPU adjustment page, below the HTT freq. adjust area. Set it to Enabled and reboot, making sure to set it to Disabled when finally done or you'll never get back to your OS!

Once your first OC ramp checks out, run it up a bit more and Memtest again. If you can cycle through Memtest once without erroring out (ideally, twice) then there's a 99% chance your RAM is sound at that speed. If you have value DDR400, I recommend running a lower RAM divider and keeping your effective RAM speed at DDR400 speeds. Normally with that RAM, voltage and latency tweaks aren't enough to make it stable very far outside of stock speeds. Your effective DDR speed is also shown with Memtest86+.

Once you're done ramping your RAM (unless you're close to stock spec) and you have a half-decent overclock on your CPU speed... get into your OS. For all intents, we'll assume you have XP SP2. Please post if you need assistance with other OSes.

Download and install Prime95 from here. Install one copy per physical processor / core as needed (so on a dual Opteron 270 box, install 4 separate copies to different directories; on an Opteron 170, install 2 copies to separate directories).

Run each one and select the Torture Test under the Options pull-down menu. Start with the small FFTs for a few hours, move to the large in-place FFTs for at least 4-8 hours (once you've settled on a speed you want to stress-test, that is) and finally run the blend if you think you're near the end of your road. If you fail on the first two tests in Prime 95, you have options:

- check current speed vs. stock speed, figure out if overall overclock is >= 25%. If so, decide how important it is to proceed further on air cooling. It's likely not that advisable.
- raise core voltage slightly, retry in Prime
- increase cooling, retry in Prime
- lower HTT freq a few MHz, retry in Prime
- lower core voltage and HTT freq slightly, retry in Prime

Stability testing:

Basically, I've found there's no "magic number" or percentile where a F@H WU will fail outright on an over-done system. It could fail on initialization, 99% or any point in between.

When you think you're near the limit of your CPU's overclocking capabilities, in my opinion... turn it down 100MHz. This isn't periodic gaming we're discussing, this isn't booting into Windows and sitting idle... this is 24/7/365 CPU stressing, 100% per core with a decent amount of load on the CPU itself and a decent amount of stress on the RAM, too.

If your CPU is stable and your RAM is within known limits on its latencies... congrats, you've successfully overclocked your CPU.

Now, for those of you who want better response but not much more core speed (and F@H responds well to extra memory bandwidth on Athlon64/Opteron systems currently - I'm making these remarks in advance of Socket AM2/F)... overclock your HTT bus, lower your CPU and HTT multiplier and leave your RAM divider at DDR400.

Pre-requisite for this idea: "Overclocker's RAM" - Also called DDR466 or higher, it will enable you to have your memory bus running higher than DDR400 overall while still remaining stable. Always use the latencies given by the manufacturer as a jumping-off point when doing this.

2 things to note before the example: I'll refer to Asus and DFI-led experiences when doing this tutorial, and I really don't care about the really minor "l33t" memory latencies. My methods produce solid overclockers with minimal fuss, but likely without using all overclocking potential for RAM and/or CPU. Be warned.

Example: Opteron 170, OCZ Platinum EB 2GB DDR500 kit, {motherboard that overclocks well, supports over-volting of CPU and RAM and adjustable latencies}.

Stock settings: 10x200 CPU. This would only give you DDR400 speeds "out of the box". Not ideal for that RAM.

How to hit DDR500: 8x CPU multi, 3x or 4x HTT multi, 250MHz HTT. Your HTT multi and any extra settings (extra voltage, RAM latencies) would be dictated by your manufacturers. Some OCZ RAM requires high voltage (VX Gold), some don't (i.e. the RAM listed above). Some boards will run stable at 4x HTT multi for 250MHz (keeping it to stock 1GHz HTT link overall), some will need 3x. In a lot of cases, you can bench for usable memory bandwidth and both settings should be equal (HTT multi @ 250MHz HTT).

Just in case anyone's asking "what are you running?"

Opteron 170 @ 2.5GHz, 1.45 vCore
DFI LanParty UT nF4 SLI-DR
OCZ EL Platinum Rev. 2 DDR400, 2 x 512MB, CAS 2, 3-3-6 (DDR180 divider) for DDR454
Thermaltake Venus 12 HSF
Sunbeam Trio Mid-ATX case with 1 80mm intake and 2 80mm exhaust fans
Nikao 520W "Alien" PSU
etc etc

The reason I run the RAM out of sync with the HTT bus is because it refuses to run at CAS 2.5 anything, nor any more relaxed latencies (3-3-7, etc) which would allow for higher frequencies. Not sure why, but it MemTests clean at this setup and it's still [content edited] fast... so I could care less, really

We hope this was helpful for everyone.

One last thing (or two).

Other tools and programs related to or for use with F@H can be found in the Tools List.NicoV (a longtime member at Stanford forums) has been compiling this list for a long time and there are some good bits of software there,and it's all in one place. The Tools List

If you have any questions or need to discuss anything further please feel free to post in our Distributed Computing forum here at AMD Support Forums.

Perhaps you'd like to join the team and Fold for us. Our team number is 34106.

Our Team Stats page can be found here.

Credits

Logan[TeamX] for Dual Core Workings and Overclocking Theory.
F@H Wiki & FAQ
Stanford Folding Community.org.


-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.

1100t on M5A99x-EVO with 2x4gb and 6870 running Win7 on Force120 ssd in Corsair 600t cooled by H100. Folding for team 34106

Edited: 03/30/2008 at 09:52 PM by TLH
 03/16/2008 07:45 AM
User is offline View Users Profile Print this message

Author Icon
johnasu
Junior Member

Posts: 7
Joined: 02/04/2008

This is a very great guide. Thanks.

-------------------------
No Advertising.
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information