Before beginning, I'd highly recommend that one study the other guides. All three approach the problem in a slightly different way, so reading them over helps build a good perspective of the steps involved.
http://linuxfah.info/mediawiki/index.php?title=Main_Page - Pretty good site, but I found their "Linking the Toolkit" step to be unclear.
http://foldingforum.org/viewtopic.php?f=54&t=6793 - especially handy for a headless installation, and the long-running thread contains useful info
http://bredsaal.dk/running-the-foldinghome-gpu-client-on-ubuntu-10-10 - this one uses older versions of the CUDA toolkit and the v6 GPU client
I began with Linux Mint 14, which is based on Ubuntu 12.10, and uses the 3.5 series kernel. I don't know if it works on higher kernel versions, so please let me know if it does. I'd recommending starting at step 1, although skipping to step 6 is of course just find if 1-5 are already done.
1)
sudo apt-get update
sudo apt-get dist-upgrade
Upgrades to the latest supported packages. This is fairly important if you're starting from a fresh installation.
2) Restart the computer. When I ran it, dist-upgraded upgraded my kernel, so a restart was required. If a bunch of packages were upgraded, might as well restart just to be safe.
3)
sudo apt-get install nvidia-current.
Installs the latest proprietary nvidia driver. This is necessary for running CUDA.
4) Restart the computer. The drivers are tied into the kernel, and a restart is necessary to start using them.
5)
sudo apt-get autoremove
sudo apt-get autoclean
Cleans out any older and obsolete packages. You can also use the Package Manager to remove old Linux kernel images.
6)
cd ~
mkdir fahgpu
cd fahgpu/
Make a directory for us to work in.
7)
wget http://developer.download.nvidia.com/compute/cuda/3_0/toolkit/cudatoolkit_3.0_linux_32_ubuntu9.04.run
chmod u+x cudatoolkit_3.0_linux_32_ubuntu9.04.run
Downloads the CUDA Toolkit, and marks it as executable.
8) The toolkit installer will prompt you for an installation location. Just press Enter to accept the default of usr/local/cuda
9)
sudo apt-get install wine
WINEARCH=win32 winecfg
Installs Wine, and sets up a 32-bit environment for the client.
10)
sudo sh -c "echo PATH=/usr/local/cuda/bin:$PATH > /etc/profile.d/cuda.sh"
sudo sh -c "echo /usr/local/cuda/lib > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfig
Links the toolkit. Although it shouldn't happen, there's a possibility of running into this error.
11)
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
Fetches the Wine CUDA wrappers.
12)
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
ldd cudart.dll
export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
Links up the wrappers. As described in the other guides, the output should look like:
- 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)
but if it doesn't then something is wrong with the linking, so goto step 10.
It was my experience that this and step 10 were the most complicated, so I recommend that you look at the other guides as well for ideas.
13)
cd ~/fahgpu/
wget http://www.stanford.edu/group/pandegroup/folding/release/Folding@home-Win32-GPU_XP-641.zip
sudo apt-get install unzip
unzip Folding@home-Win32-GPU_XP-641.zip
Fetches the client, and unzips it in the fahgpu folder.
14)
rm cudatoolkit_3.0_linux_32_ubuntu9.04.run
rm *.dll
Cleanup. Removing Stanford's supplied .dll's is important, as we want to use Wine's instead.
15)
wget http://www.linuxfah.info/wrapper-3.0/auto-mator-g80.sh.txt
mv auto-mator-g80.sh.txt gpu3.sh
chmod u+x gpu3.sh
Fetches a handly script called Auto-Mator that dynamically changes the SLEEPWAIT environmental variable to to make sure the GPU client doesn't use an entire CPU core.
16)
./gpu3.sh
Runs the script, launching GPU3 in Wine. I personally prefer to open it in the command-line, then move the window to another workspace so that it's out of the way.
As you can see, the procedure is fairly straightforward, but using the command-line is required. These are basically the steps I took to set it up. ATM I have not yet started over and retested these instructions, but they should work. Please let me know if you have any issues or improvement suggestions.
Edit 3-22-2013: Fixed typos