Folding@Home with VMware & Ubuntu tutorial

cutthroat

Distinguished
Apr 13, 2004
429
0
18,780
This is a tutorial to get Folding@Home running on Ubuntu Linux through VMware server on Windows.

Ok, since we don't have a specific forum for our Folding@Home team I'll put this guide here because our main Folding@Home team thread is in this forum. Our main thread is way too long and this post would be buried.

You might ask why go through all this trouble to run something I can run on Windows? Well, with my E6400 @3200Mhz I can fold for 2000+ppd with this method, I can only do about 1200ppd in Windows.

This may look complicated, but it is very easy (and pretty cool). I am a Linux Newbie, and I have made this tutorial for newbies. I have tried in the past playing with Linux with no real success. Ubuntu has made it easy, follow my steps, cut/paste the code, and you will be fine.

System Requirements: Windows 2000/XP/Vista, 64bit Dual or Quad-core CPU, 2GB RAM, ~10GB free disk space, CD/DVD ROM, internet access.

Preparation:

1. Download VMware Server 1.0.2, it's free but you need to register for a serial number.

2. Download Ubuntu or Xubuntu. You want Ubuntu Edgy 6.10, make sure you get the 64-bit PC (AMD64) desktop CD.
*Note that this version also works with Intel CPUs with 64bit plus VT (enable virtualisation/64bit in the bios if that option is available).*
-I suggest Xubuntu for VMware server because it's leaner, easier, and easy to get folding to start at startup.
-Use Ubuntu if you are more interested in the operating system, it is more versatile.
-Use Kubuntu if you like KDE instead of Gnome. If you don't know what I'm talking about use Xubuntu.

Installation:

1. Install VMware server, the default options are fine, ignore the warning about Windows Server and IIS.

2. Start VMware. Select "New Virtual Machine". Pick custom virtual machine configuration, then for Guest OS, select "Other" option and pick "Other 64-bit" from the list. In general select default options, but make sure that select 2 processors, 1GB RAM, and I suggest picking NAT for network type.

3. After VMware starts, click 'Host' in the top toolbar, select 'settings', click the 'memory' tab. Move the slider all the way to the right (max allowed memory), and select the option for 'allow some virtual machine memory to be swapped', click ok.

4. Burn the Ubuntu iso to a CD (optional)

5. If you burned the CD, put it in, wait a minute for drive to stop.

6. If you didn't burn the CD, click 'Edit virtual machine settings', click on 'CD-ROM', select 'use iso image' and browse to the location you saved the Ubuntu/Xubuntu iso, click OK.

7. Click 'Start this virtual machine'. The OS will boot using the live CD. *Note that when in a Virtual OS, to get out, just press Ctrl-Alt.*

8. After the desktop comes up, click the big "INSTALL" icon on the desktop. Follow the instructions to set up the OS, just like Windows setup.

9. When you are finished installing you need to remove the CD or else it will boot back into the live CD. Select VM->Removable Devices->CD ROM->Disconnect. Or Shutdown instead of restarting and using the 'edit virtual machine settings' to change your CD-ROM to your actual physical CD/DVD drive.

10. Start the virtual machine, log in, click the Firefox icon and make sure the internet works, Ubuntu will probably want to install updates as well, reboot after updating.

Folding@Home installation/config:

1. Click 'Applications', select 'accesories' with Ubuntu, 'system' with Xubuntu, and select "Terminal"

2. Copy/Paste the following commands one line at a time.

[code:1:9da38b75c2]sudo apt-get update[/code:1:9da38b75c2]
[code:1:9da38b75c2]sudo apt-get install ia32-libs[/code:1:9da38b75c2]
*answer YES to any questions*

[code:1:9da38b75c2]mkdir -p ~/folding/FAH[/code:1:9da38b75c2]
[code:1:9da38b75c2]cd ~/folding/FAH[/code:1:9da38b75c2]
[code:1:9da38b75c2]wget http://folding.stanford.edu/release/FAH_SMP_Linux.tgz[/code:1:9da38b75c2]
[code:1:9da38b75c2]tar xzf FAH_SMP_Linux.tgz[/code:1:9da38b75c2]
[code:1:9da38b75c2]cd ~/folding/FAH[/code:1:9da38b75c2]
[code:1:9da38b75c2]./fah5 -configonly[/code:1:9da38b75c2]
*now configure your client*
Example:
User name [Cutthroat]? Cutthroat
Team Number [40051]? 40051
Ask before fetching/sending work (no/yes) [no]? no
Use proxy (yes/no) [no]? no
Allow receipt of work assignments greater than 5MB in size (no/yes) [yes]?yes
Change advanced options (yes/no) [no]? yes
Core Priority (idle/low) [idle]? idle
Disable highly optimized assembly code (no/yes) [no]? no
Interval, in minutes, between checkpoints (3-30) [15]? 15
Memory, in MB, to indicate (1550 available) [1550]? 1550
Request work units without deadlines (no/yes) [no]? no
Set -advmethods flag always, requesting new advanced
scientific cores and/or work units if available (no/yes) [yes]? yes
Ignore any deadline information (mainly useful if
system clock frequently has errors) (no/yes) [no]? no
Machine ID (1-16) [1]? 1

