10 Replies Latest reply on Jun 12, 2009 5:34 PM by emuller

    AIT and Nvidia GPU in the same linux box

    seiya_ni

      I am buying ATI Stream 9270 and Nvidia Tesla C1060, and will try to compare their performance.

      Can I install them into the same linux box and run AIT Stream and CUDA programs on it?

        • AIT and Nvidia GPU in the same linux box
          karx11erx

          Not at the same time, I guess.

          • AIT and Nvidia GPU in the same linux box
            sgratton

             

            Hi there,

             

            I've been able to run cal and cuda at the same time, so far with success and proving to be more convenient than my previous dual-boot arrangement, as follows. This is with a Scientific Linux 5.1 64 bit (clone of RHEL) with a Radeon HD 3870 and an Nvidia GTX260. The procedure seemed a bit "hairy" but appears to work (I don't know if you can just install one driver after another in case they interfere with each other about X/opengl stuff). Note I am not a linux expert so consider this "informational" only! The key thing to note is that CAL needs X running with the ATI driver whereas cuda only needs the Nvidia kernel module in place, and indeed Nvidia provide a script to enable one to run cuda programs at runlevel 3. So one does a "minimal" Nvidia install followed by a "regular" ATI install. Note with this setup no cuda-graphics interop is possible.

             

            So, from memory, something like this should work:

             

            Uninstall any existing Nvidia/ATI drivers

             

            Put the ATI card in your primary PCIe slot with a monitor attached

             

            Install linux if you haven't done so already.

             

            Put the Nvidia card(s) in your secondary PCIe slot without a monitor connected

             

            In runlevel 3 as root,

             

            Download the nvidia driver, NVIDIA*.run (version 180.60 in my case)

             

            Extract the contents with ./NVIDIA*.run -x

             

            Go into the usr/src/nv subdirectory of the directory just created

             

            Make and install the nvidia kernel module with "make module" and then "make install"

             

            Now go to usr/lib and copy libcuda.so.180.60 to /lib64

             

            Make links from libcuda.so to libcuda.so.1 and from libcuda.so.1 to libcuda.so.180.60 in /lib64

             

            Copy usr/include/cuda/cuda.h from the directory to /usr/include/cuda/cuda.h

             

            There might be an alternative to some of the above steps (say by running nvidia-installer in advanced mode, dumping everything except the kernel module into /tmp and copying across the library and headers from there).

             

            Next you need to put the script Nvidia provide in their release notes into a suitable place. I'm a total amateur here, but I copied /etc/rc.d/rc.local to /etc/rc.d/rc.mylocal, merged the nvidia material into it, then changed the "S99local" symbolic link in /etc/rc.d/rc5.d to point to rc.mylocal. I may have had to change some of the commands to use the full paths to them also. (If an expert can tell me a better thing to do here I'd be very grateful.)

             

            Then, in runlevel 5, run the ati-driver-installer with the default settings.

             

            Log out and log in again.

             

            Now, install the cuda toolkit and ati stream.

             

            Add a .conf file into /etc/ld.so.conf.d/ containing the locations of the cuda libraries (typically /usr/local/cuda/lib), run ldconfig.

             

            Logout as root.

             

            Now login as a regular user (at runlevel 5), set up the path, manpath and environment variables appropriately, and try it!

             

            (Hope I haven't forgotten anything...!).

             

            Best,

            Steven.