CUDA

From SurfLab

Jump to: navigation, search

Setting up CUDA

Ubuntu

http://lifeofaprogrammergeek.blogspot.com/2008/05/cuda-development-in-ubuntu.html

contains the instructions we use for setting up CUDA on the ubuntu machines. Everything above "# Add environment variables" is already done, the rest needs to be done per user.

bash

The following are the steps needed to get started with CUDA on 313-05. Each user will need to do this. The first section is bash specific, translate it into your favorite shell to suit your needs.

  • Add environment variables
  echo "# CUDA stuff
  PATH=\$PATH:/usr/local/cuda/bin
  LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib
  export PATH
  export LD_LIBRARY_PATH" >> ~/.bashrc

restart the terminal for the changes to take effect.

  • Install the CUDA SDK

This should be installed to your home directory, probably.

  /NVIDIA_CUDA_SDK_2.02.0807.1535_linux.run
  • compile and run an example
  cd ~/NVIDIA_CUDA_SDK/
  make
  ~/NVIDIA_CUDA_SDK/bin/linux/release/fluidsGL
Personal tools