Steps for installing Visual Studio 2013

CS 179 CUDA Installation Guide (Windows)
Overview:
CS179 will require use of computer with an NVIDIA GPU to compile and run CUDA source code. We
have several CUDA-enabled computers for students to use for the course, remotely or directly. If you
would rather use your own computer, follow this guide to install CUDA on your Windows computer.
OS-Independent Prerequisites:
1) An NVIDIA GPU of compute capability (version) 2.0 or higher. (AMD GPUs won't work)


A full list of CUDA supported GPUs and their compute capabilities is maintained here:
https://en.wikipedia.org/wiki/CUDA#Supported_GPUs
Laptops with an NVIDIA GPU in addition to an Intel integrated GPU do support CUDA.
Installing CUDA on Windows
Prerequisites for Windows installation
The only Windows-specific prerequisite for CUDA, is Microsoft Visual Studio 2013, 2012, or 2011. For
this installation guide, we used Visual Studio 2013 Community Version (Free).
Steps for installing Visual Studio 2013
Step 1) Download and run the network installer: http://go.microsoft.com/fwlink/?LinkId=517284
Step 2) Choose optional features. CS 179 does not require any of them. You may deselect these options
as shown below. Once your options are set, follow all confirmation pages to install Visual Studio.
CUDA Installation Steps
Step 1) Navigate to: https://developer.nvidia.com/cuda-downloads click "Windows".
Step 2) Select your relevant Windows version, and select "exe (local)". Finally, click "Download" and run
the exe once the download completes.
Step 3) Confirm the extraction path and wait for CUDA Setup to complete
Step 4) Select"AGREE AND CONTINUE".
Step 5) Select "Express" Installation and press "NEXT". Ensure that there are no warnings/errors about
Visual Studio missing. If such a message appears, cancel installation and refer back to section "Steps for
installing Visual Studio 2013"
Step 6) Confirm install
Step 7) Close the confirmation and open a command prompt by pressing the windows key + r and then
typing "cmd" and pressing enter. From here, type "cl" to verify that the Microsoft C++ compiler is
recognized as shown below:
ONLY IF "cl" is not recognized, perform a search on your system for the cl application to get its location.
On the system used for this tutorial, cl was located at:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
Once you have the location of cl, add it to the system path as described here:
http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
Step 8) Download the cuda source file "query.cu" into the current directory with the following one-line
command:
bitsadmin /transfer myDownloadJob /download /priority normal
https://raw.githubusercontent.com/sunbonilla/CUDA-GPU-DeviceQuery/master/query.cu %cd%\query.cu
Your command prompt should look like this:
Once that download completes, compile and run the CUDA file with the commands
nvcc query.cu -o query
query
Example output:
If your system has one GPU and the "Kernel execution timeout" value is yes, like shown above, you will
need to disable it . On multi-GPU systems, it is sufficient to have one GPU without "Kernel execution
timeout" - this is the GPU that you want to select when writing CUDA code. You will learn how to select
a GPU device within CUDA code later in the course.
In order to disable "Kernel execution timeout" follow these steps:
1) Launch the "Nsight Monitor" program which was installed along with the CUDA toolkit:
2) Go to the system tray and right click the Nsight Monitor icon and click "Options..." To open new
window:
3) Change the "WDDM TDR enabled" value to False, press OK, and reboot your computer.
4) After rebooting your computer, re-run the query program and verify that "Kernel execution timeout"
is set to "No".
Your computer is now ready for CUDA development.
Optional Graphical CUDA Demonstrations:
Step 1) Open the CUDA Samples folder:
Step 2) Open the relevant samples .sln file with Visual Studio:
Step 3) Compile samples by selecting "Build Solution" as shown below. This will take a while. Ignore
warnings/errors in the output log.
Step 4) From your command prompt, cd into the directory with the compiled binaries with the following
command:
cd "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Debug"
Run smokeParticles.exe
A window with a smoke ball will pop up as shown below:
What FPS do you get? I got ~22. Can you explain this difference in terms of our different clock
frequencies, number of SMs, and amount of VRAM?