Department of Electrical Engineering and Computer Science



Using CUDA On EECS Systems

Only a small number of EECS systems have NVIDIA video cards capable of running CUDA applications. In addition to having an appropriate video card, systems need to run a special video driver. 

Is my system enabled for CUDA?

You can check whether the on which you are logged in is enabled for CUDA by running the following command. Note: Make sure to run this from a directory where you have write access, or the command will hang:

#> /pkgs/cuda-5.5/samples/bin/x86_64/linux/release/deviceQuery 

On a CUDA-capable system you will receive details about the adapter(s), e.g:

/pkgs/cuda-5.5/samples/bin/x86_64/linux/release/deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GT 640"

CUDA Driver Version / Runtime Version 5.5 / 5.5
CUDA Capability Major/Minor version number: 3.0
Total amount of global memory: 1024 MBytes (1073414144 bytes)
( 2) Multiprocessors, (192) CUDA Cores/MP: 384 CUDA Cores
GPU Clock rate: 954 MHz (0.95 GHz)
Memory Clock rate: 2500 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

 

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 5.5, CUDA Runtime Version = 5.5, NumDevs = 1, Device0 = GeForce GT 640
Result = PASS


If you receive an error such as:

/pkgs/cuda-5.5/samples/bin/x86_64/linux/release/deviceQuery: error while loading shared libraries: libcudart.so.2: cannot open shared object file:
No such file or directory

or:

CUDA Device Query (Runtime API) version (CUDART static linking)
There is no device supporting CUDA

then your system is not CUDA-enabled.

What version of CUDA is available?

Run the same command as in the previous question and deviceQuery will return versioning information such as:

CUDA Driver Version / Runtime Version 5.5 / 5.5
CUDA Capability Major/Minor version number: 3.0

Will you enable CUDA on my desktop Ubuntu system?

We can install the CUDA-enabled video driver on your system, provided its video card is capable of supporting CUDA. Try to find the manufacturer and model of your video card by running:

#> lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640 OEM] (rev a1)

In the above example, the system has a NVIDIA GeForce GT 640 video card. Only certain nVidia cards are CUDA-capable. See this website for more information: NVIDIA. Enabling the CUDA driver on your system may require a reinstall of the OS.

Where is the CUDA toolkit?

NVIDIA's CUDA toolkit is available in /usr/local/cuda on all EECS Ubuntu  systems. You will want to add /usr/local/cuda/bin to your shell's PATH variable before attempting CUDA development.

Where is the CUDA Toolkit?

A copy of the CUDA SDK for Linux has been installed in /usr/local/cuda. You may still want to use your own copy for development. You can copy or rsync the necessary files to your home area or download a supported version of the Toolkit fom CUDA SDK. The SDK sample applications are available in /usr/local/cuda/sdk/C/bin/linux/release. Try particles for a GUI CUDA application.

How do I write CUDA applications?

Guides to writing CUDA applications can be found at CUDA Education.

CUDA applications crash my X-Windows desktop

Be sure to turn off "Extra" visual effects in the Gnome Appearance Preferences. The compositing window manager can cause problems with CUDA GUI applications. The Appearance Preferences can be found in System → Preferences → Appearance - click on the "Visual Effects" tab.


 

The University of Tennessee, Knoxville. Big Orange. Big Ideas.

Knoxville, Tennessee 37996 | 865-974-1000
The flagship campus of the University of Tennessee System