CHEN CHEN - 4 months ago 36
Linux Question

Install CUDA-7.5 on a computer using GTX950 and Tesla K40

I'm trying to do install CUDA-7.5 on Ubuntu 14.04, And I have both GTX950 and Tesla K40 inserted in my motherboard.

and the lspci | grep -i nvidia command gives the following result:

01:00.0 3D controlloer: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForece GTX 950] (rev a1)
02:00.1 Audio device: NVIDIA Corporation Device 0fba (rev a1)


I think I have successfully installed CUDA-7.5 on my computer, because I can actually run ./smokeParticles sample in NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/.

But I have one question:


  • How can I be sure that I'm actually using Tesla K40? Because the ./smokeParticles sample is also successful after I unplug the
    Tesla K40 form my motherboard. (I assume that GTX 950 is running the sample...)



Is there a command or something that can tell me I'm using Tesla K40?

Answer

In cuda sample, deviceQuery is used to test whether cuda is installed correctly and show basic information about each card. This will tell you a device number of each cuda device.

For example, I run it on my server:

$ ./deviceQuery |egrep '^Device [0-9]+'
Device 0: "GeForce GTX 980 Ti"
Device 1: "GeForce GTX 980 Ti"
Device 2: "GeForce GTX 980 Ti"
Device 3: "GeForce GTX 980 Ti"

In your cuda application, use cudaSetDevice() to select card to run. Look into the sample source to see how to use it.