PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Can't profile code, compile time error _mcount

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
BrockP



Joined: 30 Oct 2008
Posts: 5

PostPosted: Thu Oct 30, 2008 1:52 pm    Post subject: Can't profile code, compile time error _mcount Reply with quote

Using pgi/7.2 trying to compile a users code with profiling. The user links the code into a shared library which he then dlopen()'s latter and uses.

When he trys to link the library he gets an error:

Linking CompressibleNS shared object:
ld -shared --export-dynamic -undefined dynamic_lookup -soname=../../lib/libCompressibleNS.so -o ../../lib/libCompressibleNS.so xf_CompressibleNS.o xf_CompressibleNS_Diff.o xf_CompressibleNS_Conv.o
ld: xf_CompressibleNS.o: relocation R_X86_64_PC32 against `_mcount' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value

Any insight? the 'relocation' part normally means that I need to use -mcmodel=medium but there is no way that is right for this code. (not needed when not profiling). Also the code compiles and profiles with gcc just fine. Just runs faster under pgcc, so wanted to profile with pgcc also.

Any help would be good.

Brock Palen
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Thu Oct 30, 2008 3:32 pm    Post subject: Reply with quote

Hi Brock,

Unfortunately, we don't yet support profiling within shared objects. We do have an open feature request (TPR#14852), but I don't know the time frame when we'll be able to add this.

Best Regards,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group