A quick start on CUDA: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
The cuda sample code can be downloaded from:[http://developer.nvidia.com/cuda-example-introduction-general-purpose-gpu-programming CUDA by example] | The cuda sample code can be downloaded from:[http://developer.nvidia.com/cuda-example-introduction-general-purpose-gpu-programming CUDA by example] | ||
1) | 1) Go to the directory of your sample code. | ||
2) To compile hello_world.cu | 2) To compile hello_world.cu | ||
Line 18: | Line 18: | ||
./a.out | ./a.out | ||
4) Get the output. | 4) Get the output. | ||
Hello, World! |
Revision as of 23:32, 3 March 2012
All machines in coover 2050 are installed with CUDA.
Before you run a simple program, you need to set up environment variables
export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
The cuda sample code can be downloaded from:CUDA by example
1) Go to the directory of your sample code.
2) To compile hello_world.cu
nvcc hello_world.cu
3) Run the executable file: a.out
./a.out
4) Get the output.
Hello, World!