3. Create a shortcut to start FAH.

[code:1:9da38b75c2]cd ~[/code:1:9da38b75c2]
[code:1:9da38b75c2]nano startfah[/code:1:9da38b75c2]

This will now open a simple edit program. Type the following:

[code:1:9da38b75c2]cd ~/folding/FAH
./fah5 -forceasm -verbosity 9 [/code:1:9da38b75c2]

Now press 'Ctrl+X', then 'Y' to save, 'Enter' to exit.

Now type
[code:1:9da38b75c2]chmod +x startfah[/code:1:9da38b75c2]

Now to start the client type ./startfah into the terminal.

Advanced Options (Shortcut Icon on desktop, FahMon installation, Xubuntu startup):

FahMon Installation:

1. Start the "Synaptic Package Manager".
-Xubuntu: Applications-->System-->Synaptic Package Manager
-Ubuntu: System-->Administration-->Synaptic Package Manager

2. Search for FahMon dependencies.
-Search for "G++", mark for installation the following packages:
>G++
>G++-4.1
-Search for "wxgtk", mark for installation the following packages:
>libwxgtk2.6-0
>libwxgtk2.6-dev
-Search for "scons", mark for installation the following packages:
>scons

3. Download FahMon. Filename "src.tar.bz2"

4. Right click on the downloaded file and select open with 'your archive manager'. Extract the files to your home directory.

5. Using a graphical file browser, browse to your home directory, open the extracted FahMon folder, go to doc folder, and read install.txt. Follow the first three steps carefully. Don't do the fourth step for the shortcut (not necessary).

6. After successfully compiling FahMon copy the images folder to your home directory or you will get annoying errors with the next step.

To create a shortcut on your desktop:
-right click the desktop, select create launcher.
-fill in the description and name as desired
-for FAH client, select "run in terminal" option. Type ./startfah in the command.
-for FahMon, DO NOT run in terminal. Click the browse button beside the command, browse to the FahMon executable you compiled. It is in ~/FahMon/src/fahmon.exe.

Xubuntu, run FAH and FahMon at startup:

Click Applications-->settings-->autostarted applications. Add FAH and FahMon to the list exactly like you were creating a launcher explained above. This time though, do not run FAH in a terminal, it will just run in the background and you can use FahMon to monitor it.

:trophy: Congratulations, you're done! :trophy:

I hope this works for someone, and boost our teams daily output. :wink:

I'll monitor and update this thread as needed. If you get any errors doing this let me know, I may have missed something, I will correct it. Don't ask me questions about Linux that do not directly relate to this tutorial, cause I won't know.
 
There is also a Windows SMP client in both 32- and 64-bit flavors. However, there is some discussion on the performance of the Windows SMP client not being nearly as good as the Linux variant. From what I gather, an X2 4200+ will take about exactly 3 days to complete a Windows SMP WU when it is completely left alone. (These guys refused to mention which WU they were running.) That would yield frame times of 43.2 minutes.

My X2 4200+ under 64-bit Linux has frame times ranging from 12 minutes (project 3020) to 25 minutes (project 2604/5.) Assuming that the Windows WUs are the same WUs as Linux ones are and that the Windows SMP guys in fact were running the biggest 1760-point 2604/2605 WUs, then Windows has 73% more overhead than Linux does. If the Windows guys were running the 560-point 3020 WUs, then Windows is only 28% as efficient as Linux at running the WUs. Since VMware only sacks performance 10-20%, I can certainly see why people would put up with running FAH SMP on 64-bit Linux inside of VMware rather than running native Windows SMP WUs.

Hopefully kasson and the crew over in Pande's lab will improve the performance of the Windows SMP client as there are big gains in science to be made if they get it running nicely. The Linux client runs very well, but not very many people run 64-bit Linux, so its benefit is rather small compared to the benefit in improving the native Windows SMP client. SMP WUs can be bigger and more complex than UP WUs and return in the same amount of time or they can be similar in complexity to UP WUs but get back to the lab twice as fast. From the chatter I hear over in the FAH forums, both are very highly sought for the sake of progressing the science.
 
The Windows SMP client is slow right now. I tried one WU 2610, I was getting frame times of about 25 minutes, I could do about 1200ppd on that WU. Searching through the official forums, that seems about right for this client.

I can do 2000+ppd with the Linux SMP client running in VMware, the choice is obvious. Plus I get to play with Ubuntu, Linux has never been this fun, or less frustrating. :wink: