1

I installed CUDA Toolkit 3.2, CUDA SDK and MS Visual Studio 2008 (not necessarily in this order) on my Windows 7 that does not have an nvidia graphics card. But when I try running my CUDA code, the CUDA keywords are'nt identified. I am a beginner. Pls tell me what I am doing wrong here.

Thanks

bespectacled
  • 2,801
  • 4
  • 25
  • 35

6 Answers6

1

You if are trying to execute cuda programs on non gpu machines, I would suggest you to try mCUDA. It doesn't need GPU or Graphics card for CUDA execution.

sandeep.ganage
  • 1,409
  • 2
  • 21
  • 47
1

The installation of CUDA development tools on a system running the appropriate version

 Verify the system has a CUDA‐enabled GPU and a supported version of OS.

    Many [NVIDIA products today contain CUDA‐enabled GPUs][1]. These include: 

          NVIDIA GeForce® 8, 9, 200, and 400 series GPUs

          NVIDIA Tesla™ computing solutions

          Many of the NVIDIA Quadro® products

 Verify the NVIDIA driver and the CUDA software.

 Update the NVIDIA driver.

 Install the CUDA software.

 Verify the the CUDA software linking With VS2008/VS2010

For that you can check my Blog Also http://hemprasad.wordpress.com/2012/10/12/cuda-installation-on-vs-2010/


Test your installation by compiling and running one of the sample programs in the CUDA software to validate that the hardware and software are running correctly and communicating with each other.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Hemprasad
  • 109
  • 9
1

Are you building using nvcc? If not, Visual C++ will choke on the CUDA-specific syntax.

ChrisV
  • 3,363
  • 16
  • 19
  • No. I am rebuilding the project and running it. I am not using nvcc. Should I ? Basically, I select C++ "empty project" and do FileName.cu But syntax is'nt highlighted. – bespectacled Jan 20 '11 at 02:53
1

You should be able to build the SDK samples with your setup, but you won't be able to run since you do not have a CUDA capable GPU. Emulation is no longer supported, so you have a couple of options available:

Check out this stackoverflow post for details of syntax highlighting and more in VS2008.

Incidentally, if you installed the Toolkit before VS2008 then the rules files will not have been copied to the VS directories (clearly, since they didn't exist). You can find them and instructions in the CUDA Toolkit in the extras directory.

Community
  • 1
  • 1
Tom
  • 20,852
  • 4
  • 42
  • 54
0

CUDA is only supported on machines with nVidia video cards. That is likely an issue.

Furthermore, you need to install drivers (dev or otherwise) that is new enough to support the CUDA Toolkit version.

Third, what do you mean by the keywords aren't identified? Do you mean there's no syntax highlighting in your IDE? If so, try [this][1]http://codereflect.com/2008/09/04/how-to-enable-syntax-highlighting-for-cuda-files-in-visual-studio-2005/

peakxu
  • 6,667
  • 1
  • 28
  • 27
  • OK, I installed MS VS 2008, CUDA Toolkit 3.2, CUDA SDK and the driver found on this page http://developer.nvidia.com/object/cuda_3_2_downloads.html But I am not able to install the driver since a compatible graphics hardware is not found. But is'nt that the whole point of using it in emulator mode? – bespectacled Jan 20 '11 at 03:20
0

If you don't have a NVIDIA card, you can still use the emulator but you need to install the SDK and the toolkit. Try to fix your problem by adding in your Visual Studio project settings the include and library path of CUDA.

Maxence SCHMITT
  • 609
  • 4
  • 12