wow2006 / cudpp

Automatically exported from code.google.com/p/cudpp
Other
0 stars 0 forks source link

atomicAdd not supported for compute_30 #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In CUDPP v2.0, src\cudpp_hash, file CMakeLists.txt, change from/to

- set(GENCODE_SM20 -gencode=arch=compute_20,code=sm_20 
-gencode=arch=compute_20,code=compute_20)

- set(GENCODE_SM30 -gencode=arch=compute_30,code=sm_30 
-gencode=arch=compute_30,code=compute_30)

Then compilation fails due to identifier atomicAdd not defined. I start 
compilation from Visual Studio 2010 Professional.

Using the original settings (compute_20), compilation is OK.

I'm using Windows 7, CUDA 4.2, GTX670, Display Driver 301.42.

Thanks for helping out.

Original issue reported on code.google.com by Sigurd.V...@gmail.com on 6 Sep 2012 at 4:19

GoogleCodeExporter commented 9 years ago
This error occurs for Debug as well as Release builds (Win32).

For your information, here's the exact error as reported in the Output window:

cudpp_src_2.0/src/cudpp_hash/debugging.cu(59): error : identifier "atomicAdd" 
is undefined

Hoping this forum is still alive and kicking?

Greetings!

Original comment by Sigurd.V...@gmail.com on 10 Sep 2012 at 8:58

GoogleCodeExporter commented 9 years ago
Going forward myself, found that __CUDA_ARCH__ is defined as 100 while it 
should be 300. And so, the atomicAdd in sm_11_atomic_functions.h is not 
compiled.

I can force the build (I guess) but where do things really go wrong?
Thanks for helping out!

Original comment by Sigurd.V...@gmail.com on 10 Sep 2012 at 9:59

GoogleCodeExporter commented 9 years ago
Sigurd, please try to build with CUDA 5.0 RC: 
http://developer.nvidia.com/cuda/cuda-pre-production

Original comment by harr...@gmail.com on 10 Sep 2012 at 10:03

GoogleCodeExporter commented 9 years ago
OK, in the same CMakeLists.txt, you should also replace the new GENCODE_SMxx to 
the OPTIONS field of the cuda_add_library() function... of course.

You may also want to list SM11-13 and SM20-21 for backward compatibility with 
older cards, if your compile heap can handle it. Compilation with GENCODEs 20 
and 30 work fine on on machine with 8GB.

--Issue closed--

Original comment by Sigurd.V...@gmail.com on 10 Sep 2012 at 2:41

GoogleCodeExporter commented 9 years ago
Not closed until we fix it.  I'm assigning this to John since cudpp_hash is his 
(well, more than mine).  John, you need to make sure the CMakeLists.txt does 
not attempt to compile cudpp_hash for sm_10 -- it uses atomicAdd, which 
requires at least sm_11.

Original comment by harr...@gmail.com on 24 Sep 2012 at 10:14