PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Easy to understand profiling information

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



Joined: 18 Aug 2004
Posts: 1

PostPosted: Tue Aug 02, 2005 10:40 pm    Post subject: Easy to understand profiling information Reply with quote

Hi,

Is there a way to get simple profiling information using pgf77?
What I would like is something as simple as a file that is created at the end of a run that says something like

subroutine A 200 seconds
subroutine C 80 seconds
subroutine D 20 seconds
subroutine A 180 seconds
etc etc

so I can see the flow of my program and how long it spends in each routine.
I've looked the docs for pgtools but trying to read it as a pdf makes it all look very very complicated whereas when I used to do this under xlf77 it was as simple as a command line switch. I don't really want to use a gui because the network here is too slow of any fast response.

Many thanks
Jon
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Aug 03, 2005 10:59 am    Post subject: Reply with quote

Hi Jon,

We do have many different options regarding profiling but the simplest method is to compile and link with "-Mprof=func". After you run your application a "pgprof.out" file will contain the results of the profile.

To view the results using pgprof without the GUI, run pgprof with the "-text" flag and enter 'print' at the prompt. To have the results redirected to a file, enter 'print > myfilename'. You can change the times listed to seconds by entering 'times raw' before the print.
Code:
mm5/Run% pgprof -text

PGPROF Rel 6.0-5
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.


Datafile  : pgprof.out
Processes : 1
Threads   : 1

pgprof> print

Profile output - Wed Aug 03 10:41:34 PDT 2005
Program                           : mm5.exe
Datafile                          : pgprof.out
Process                           : 0
Total Time for Process            : 180.901216 secs
Sort by max time
Select all


                            Routine              Source  Line
  Calls  Time(%)               Name                File   No.

    720       29              sound             sound.F     1
 32,220       21            exmoiss           exmoiss.F     1
    720       10              solve             solve.F     1
  2,315        7              lwrad             lwrad.F     1
 34,740        6             mrfpbl            mrfpbl.F     2
... cut here


If your prefer Gmon profiling, you can replace "-Mprof" with "-pg". After the run a 'gmon.out' file will be created. You can view the results using gprof or pgprof. pgprof works as in the previous example except you need to launch using:
Code:
pgprof -text -exe exe.name gmon.out


Hope this helps,
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