1

I am a beginner in CUDA,I am trying to run the examples given in GPU Computing SDK but it is giving me following error.

File: C:\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.1\C\src\vectorAdd\vectorAdd_vs2008.vcproj Line: 22 Column: 4 Error Message: Custom build rules file 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCProjectDefaults\NvCudaRuntimeApi.rules' was not found or failed to load. The file 'C:\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.1\C\src\vectorAdd\vectorAdd_vs2008.vcproj' has failed to load.

Can anybody please tell what m i missing and where can I get this rules file as I am not able to find it in SDK.

Thanks,Any suggestion will be very helpful.

ATG
  • 732
  • 3
  • 11
  • 21
  • possible duplicate of [How do I start a new CUDA project in Visual Studio 2008?](http://stackoverflow.com/questions/2046228/how-do-i-start-a-new-cuda-project-in-visual-studio-2008) – talonmies Apr 19 '12 at 10:55
  • Looks like he hasn't installed the toolkit to me, or the rules file was not copied correctly. Note that it has not been called cuda.rules for a while now! – Tom Apr 19 '12 at 15:28
  • See http://stackoverflow.com/questions/3778799/how-do-i-start-a-cuda-app-in-visual-studio-2010/7285235#7285235 especially the later answers updated for CUDA 4.x – Martin Beckett Apr 19 '12 at 18:45
  • Thanks for your reply..I have configured it. – ATG Apr 20 '12 at 09:03

1 Answers1

2

Have you installed the CUDA Toolkit? The "SDK" is basically a set of examples, you will need the Toolkit as well since it includes the compiler itself.

When you install the CUDA Toolkit (available here) it will install the NvCudaRuntimeApi.rules into the Visual Studio directory. If for any reason it cannot find Visual Studio (you install VS after CUDA, for instance), you can find the rules file in \extras\visual_studio_integration\rules.

Once you've installed the Toolkit and got the SDK samples working, check out this post for how to get started with your own project (or this post for VS2010).

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