What steps will reproduce the problem?
1. Update to cuda 3.1
2. Compile with cuda 3.1 nvcc
3.
What is the expected output? What do you see instead?
The linking should produce a shared lib. Instead get a linking error:
ld: duplicate symbol OperatorMin<double>::identity() constin
./cudpp_generated_scan_app.cu.o and ./cudpp_generated_compact_app.cu.o
collect2: ld returned 1 exit status
make[2]: *** [lib/libcudpp.dylib] Error 1
What version of the product are you using? On what operating system?
1.1.1
Please provide any additional information below.
Prior to the 3.1 release, nvcc treated __device__ functions as implicitly static. This behavior has changed with the 3.1 release. As a result, the host linker will give a link error regarding multiple defined symbols, if two identical __device__ functions are defined in two different compilations units. For example, when including function definitions through the #include <> mechanism; or a __device__ function and an identical host function are defined in two different compilations units.
For both cases, declaring the __device__ function as static will make the
compilation succeed.
Original issue reported on code.google.com by kashif.r...@gmail.com on 27 Jun 2010 at 4:27
Original issue reported on code.google.com by
kashif.r...@gmail.com
on 27 Jun 2010 at 4:27