Windows-based Cuda installation (Setup Cuda on Windows)

Source: Internet
Author: User
Tags cuda toolkit

Operating System (OS): Windows 7

Integrated Development Environment (IDE): Microsoft Visual Studio 2008 SP1

Cuda version: 3.0

During Cuda programming, the hardware supporting Cuda is not necessary. Cuda provides a mode for simulating GPU running with CPU, so the Cuda program can be written on any configured machine. However, to experience large-scale parallel high-speed operations of cuda, it is necessary to support Cuda hardware. DownloadCuda download: http://developer.nvidia.com/object/cuda_3_0_downloads.htmlCUDA vs wizard downloads: http://sourceforge.net/projects/cudavswizard/
Installation StepsThe general steps for installing Cuda are:
  1. Install the video card driver;
  2. Install Toolkit (Cuda Toolkit;
  3. Install the SDK and GPU computing SDK;
  4. Configure environment variables and IDE variables.
Step 1. Install the graphics card driver. You can find the latest driver on the Cuda download page. 2. Install toolkit. Sn is used to installing toolkit in the C:/Cuda/TOOLKIT location. 3. Install the SDK (GPU computing SDK) Sn to install it in the C:/Cuda/nvidia gpu computing SDK location; this allows you to conveniently find the files in it. 4. syntax highlighting 4.1 set the usertype of the syntax file compiled by NVIDIA under % nvidia gpu computing SDK %/C/doc/syntax_highlighting/visual_studio_8. copy dat to % PAIA studio %/common7/ide. 4.2 start Visual Studio and choose tools> Options> text editor> file extension ", set the extension to Cu, select Microsoft Visual C ++ in the editor, and click "OK". 4.3 restart Visual Studio.
5. enable Visual Studio with IDE environment variable settings, and choose "Tools"> "options"> "projects and Solutions"> "C ++ directory ", platform select the platform corresponding to your operating system, and then
  • Add the PATH % toolkit %/include and % nvidia gpu computing SDK %/C/common/INC to "include files ".
  • Add the PATH % toolkit %/lib, % toolkit %/lib64, and % nvidia gpu computing SDK %/C/common/lib to the library file.
  • Add the PATH % toolkit %/src and % nvidia gpu computing SDK %/C/common/src to the source file.
6. Add compilation rules 6.1 use Cuda vs wizardcuda vs wizard as an open-source Visual Studio tool written by openhero. After the installation is complete, the cudawinapp template will appear when you create a project in Visual Studio. Creating a project from this template can save a lot of settings; 6.2 After you manually configure the compilation rules to create a new "Win32 console application,
  1. "Project" menu> "Custom generation rules"> "find existing"> Find Cuda under % nvidia gpu computing SDK %/C/Common. rules> "OK"> check the found compilation rules.
  2. "Project" menu> "property"> "linker"> "input"> "add" cudart. Lib cutil32d. lib "in" Additional dependency ".

After the configuration is complete, you can start to write the Cuda program.

--
Snigoal, HUST, Wuhan, China

Reprinted http://snigoalx.spaces.live.com/blog/cns! 5da334179a0000a0a! 228. Entry

 

 

 

 

First of all, there are many similar methods on the Internet, which are complicated, simple, and not necessarily implemented. The method here has been installed and implemented in the 64-bit win7 system, there are some possible problems to solve.

Everybody can refer to this colleague to write the configuration flow, basically can succeed: http://snigoalx.spaces.live.com/blog/cns! 5da334179a0000a0a! 228. Entry.

I will not go into details.

However, after the installation, we usually find that, for a 64-bit system, after the vs2008 program is opened, our vs2008 (I installed this version) cannot go to debug, that is to say, if there is no x64 in the solution platform, or even if there is x64, the debug fails to be found after the selection. This is because we did not install a 64-bit compiler when installing vs2008. In this case, we have already met several people, probably because it was not installed at the time or vs2008 itself was not installed by default, in this case, we need to upgrade and install the 64-bit compiler.

However, we do not need to re-find the 64-bit compiler to re-download and install it. We only need to open the computer ---- uninstall or change the program, find the installation program of vs2008, and click Uninstall. In fact, this is not the time to uninstall it, instead, we will remind you to upgrade or uninstall vs2008. In the upgraded directory, we will find that the 64-bit compiler is installed, install it.

Another possible problem is that "the program cannot be started because cutil64d is lost in the computer. DLL "this problem, we only need to find cutil64d. DLL, and then copy it to the System32 folder under drive C.

 

In this way, the installation and configuration of Cuda in 64-bit Windows 7 environment are basically completed, and our Cuda program can be implemented.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.