Installing CUDA on a Windows
Follow the instructions on how to install CUDA from NVIDIA's website.
- After CUDA is successfully installed, you will need to tell Continuity where it was installed. Make sure that after installation that you have CUDA_BIN_PATH, CUDA_INC_PATH and CUDA_LIB_PATH set to the location of where CUDA was installed (e.g., C:\CUDA\bin, C:\CUDA\include, C:\CUDA\lib) and also include the CUDA\bin directory in your PATH variable.
Lastly, CUDA needs to be able to link after compiling, and you will need to provide a linking tool (e.g., cl.exe as included with Microsoft's Visual Studio). You will need to add the location of that cl.exe file to Continuity's build environment, and that is located at: <CONT_ROOT>/pcty/MglToolsLibWin/msys/1.0/home/<username>/.profile.
Installing CUDA on a Mac OS X
- Make sure your OS is up to date (I used Mac OS X 10.5.6)
Download Tookit and SDK from here
- Install the Tookit (NVIDIA_CUDA_Tookit_MacOSX.pkg)
When you get to the "Installation Type" step, you must click the "Customize" button!
- Make sure that everything is checked including "CUDAKext"
- Click "Install"
- When installation completes, it should prompt you to restart your computer. If it doesn't, something is probably wrong!
- Open your ~/.profile script, and add this line:
- Either close any open shells, or type "source ~/.profile" to update them.
- Install the SDK (NVIDIA_CUDA_SDK_2.02.xxx.pkg)
- From the shell, do this:
cd /Developer/CUDA/ make cd bin/darwin/release ./particles
Installing on a Snow Leopard
- Most of the instructions above work; however, /Developer/CUDA is now /Developer/GPU Computing/C
- In addition to the toolkit and SDK, the driver package needed to be installed, Driver 2.3.1a worked for me
- There seems to be an issue with the order in which things need to be installed, and it seems if you install the Driver 2.3.1a before the toolkit or SDK, things do not get installed correctly, and so, you should install Driver 2.3.1a after the toolkit and SDK.
- Once everything is installed, go to: /Developer/GPU Computing/C and do:
make clobber make i386=1
Running CUDA from Lincoln
Log on to teragrid
- Use "User Portal" Login and Password that you received via U.S. Mail
- Log on to abe
Click "My Teragrid" > "Accounts"
- You should get a list of all the clusters you have access to. Click "Login" for the Abe cluster
This will open up a web-based ssh client. I prefer to use putty, ssh, or just about anything else to this environment. If you don't mind using this web-based client, you can skip this step. Otherwise, authorize a public key like this:
- Create a file .ssh/authorized_keys
- Add your public key to that file
To enable the cuda environment (compiler, etc.) you must:
- Edit ~/.soft
- Add these two lines to the bottom of the file:
- You may need to log out and back in after doing this
- Test that it worked by typing "which nvcc"
- Compile the examples:
cd $HOME cp -r /usr/local/NVIDIA_CUDA_SDK nvidia_examples cd nvidia_examples/ make
- Request an interactive job on 1 node with 8 processors for 5 minutes:
qsub -A bzx -I -V -q lincoln -l walltime=00:05:00,nodes=1:ppn=8
- cd ~/nvidia_examples/bin/linux/release
- This information was mostly gleaned from these sources:
Installing CUDA on a Ubuntu machine
- Make sure you have root access
Download the CUDA Driver, Tookit, and SDK from here
- Make sure to select your correct distribution (I used Ubuntu 8.04)
- Press Ctrl-Alt-F2 to bring up a non-gui prompt
- Install CUDA Driver
- sudo /etc/init.d/kdm stop
with gnome you may need to use this: /usr/X11R6/etc/rc.d/gdm.sh stop
- or with gnome you may need to use this: /etc/init.d/gdm stop
- uname -a (gives you the kernel version you'll need for next step)
- sudo apt-get install linux-headers-'uname -r'
- sudo apt-get install build-essential
- sudo sh NVIDIA...
- sudo /etc/init.d/kdm start
- sudo /etc/init.d/kdm stop
- Install CUDA Toolkit
- Install CUDA SDK
- Build SDK examples
- sudo apt-get install libxi-dev
- sudo apt-get install libglut-dev
- cd ~/NVIDIA_CUDA_SDK
- cd bin/bin/linux/release
Installing CUDA on a 64 bit Ubuntu machine with 8.10
- Follow the instructions above up to the "make" step
- open common/common.mk and remove 03 flag from COMMONFLAGS
- Some additional packages were missing; using apt-file (apt-get install apt-file;apt-file update) I was able to find them...
- First Xmu was missing:
- apt-file search Xmu | grep dev
- apt-get install libxmu-dev
- Next gnu/stubs-32.h was missing:
- apt-file search gnu/stubs-32.h | grep dev
- apt-get install libc6-dev-i386
- Run cudaprof
- - Download if you don't already have it - /usr/local/cuda/cudaprof/bin/cudaprof
- Make a file somewhere called "temp.sh" like this
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib/ /usr/bin/python /home/lionetti/rl2_gen_dev/ode_cuda_be/test_odes.pyWhere test_flaim.py is the name of the python script that runs your code
Profile > Session Settings
- Set stuff up, and select which outputs you want
- Make sure to tell it to run in detached window