JLinX – Blog

Weblog von Jan Linxweiler

How to Use CUDA on Linux in Emulation Mode

Filed under: Development,HPC,Linux — Jannis at 5:11 pm on Tuesday, February 19, 2008
  1. Get CUDA Toolkit version 1.1, CUDA SDK version 1.1 for Linux and NVIDIA Driver for Linux with CUDA Support from NVIDIAs CUDA Zone.
  2. Install the Toolkit and the SDK as root by executing the *.run files.
  3. Add the location of the CUDA binaries (nvcc) to your PATH environment variable and the location of the CUDA libraries to your LD_LIBRARY_PATH environment variable:
    export PATH=$PATH:<CUDA_INSTALL_PATH>/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<CUDA_INSTALL_PATH>/lib
  4. If you have no NVIDIA card installed you need to extract the libcuda.so library from the Driver bundle by executing the driver’s .run file with the option
    ‘–extract-only’
    Copy the /lib/*.so files of the driver packages to the other CUDA libraries (/usr/local/cuda/lib).
    Add a symbolic link:
    ‘sudo ln -s libcuda.so.169.09 libcuda.so’
    (In my case the lib is named “libcuda.so.169.09”. It my be different on your system.)
  5. Go to the SDK directory and run make with emulation option enabled:
    ‘make emu=1’ or ‘make emu=1 dbg=1′ for debug mode
  6. Run the examples in ./bin/linux/emurelease …  

HAVE FUN! (-;

4 Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.