This guide requires a little familiarity with Linux, but I'll try to be as descriptive as possible while still keeping it brief. It covers the whole install, from getting the Ubuntu ISO to running the GPU3 client. It's much easier to cut and paste the commands from this guide instead of typing them in by hand, so I recommend following this guide while running an ssh connection from another computer.
1. Download the ISO of the 64-bit version of Ubuntu Server 9.04. Here's a download link to mirrors.kernel.org. Burn the ISO and boot from the CD.
2. Go through the install, accepting all defaults (careful: this will wipe your hard drive, as this guide is designed for dedicated folding rigs). When asked which server software to include near the end of the install, select OpenSSH Server if you will be accessing the box remotely (move the cursor down with the tab key and then hit the spacebar when the cursor is next to the OpenSSH Server box).
3. Upon completion, the system will reboot. Log in on the console using the username and password you created during the install (or use ssh to log in from another system if you selected OpenSSH Server).
4. Update the system software and restart by entering the following three commands:
- Code: Select all
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot
5. Log back in after rebooting, then install the latest version of Wine:
- Code: Select all
sudo sh -c "echo 'deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu jaunty main' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu jaunty main' >> /etc/apt/sources.list"
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 5A9A06AEF9CB8DB0
sudo apt-get update
sudo apt-get install wine
6. Download the latest NVIDIA Linux 64-bit driver and the CUDA 3.0 32-bit toolkit:
- Code: Select all
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/256.35/NVIDIA-Linux-x86_64-256.35.run
wget http://developer.download.nvidia.com/compute/cuda/3_0/toolkit/cudatoolkit_3.0_linux_32_ubuntu9.04.run
7. Before you install the NVIDIA driver, you need to install some Linux build utilities and header files:
- Code: Select all
sudo apt-get install build-essential linux-headers-`uname -r`
8. Install the NVIDIA driver:
- Code: Select all
sudo sh NVIDIA-Linux-x86_64-256.35.run
9. Install the NVIDIA 32-bit toolkit:
- Code: Select all
sudo sh cudatoolkit_3.0_linux_32_ubuntu9.04.run
10. Link the toolkit:
- Code: Select all
sudo sh -c "echo '/usr/local/cuda/lib' > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfig
11. Create the WINE directory structure:
- Code: Select all
wine notepad
12. Download the latest Wine wrappers, save them to Wine's windows/system32 directory, and create a few symlinks:
- Code: Select all
cd ~/.wine/drive_c/windows/system32
wget http://www.linuxfah.info/wrapper-3.0/cudart/cudart.dll.so
wget http://www.linuxfah.info/wrapper-3.0/cufft/cufft.dll.so
ln -s cudart.dll.so cudart32_30_14.dll
ln -s cudart.dll.so cudart.dll
ln -s cudart.dll.so nvcuda.dll
ln -s cufft.dll.so cufft32_30_14.dll
ln -s cufft.dll.so cufft.dll
13. Test to make sure the wrapper is properly linked:
- Code: Select all
ldd ~/.wine/drive_c/windows/system32/cudart.dll
- Code: Select all
linux-gate.so.1 => (0xf7706000)
libcudart.so.3 => /usr/local/cuda/lib/libcudart.so.3 (0xf7697000)
libwine.so.1 => /usr/lib32/libwine.so.1 (0xf7556000)
libm.so.6 => /lib32/libm.so.6 (0xf752f000)
libc.so.6 => /lib32/libc.so.6 (0xf73cc000)
libdl.so.2 => /lib32/libdl.so.2 (0xf73c8000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf73af000)
librt.so.1 => /lib32/librt.so.1 (0xf73a6000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf72b7000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf72a7000)
/lib/ld-linux.so.2 (0xf7707000)
14. Create the following script to initialize CUDA without running X:
- Code: Select all
cd
nano -w cudainit
- Code: Select all
#!/bin/bash
PATH=$PATH:/usr/local/cuda/bin
modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
N3D=`/usr/bin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`
NVGA=`/usr/bin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`
N=`expr $N3D + $NVGA - 1`
for i in `seq 0 $N`; do
mknod -m 666 /dev/nvidia$i c 195 $i;
done
mknod -m 666 /dev/nvidiactl c 195 255
else
exit 1
fi
15. Make the cudainit file executable.
- Code: Select all
chmod u+x cudainit
16. Run the cudainit script as root.
- Code: Select all
sudo ./cudainit
- Code: Select all
ls /dev/nv*
- Code: Select all
/dev/nvidia0 /dev/nvidiactl
17. Time to download the console version of the GPU3 folding client (finally!):
- Code: Select all
wget http://www.stanford.edu/~friedrim/.Folding@home-Win32-GPU_XP-631.zip -O Folding@home-Win32-GPU_XP-631.zip
18. Ubuntu doesn't come with an unzip program, so we'll install it:
- Code: Select all
sudo apt-get install unzip
19. Create a directory to keep your folding files, then unzip the client into it, and delete the Stanford-supplied .dll files:
- Code: Select all
mkdir ~/fahgpu3
unzip Folding@home-Win32-GPU_XP-631.zip -d fahgpu3
rm ~/fahgpu3/*.dll
20. Time for the moment of truth: let's start the client! For all GeForce cards in the 8 series, 9 series, 100 series, 200 series, and 300 series (non-Fermi):
- Code: Select all
cd ~/fahgpu3
nice wine Folding@home-Win32-GPU.exe -verbosity 9 -forcegpu nvidia_g80
- Code: Select all
cd ~/fahgpu3
nice wine Folding@home-Win32-GPU.exe -verbosity 9 -forcegpu nvidia_fermi
To make sure the GPU client doesn't use an entire CPU core, use the Auto-Mator script to start the client. Auto-Mator will lower the CPU demand of the GPU client by automatically adjusting the SLEEPWAIT environmental variable:
For non-Fermi cards listed above:
- Code: Select all
cd ~/fahgpu3
wget http://www.linuxfah.info/wrapper-3.0/auto-mator-g80.sh
chmod +x auto-mator-g80.sh
./auto-mator-g80.sh
- Code: Select all
cd ~/fahgpu3
wget http://www.linuxfah.info/wrapper-3.0/auto-mator-fermi.sh
chmod +x auto-mator-fermi.sh
./auto-mator-fermi.sh
Your GPU fan is not automatically controlled when running headless. To set the fan, install and configure the nvclock utility:
- Code: Select all
sudo apt-get install automake
wget http://www.linuxhardware.org/nvclock/nvclock0.8b4.tar.gz
tar xzvf nvclock0.8b4.tar.gz
cd nvclock0.8b4
./autogen.sh
./configure --disable-nvcontrol
make
sudo make install
- Code: Select all
sudo nvclock -f -F auto
- Code: Select all
sudo nvclock -i
Since we're running 64-bit Ubuntu, we can run an SMP client at the same time if you have a multi-core CPU. I recommend Ivoshiee's excellent finstall script. Just enter the following commands:
- Code: Select all
cd
wget http://ra.vendomar.ee/~ivo/finstall
chmod u+x finstall
./finstall smp
foldingathome/folding start
Some notes:
I prefer to run the GPU3 client using the screen utility. To install:
- Code: Select all
sudo apt-get install screen
When you stop folding by hitting CTRL-C, make sure all of your core files terminate before restarting the client. If the core doesn't terminate and you restart, the WU will EUE. After exiting the client, type "top" to see if any processes labeled "FahCore_11.exe" or "FahCore_15.exe" are still running. Note the PID number of the process on the left, then quit out of top (hit "q"), then type "kill" followed by the PID number and hit Enter. Check "top" again to make sure it's killed.
For now, I recommend using Ubuntu 9.04 instead of 9.10 or 10.04, especially if you want to run an SMP client at the same time. SMP performance on 9.10 is much slower than 9.04, and 10.04 has some extra steps needed to get the SMP client running.
For GPU2: Special thanks to all who contributed to the GPU2 Linux/WINE thread, especially shatteredsilicon, actong, Shelnutt2, and Mindmatter. Extra special thanks to ihaque for his input from the Pande Group side of things.
For GPU3: Special thanks to Shelnutt2, Sidicas, and the testers in this thread for all their hard work in getting GPU3 to run! For additional information and more general instructions for running GPU3 with X, check out Shelnutt2's excellent GPU3 Linux wiki page.
Edit 11/11/08: ineffective nice command removed
Edit 12/09/08: Changed recommended Ubuntu version to 8.04.1, updated driver & client links, added nice command back, added dist-upgrade & reboot to Step 4, clarified multi-GPU use
Edit 2/3/09: Updated recommended Ubuntu version to 8.04.2
Edit 2/25/09 & 2/26/09: Warning about new Core 14 WUs that crash with current CUDA wrapper; new wrapper to be released soon
Edit 3/2/09: New wrapper posted for Core 14 WUs, cleaned up installation text, linked to latest NVIDIA driver, added more names to thank-you section
Edit 3/4/09: Deleted unnecessary symlink step, updated wrapper link to GPU2 wiki
Edit 3/6/09: Fixed and reordered wrapper test step
Edit 5/5/09: Updated link to latest NVIDIA driver
Edit 8/1/09: Removed warning about Core 14, updated links to Ubuntu 8.04.3 and NVIDIA driver 180.60
Edit 9/8/09: Fixed typo spotted by bollix47
Edit 7/25/10: Major rewrite for GPU3, addition of nvclock instructions





