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 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
  • CUDA 3.0 32-bit toolkit
    Code: Select all
    wget http://developer.download.nvidia.com/compute/cuda/3_0/toolkit/cudatoolkit_3.0_linux_32_ubuntu9.04.run
    sudo sh cudatoolkit_3.0_linux_32_ubuntu9.04.run
  • NVidia Linux graphics driver v304.64
    Code: Select all
    wget http://us.download.nvidia.com/XFree86/Linux-x86_64/304.64/NVIDIA-Linux-x86_64-304.64.run
    After reboot, into single-user, non-GUI, CLI mode:
    Code: Select all
    sh NVIDIA-Linux-x86_64-304.64.run
    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
    [settings]
    username=art_l_j_PlanetAMD64
    team=45862
    passkey=********************************
    asknet=no
    machineid=3
    bigpackets=big
    local=1

    [http]
    active=no
    host=localhost
    port=8080
    usereg=no
    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
    #!/bin/bash
    #
    # Folding@home GPU3 Linux/Wine Client
    #
    # fahgpu - Starts the Folding@home GPU3 Linux/Wine Client
    #
    #


    HOME=$(pwd)
    NAME=$(basename $HOME)
    EXEC=$HOME/Folding@home-Win32-GPU.exe
    LOG=$HOME/FAHlog.txt
    NICE=$HOME/.nice
    VERBOSITY=$HOME/.verbosity
    GPU=$HOME/.gpu
    EXTRA_ARGS=$HOME/.extra_args



    get_gpu() {
       cat $GPU
    }


    get_nice() {
        cat $NICE
    }


    get_verbosity() {
        cat $VERBOSITY
    }


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


    echo -n "Starting $NAME ... "

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

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

    if [ ! -f $NICE ]; then
      echo "FAILED"
      echo "File $NICE does not exist"
      exit 1
    fi
       
    if [ ! -f $VERBOSITY ]; then
      echo "FAILED"
      echo "File $VERBOSITY does not exist"
      exit 1
    fi
       
    # 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
    ./fahgpu
  • To start up gpu1, do this:
    Code: Select all
    cd ~/fahgpu3_2
    ./fahgpu
  • 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.
art_l_j_PlanetAMD64
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
art_l_j_PlanetAMD64
 
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: Bing [Bot] and 1 guest

cron