How to Use CUDA on Linux in Emulation Mode
- 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.
- Install the Toolkit and the SDK as root by executing the *.run files.
- 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 - 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.) - Go to the SDK directory and run make with emulation option enabled:
‘make emu=1’ or ‘make emu=1 dbg=1′ for debug mode - Run the examples in ./bin/linux/emurelease …
HAVE FUN! (-;