PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Using pgcollect on a subset of code?

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



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Mon Sep 28, 2009 10:05 am    Post subject: Using pgcollect on a subset of code? Reply with quote

I am currently trying to profile my code to get more information on how to best accelerate it. I have access to Tau and I can and have built a Tau-profiled version of my code, but the auto-instrumentation can only hit the outer loops. Since my code often involves loops inside loops inside &c., I thought I'd move to pgcollect before trying to hand-instrument my code.

I have used pgcollect before to look at small examples and programs and I love it, but never on the rather massive amount of code that I'm looking at and trying to speed up. I did successfully compile the entire codebase with -Minfo=ccff but when I tried to run the program with pgcollect, the system hanged or stalled out. I could see the pgsampt task in htop, but it just sat there at 0% CPU for five or more minutes.

So, I thought perhaps my code was just too big or the like. Thus, I wondered, is there a way to just compile in the CCFF information (and, perhaps, -Mpfi/pfo) for a subset of my code and then run pgcollect? In truth, I know the three or four Fortran files out of hundreds that I need to focus on thanks to Tau, so it's sort of a waste to do line-by-line profiling of the entire code base.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Sep 28, 2009 1:11 pm    Post subject: Reply with quote

Hi Matt,

Because pgcollect is an external utility that does sample based profiling over the entire program, it wont be able to just profile a portion of the code.

What you can do is compile the interesting source files with "-Mprof=lines". Profiling instrumentation will only inserted for these portions of code. You'll need to also link with "-Mprof=lines" so the profiling runtime libraries are added.

- 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