Running Multiple GPU clients in 1 Linux/Wine system

Moderators: slegrand, Site Moderators, PandeGroup

Running Multiple GPU clients in 1 Linux/Wine system

Postby art_l_j_PlanetAMD64 » Wed Feb 20, 2013 2:37 pm

Here is the procedure for running multiple GPU clients, of either the same or different GPU types, in 1 system.

First of all, get a single GPU client running on your system. This proves that you've got all of the basics right, to run Linux/Wine/GPU3 clients on your system. On my 10 Linux/Wine/GPU3 systems here, this is my configuration:
  • Debian Linux v6.0.6
  • Wine v1.2
    Code: Select all
    sudo sh -c "echo 'deb jaunty main' >> /etc/apt/sources.list"
    sudo sh -c "echo 'deb-src jaunty main' >> /etc/apt/sources.list"
    sudo apt-key adv --recv-keys --keyserver 5A9A06AEF9CB8DB0
    sudo apt-get update
    sudo apt-get install wine
  • CUDA 3.0 32-bit toolkit
    Code: Select all
    sudo sh
  • NVidia Linux graphics driver v304.64
    Code: Select all
    After reboot, into single-user, non-GUI, CLI mode:
    Code: Select all
    Follow the prompts. You must install the OpenGL 32-bit libraries. Answer "Yes" when asked if you would like to run the nvidia-xconfig utility.
  • GPU3 v6.41r2 console client link
You must have completely separate directories, for the two GPU clients.

Here are the details on how to do it:
  • 'Clone' your existing GPU client's directory, by (for example) creating a '~/fahgpu3_2' directory, and copying all of the files (but none of the subdirectories) to this new directory, from your existing client's directory (eg ~/fahgpu3). The actual name of each directory isn't important, just that there are 2 different directories. In this example, I will continue to call the existing directory 'fahgpu3', and the new directory for the second GPU will be called 'fahgpu3_2'.
  • In the 'fahgpu3_2' directory, delete the files 'queue.dat', 'unitinfo.txt', 'MyFolding.html', and all of the log files (eg 'FAHlog.txt', 'FAHlog2.txt', and 'FAHlog-Prev.txt').
  • In the 'fahgpu3_2' directory, edit the 'client.cfg' file to change the 'machineid' value to be '3', as shown in this example:
    Code: Select all

    You can have any number of GPUs in a system, as long as each one has a unique machineid value, and you invoke each program with the correct '-gpu n' value.
  • I have created the script fahgpu, which helps to automate the process of starting up each GPU client with the correct command-line parameters. Please note that you must make this script file executable, by doing:
    Code: Select all
    chmod u+x fahgpu
    This script uses the values contained in 3 (optionally, 4) 'configuration' files:
    • .gpu = contains the GPU type, either 'nvidia_g80' or 'nvidia_fermi'
    • .nice = the 'nice' value to use when running the program
    • .verbosity = the verbosity level to use when running the program
    • .extra_args = any 'extra' arguments that may be required, this is where you would put the '-gpu 0' and '-gpu 1' values, as appropriate, in each directory (ie '-gpu 0' in 'fahgpu3', and '-gpu 1' in 'fahgpu3_2')
    Here is the script 'fahgpu':
    Code: Select all
    # Folding@home GPU3 Linux/Wine Client
    # fahgpu - Starts the Folding@home GPU3 Linux/Wine Client

    NAME=$(basename $HOME)

    get_gpu() {
       cat $GPU

    get_nice() {
        cat $NICE

    get_verbosity() {
        cat $VERBOSITY

    get_extra_args() {
        if [ -f $EXTRA_ARGS ]; then
            cat $EXTRA_ARGS

    echo -n "Starting $NAME ... "

    if [ ! -d $HOME ]; then
      echo "FAILED"
      echo "Directory $HOME does not exist"
      exit 1

    if [ ! -f $GPU ]; then
      echo "FAILED"
      echo "File $GPU does not exist"
      exit 1

    if [ ! -f $NICE ]; then
      echo "FAILED"
      echo "File $NICE does not exist"
      exit 1
    if [ ! -f $VERBOSITY ]; then
      echo "FAILED"
      echo "File $VERBOSITY does not exist"
      exit 1
    # Now execute the command line to run the program
    nice -n $(get_nice) wine $EXEC -verbosity $(get_verbosity) -forcegpu $(get_gpu) $(get_extra_args)
  • To start up gpu0, do this:
    Code: Select all
    cd ~/fahgpu3
  • To start up gpu1, do this:
    Code: Select all
    cd ~/fahgpu3_2
  • Repeat, as necessary, for as many GPUs as you have in the system (I have had as many as 4 in one system, other people have had 8 (eg quad GTX 295s with water cooling))

This also makes it very easy to change or upgrade GPUs in a system, as was done here.
Over 1.04 Billion Total Points
Over 185,000 Work Units
Over 3,800,000 PPD
Overall rank (if points are combined) 20 of 1721690
In memory of my Mother May 12th 1923 - February 10th 2012
Posts: 741
Joined: Sun May 30, 2010 2:28 pm

Return to unOfficial Linux GPU (WINE wrapper) (3rd party support)

Who is online

Users browsing this forum: No registered users and 1 guest