Problem with Atomic Functions

I have a GeForce 470 GTX and have no problem compiling and running the simpleAtomicIntrinsics example using Visual Studio 2008 in 32-bit Windows XP. I tried then using the addAtomic function in another project I was working on and got the following error:

Error 2 error: identifier “atomicAdd” is undefined

I could not find any difference in the project settings and no obvious #include statements were missing as well. I then tried adding a call to addAtomic into the pre-canned cppIntegration project and got the exact same error so its apparently not just my project.

Has anyone else seen this or know how to fix it? Thanks

Are you compiling with [font=“Courier New”]-arch=sm_20[/font]?

Not explicitly no, but I don’t see where they are doing that in the canned simpleAtomicIntrinsics demo either. Where is the Visual Studio project properties would one add that? Thanks

Project / Properties / Configuration Properties / CUDA Build Rule / General / GPU Architecture

Project / Properties / Configuration Properties / CUDA Build Rule / General / GPU Architecture

Thanks for the help, the problem is solved. In the CUDA Build Rules there are 3 places for GPU Architecture and the initial settings that didn’t were:

GPU Architecture (1) sm_10

GPU Architecture (2) sm_20

GPU Architecture (3) 0

To Fix it I had to modify it to the following:

GPU Architecture (1) 0

GPU Architecture (2) sm_20

GPU Architecture (3) 0

Thanks for the help, the problem is solved. In the CUDA Build Rules there are 3 places for GPU Architecture and the initial settings that didn’t were:

GPU Architecture (1) sm_10

GPU Architecture (2) sm_20

GPU Architecture (3) 0

To Fix it I had to modify it to the following:

GPU Architecture (1) 0

GPU Architecture (2) sm_20

GPU Architecture (3) 0