- Joined
- Sep 28, 2009
- Location
- Reykjavík, Iceland
Do not use 9.10, the GPU performance is awful when the CPU client is running, I am currently trying to figure it out. Use 9.04 for maximum performance
Works on Ubuntu 9.04 as of December 11th 2009
This guide will only work for Nvidia cards, 8x00 cards or newer.
I've heard about a wrapper for ATi cards, but seeing as I don't own one I can't really test it out.
This guide was done using Ubuntu 9.04 64-bit, should work without any modification on other Debian based distros. To get SMP folding on the CPU client, you must have a 64-bit system.
Start by updating your system
Setting up the CPU Client:
Setting up the CPU client is pretty straight-forward
Start by opening a terminal (located in Applications > Accessories > Terminal)
Then type in or copy/paste this into the terminal.
Now you have created a folder in /home/yourname/ called folding, downloaded the linux F@H client and extracted it.
Now, to configure the client:
Enter your settings, and then you can run the client using the following command
If you are using an i7, use
and furthermore, if you are running your i7 stable 24/7 you can use the -bigadv flag for a point bonus.
GPU client
This is where it gets tricky, because there is no Linux GPU client, only the Windows binaries. Therefore we will use Wine to run it.
But firstly, we need to install drivers and the CUDA toolkit.
Let's download the latest CUDA enabled driver.
Go to System > Administration > Hardware Drivers and select the 180 drivers, let them download and install.
Reboot
The next step is downloading the CUDA toolkit. Open a new terminal and type in:
Then, within the same terminal type:
Just hit enter to verify install path when asked. CUDA has been set up and you are ready to go.
In case you were wondering, the reason that I'm using the 7.10 toolkit is because the GPU2 wrapper was written for that version of the toolkit, newer toolkits do not work.
Then, we need to link the toolkit.
let's grab wine
The following command will download the latest stable binary release of wine
If you just installed Wine, you might want to create the directory structure before starting up the GPU client, do so by simply running notepad.
You need to download the CUDA wrapper, so the windows binaries can communicate with the Linux driver.
then run
the result should be something like this
If you see any not founds, it probably has something to do with the CUDA toolkit, make sure you installed 32-bit toolkit, not the 64-bit, even though you are running a 64-bit kernel.
Hard part is over, now it's just setting up the client. Start by downloading it. To do this open a new terminal and type this:
Then run the client by typing
(even if you have a newer card than a G80, this is the flag to be given)
After configuring it, your client should be folding away.
Dual GPU Folding
If you have more than one GPU, you can use them both at the same time, just as you would do in Windows.
In terminal:
Then run this client by typing
And put machineid as 3
Scripts for running the clients.
I don't like to have a lot of programs start up with my OS, so I have a simple script to start my clients.
Run these commands to create scripts for every client (Users with only one GPU need not do the last command)
Now you can run all your clients by typing ./fah
Running the clients on startup
Go to System > Preferences > Startup Applications
Now add the clients you want to run
CPU Client:
Name: cpu
Command: ~/./fahcpu
Comment: cpu client
GPU0 Client:
Name: gpu0
Command: ~/./fahgpu0
Comment: GPU0 client
GPU1 Client:
Name: gpu1
Command: ~/./fahgpu1
Comment: GPU1 client
Next time you reboot your system, your folding clients will be running in the background.]
However, as I stated earlier, I personally prefer running the ./fah script myself on each startup so I can monitor the output of each client, instead of having them run in the background.
Overclocking your GPU in Linux
If you are doing this, I assume you have already done so in Windows and know the safe clocks for your card(s). To overclock your video card in Linux you have to enable 'coolbits' in your nvidia control panel. To do this we will have to edit the xorg configuration
And then add 'Option "CoolBits" "1"' under 'Section: "Device"' like so:
Access the control panel by going to System > Administration > NVIDIA X Server Settings, or simply typing "nvidia-settings" in a terminal. You should now see a 'Clock Frequencies' section where you can set your clocks. This has to be done every time you boot up Linux though, so the most convenient way would be to flash your video card with a BIOS with increased clock settings. Doing that is risky and is NOT RECOMMENDED UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING.
Monitoring
For monitoring I will use harlam's monitoring program, HFM.net. It was written in .net so we need to use Mono to run it under Linux. In Ubuntu 9.04 the mono in the repositories is out of date and will not support HFM.net. We need to add another repository to get mono 2.4.
Edit your package sources
And at the bottom of the file add
Add the GPG key
Update the repositories
Then install the winforms libraries (will also install all the other dependencies needed to run HFM.net)
Now download the binaries from here and extract them to a folder of your choice. I used ~/hfm/.
Then you can run it from a terminal using
If you are experiencing missing text in HFM and are using an intel i8** or i9** video card on Ubuntu 9.10, then try this fix.
Add a new repository
Then install the latest xserver-xorg-video-intel package
Then go to System > Administration > Software Sources and under 'other software' uncheck xorg-edgers to avoid your system from unnecessarily updating more of it's packages to unstable versions.
This guide was based on information from:
Folding@Home Linux SMP Guide
GPU2 Linux
NVIDIA GPU2 Linux/WINE Headless Install Guide
Feel free to improve this guide and redistribute it, giving me credit would be greatly appreciated
If you have any questions, issues or anything regarding F@H under Linux, just ask in this thread and I will try to help.
Troubleshooting
What to do if my xserver doesn't start?
Works on Ubuntu 9.04 as of December 11th 2009
This guide will only work for Nvidia cards, 8x00 cards or newer.
I've heard about a wrapper for ATi cards, but seeing as I don't own one I can't really test it out.
This guide was done using Ubuntu 9.04 64-bit, should work without any modification on other Debian based distros. To get SMP folding on the CPU client, you must have a 64-bit system.
Start by updating your system
Code:
sudo apt-get update
sudo apt-get dist-upgrade
Setting up the CPU Client:
Setting up the CPU client is pretty straight-forward
Start by opening a terminal (located in Applications > Accessories > Terminal)
Then type in or copy/paste this into the terminal.
Code:
sudo apt-get install ia32-libs
mkdir -p ~/folding
cd ~/folding
wget http://www.stanford.edu/group/pandegroup/folding/release/FAH6.24beta-Linux.tgz
tar xzf FAH6.24beta-Linux.tgz
Now, to configure the client:
Code:
./fah6 -configonly
Code:
./fah6 -smp -verbosity 9
Code:
./fah6 -smp 8 -verbosity 9
GPU client
This is where it gets tricky, because there is no Linux GPU client, only the Windows binaries. Therefore we will use Wine to run it.
But firstly, we need to install drivers and the CUDA toolkit.
Let's download the latest CUDA enabled driver.
Go to System > Administration > Hardware Drivers and select the 180 drivers, let them download and install.
Reboot
The next step is downloading the CUDA toolkit. Open a new terminal and type in:
Code:
wget http://developer.download.nvidia.com/compute/cuda/2_0/linux/toolkit/NVIDIA_CUDA_Toolkit_2.0_ubuntu7.10_x86.run
Code:
sudo sh NVIDIA_CUDA_Toolkit_2.0_ubuntu7.10_x86.run
In case you were wondering, the reason that I'm using the 7.10 toolkit is because the GPU2 wrapper was written for that version of the toolkit, newer toolkits do not work.
Then, we need to link the toolkit.
Code:
sudo sh -c "echo '/usr/local/cuda/lib' > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfig
The following command will download the latest stable binary release of wine
Code:
sudo apt-get install wine
If you just installed Wine, you might want to create the directory structure before starting up the GPU client, do so by simply running notepad.
Code:
wine notepad
Code:
wget http://www.gpu2.twomurs.com/wrapper2ndgen/2.1/cudart.dll.so -O ~/.wine/drive_c/windows/system32/cudart.dll
ln -s ~/.wine/drive_c/windows/system32/cudart.dll ~/.wine/drive_c/windows/system32/nvcuda.dll
Code:
ldd ~/.wine/drive_c/windows/system32/cudart.dll
Code:
user@computer:~$ ldd /usr/local/lib/wine/nvcuda.dll.so
linux-gate.so.1 => (0xf7fae000)
libcudart.so.2 => /usr/local/cuda/lib/libcudart.so.2 (0xf7f34000)
libwine.so.1 => /usr/local/lib/libwine.so.1 (0xf7dfd000)
libm.so.6 => /lib32/libm.so.6 (0xf7dd6000)
libc.so.6 => /lib32/libc.so.6 (0xf7c78000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7c74000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7c5b000)
librt.so.1 => /lib32/librt.so.1 (0xf7c52000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7b64000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7b54000)
/lib/ld-linux.so.2 (0xf7faf000)
Hard part is over, now it's just setting up the client. Start by downloading it. To do this open a new terminal and type this:
Code:
mkdir ~/gpu0
cd ~/gpu0
wget http://www.stanford.edu/group/pandegroup/folding/release/Folding@home-Win32-GPU_XP-623.zip
unzip Folding@home-Win32-GPU_XP-623.zip
Code:
nice -n 19 wine [email protected] -forcegpu nvidia_g80
After configuring it, your client should be folding away.
Dual GPU Folding
If you have more than one GPU, you can use them both at the same time, just as you would do in Windows.
In terminal:
Code:
mkdir ~/gpu1/
cp ~/gpu0/Folding@home-Win32-GPU_XP-623.zip ~/gpu1/
cd ~/gpu1/
unzip Folding@home-Win32-GPU_XP-623.zip
Code:
nice -n 19 wine [email protected] -forcegpu nvidia_g80 -gpu 1
Scripts for running the clients.
I don't like to have a lot of programs start up with my OS, so I have a simple script to start my clients.
Run these commands to create scripts for every client (Users with only one GPU need not do the last command)
Code:
echo -e "cd ~/folding/\n./fah6 -smp -verbosity 9 -advmethods" > ~/fahcpu
Code:
echo -e "cd ~/gpu0/\nnice -n 19 wine [email protected] -forcegpu nvidia_g80 -verbosity 9 -advmethods -gpu 0" > ~/fahgpu0
Code:
echo -e "cd ~/gpu1/\nnice -n 19 wine [email protected] -forcegpu nvidia_g80 -verbosity 9 -advmethods -gpu 1" > ~/fahgpu1
Code:
echo -e "gnome-terminal -x ./fahcpu\ngnome-terminal -x ./fahgpu0\ngnome-terminal -x ./fahgpu1" > ~/fah
Code:
chmod +x fahcpu fahgpu0 fahgpu1 fah
Running the clients on startup
Go to System > Preferences > Startup Applications
Now add the clients you want to run
CPU Client:
Name: cpu
Command: ~/./fahcpu
Comment: cpu client
GPU0 Client:
Name: gpu0
Command: ~/./fahgpu0
Comment: GPU0 client
GPU1 Client:
Name: gpu1
Command: ~/./fahgpu1
Comment: GPU1 client
Next time you reboot your system, your folding clients will be running in the background.]
However, as I stated earlier, I personally prefer running the ./fah script myself on each startup so I can monitor the output of each client, instead of having them run in the background.
Overclocking your GPU in Linux
If you are doing this, I assume you have already done so in Windows and know the safe clocks for your card(s). To overclock your video card in Linux you have to enable 'coolbits' in your nvidia control panel. To do this we will have to edit the xorg configuration
Code:
sudo gedit /etc/X11/xorg.conf
Save the file and quit. Now you will have access to the CoolBits menu under your nvidia control panelSection "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
Option "Coolbits" "1"
EndSection
Access the control panel by going to System > Administration > NVIDIA X Server Settings, or simply typing "nvidia-settings" in a terminal. You should now see a 'Clock Frequencies' section where you can set your clocks. This has to be done every time you boot up Linux though, so the most convenient way would be to flash your video card with a BIOS with increased clock settings. Doing that is risky and is NOT RECOMMENDED UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING.
Monitoring
For monitoring I will use harlam's monitoring program, HFM.net. It was written in .net so we need to use Mono to run it under Linux. In Ubuntu 9.04 the mono in the repositories is out of date and will not support HFM.net. We need to add another repository to get mono 2.4.
Edit your package sources
Code:
sudo gedit /etc/apt/sources.list
Code:
deb http://ppa.launchpad.net/directhex/monoxide/ubuntu jaunty main
deb-src http://ppa.launchpad.net/directhex/monoxide/ubuntu jaunty main
Add the GPG key
Code:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23DC003A
Update the repositories
Code:
sudo apt-get update
Then install the winforms libraries (will also install all the other dependencies needed to run HFM.net)
Code:
sudo apt-get install libmono-winforms2.0-cil
Now download the binaries from here and extract them to a folder of your choice. I used ~/hfm/.
Then you can run it from a terminal using
Code:
mono ~/hfm/HFM.exe
If you are experiencing missing text in HFM and are using an intel i8** or i9** video card on Ubuntu 9.10, then try this fix.
Add a new repository
Code:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
Then install the latest xserver-xorg-video-intel package
Code:
sudo apt-get install xserver-xorg-video-intel
Then go to System > Administration > Software Sources and under 'other software' uncheck xorg-edgers to avoid your system from unnecessarily updating more of it's packages to unstable versions.
This guide was based on information from:
Folding@Home Linux SMP Guide
GPU2 Linux
NVIDIA GPU2 Linux/WINE Headless Install Guide
Feel free to improve this guide and redistribute it, giving me credit would be greatly appreciated
If you have any questions, issues or anything regarding F@H under Linux, just ask in this thread and I will try to help.
Troubleshooting
What to do if my xserver doesn't start?
Last edited: