redefinition of __cudaRegisterLinkedBinary error

All,

After much troubles with the post-14.1 series of PGI, I’m getting close to getting it to work with my code. It compiles just fine but has an issue at the link stage:

In file included from /opt/pgi/linux86-64/14.6/include_acc/linkstub60.c:10:
/tmp/pgcudawGZcgxFgsL_.reg.c:13: error: redefinition of ‘__cudaRegisterLinkedBinary_home_mathomp4_Models_Ganymed_4_0_PGI146_OMPI181_GEOSagcm_Linux_lib_libRRTMG_a_9c583aa0’
/tmp/pgcudawGZcgxFgsL_.reg.c:11: note: previous definition of ‘__cudaRegisterLinkedBinary_home_mathomp4_Models_Ganymed_4_0_PGI146_OMPI181_GEOSagcm_Linux_lib_libRRTMG_a_9c583aa0’ was here
pgacclnk: child process exit status 2: /opt/pgi/linux86-64/14.6/bin/pgnvd
make: *** [GEOSgcm.x] Error 2

I compiled and linked with:

-Mcuda=nofma,ptxinfo,6.0,cc20 -acc -ta=nvidia:nofma,6.0,cc20

and I get the same issue with 5.0.

If I instead use:

-Mcuda=nofma,ptxinfo,6.0,cc20,nordc -acc -ta=nvidia:nofma,6.0,cc20,nordc

I can link. So, obviously the issue is rdc. Now, at present, this code doesn’t use $acc routine or any of the other rdc-necessary features, but it might soon. Thus, it would be nice to overcome this issue. Does anyone out there have a solution for this?

Thanks,
Matt

Hi Matt,

Is this the same issue you reported via Carl when linking with an Accelerated library? We were able to find the issue with TPR#20408, it had to do with how symbols were getting appended to the __nv_module_id section to the object file. The fix will available in the 14.7.

Apologizes that you have had issues when we made the switch to using RDC. We try to find and test many cases but it’s difficult to test all possible. Though, we should talk about adding your full application in our daily or at least weekly testing. He have some of your smaller tests, but not the full app. Drop me note if you think it’s possible.

Thanks,
Mat

Hmm. Maaaaybe? This issue does look like what I reported in this thread? I think that’s one of the bits of our code Carl is using, so he might have reported that.

Matt