Department of Electrical Engineering and Computer Science

Using CUDA On EECS Systems

Some EECS systems have NVIDIA video cards capable of running CUDA applications, but many do not. In addition to having a capable video card, a special video driver is also needed for CUDA. The tesla lab systems have CUDA available, but the hydra lab systems do not.

Is my system enabled for CUDA?

You can check whether the computer 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:

#> /usr/local/cuda/samples/bin/x86_64/linux/release/deviceQuery 

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

/usr/local/cuda/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 GTX 645"
  CUDA Driver Version / Runtime Version          7.5 / 7.5
  CUDA Capability Major/Minor version number:    3.0
  Total amount of global memory:                 1021 MBytes (1070268416 bytes)
  ( 3) Multiprocessors, (192) CUDA Cores/MP:     576 CUDA Cores
  GPU Max Clock rate:                            824 MHz (0.82 GHz)
  Memory Clock rate:                             2000 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 Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 645
Result = PASS

If you receive an error such as:

/usr/local/cuda/samples/bin/x86_64/linux/release/deviceQuery Starting...

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

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

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          7.5 / 7.5
CUDA Capability Major/Minor version number:    3.0

Will you enable CUDA on my desktop Red Hat Enterprise Linux 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 Red Hat Enterprise Linux 7 systems. You will want to add /usr/local/cuda/bin to your shell's PATH variable before attempting CUDA development. 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/samples/bin/x86_64/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