Compiling CUDA in Visual Studio

Hi

I need some help getting cuda (and ulitmatly OpenCL to work).

I am using Windows XP 32-bit SP3.

I downloaded Visual Studio 2010 Professional Trial version.

I went throught the “Getting Started: NVIDIA CUDA Development Tools 2.3” manual.

Having downloaded the nvidia driver, cuda toolkit and SDK I am able to run the sample binaries.

However, I cannot compile anything. I’m not sure if I’m compiling correctly, how it picks up the

nvcc compiler etc…

However,

Before going into the error messages I want to make clear whether I’m going in the right direction.

From looking the forums, it looks like VS2010 is not supported by CUDA. Is this still the case?

So I’m thinking now I should get VS2008. Is the free VS supported (express edition)? And is it

worth me also getting Parallel Nsight?

Finally if I get VS2008 can I just compile simply through Visual Studio, or do I need to do some

extra setups. I’m afraid I’m new to VS as well as CUDA. Just looking for some pointers here. External Image

Thankyou for any advice. It is greatly appreciated.

Hi,

Visual studio 2010 not yet supported, but you can use vs2008 express.
I think nsight is a paid software but not sure about this.

Thanks for your help, I have now got VS 2008 Express. The code compiled but gets a runtime error.

It is a simple copy of the template problem that comes with the SDK:

“cutilSafeCall<> Rutime API error: unspecified driver error”

I think I’m going to start again, remove everything driver/toolkit/sdk/vs2010 and reinstall with the vs2008.

http://www.clubic.com/telecharger-fiche211…tudio-2010.html

Reinstall API driver, SDK, and be sure you are using a NVIDIA graphic card.

Download VS2008 express from here:

[url=“http://www.microsoft.com/express/Downloads/Download-2008.aspx”]http://www.microsoft.com/express/Downloads...nload-2008.aspx[/url]

But I do not see absolutely any reason why your code is not compiling on VS2010. I will try it for myself to see if something significant has changed.

Download VS2008 express from here:

[url=“http://www.microsoft.com/express/Downloads/Download-2008.aspx”]http://www.microsoft.com/express/Downloads...nload-2008.aspx[/url]

But I do not see absolutely any reason why your code is not compiling on VS2010. I will try it for myself to see if something significant has changed.

Thanks Salmon I will be interested to know if vs2010 works for you. I’m in a complete mess now- I

re-installed all the CUDA stuff, but I did not remove VS2010 as I’'m a bit reticent to do that

incase I want to use it in the future, and I’m only on a trial currently. So I have both vs2010 and

vs2008express installed.

Before (before reinstalling stuff and getting vs2008express) I could run the example binaries like

bandwidthtest/devicequery etc… fine, but could not compile. Now using vs2008 I can compile but

not run (either my program or any of the examples). When I try running the deviceQuery.exe I get

the message:

"CUDA Device Query version

cudaGetDeviceCount FAILED CUDA driver and Runtime version may be mismatched"

However, I have just re-downloaded both of these from the CUDA download page.

Could it be a problem that I have two versions of Visual studio installed?

Thanks Salmon I will be interested to know if vs2010 works for you. I’m in a complete mess now- I

re-installed all the CUDA stuff, but I did not remove VS2010 as I’'m a bit reticent to do that

incase I want to use it in the future, and I’m only on a trial currently. So I have both vs2010 and

vs2008express installed.

Before (before reinstalling stuff and getting vs2008express) I could run the example binaries like

bandwidthtest/devicequery etc… fine, but could not compile. Now using vs2008 I can compile but

not run (either my program or any of the examples). When I try running the deviceQuery.exe I get

the message:

"CUDA Device Query version

cudaGetDeviceCount FAILED CUDA driver and Runtime version may be mismatched"

However, I have just re-downloaded both of these from the CUDA download page.

Could it be a problem that I have two versions of Visual studio installed?