Folks, maybe I'm doing something wrong but I seem unable to get an
annotated output from gprof nor info on which line/s are taking the
time. Any suggestions? Thanks, Michael

[EMAIL PROTECTED]:~/Fortran$ uname -a     
Linux ratty.phy.umist.ac.uk 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC
2007 i686 GNU/Linux

[EMAIL PROTECTED]:~/Fortran$ gprof --version
GNU gprof 2.17
Based on BSD gprof, copyright 1983 Regents of the University of
California.
This program is free software.  This program has absolutely no warranty.

[EMAIL PROTECTED]:~/Fortran$ ifort -O0 -pg timings.f90

[EMAIL PROTECTED]:~/Fortran$ time ./a.out;lshead
 timef:    36.00000    
   438944033   438581944   362089.0           10000  2147483647
 system_clock:    36.20890    

real    0m36.280s
user    0m36.146s
sys     0m0.076s
total 6244
-rw-r--r--  1 michael michael  125475 Oct  6 15:22 gmon.out
drwxr-xr-x 19 michael michael    4096 Oct  6 15:21 ./
-rwxr-xr-x  1 michael michael  368402 Oct  6 15:21 a.out*
drwxr-xr-x 94 michael michael    4096 Oct  6 15:21 ../
drwxr-xr-x  4 michael michael    4096 Aug  8 14:23 MPI/
-rw-r--r--  1 michael michael    1601 Aug  2 18:05 timings.f90
-rw-r--r--  1 michael michael    1604 Aug  2 18:04 timings.f90~
drwxr-xr-x  2 michael michael    4096 Aug  2 17:25 chkProfiling/
-rw-r--r--  1 michael michael     483 Aug  2 11:35 chkWrite.f90
-rw-r--r--  1 michael michael     480 Jul 23 12:58 showPrecision.f90
-rw-r--r--  1 michael michael     485 Jul 23 12:57 showPrecision.f90~
-rw-r--r--  1 michael michael     242 Jul 20 14:23 testIntTime.f90
-rw-r--r--  1 michael michael     236 Jul 20 14:22 testIntTime.f90~
-rw-r--r--  1 michael michael    1046 Jul 13 13:27 calcNum.f90
-rw-r--r--  1 michael michael     886 Jul 13 12:09 calcNum.f90~
drwxr-xr-x  2 michael michael    4096 Jul 10 23:16 DVODE/
drwxr-xr-x  2 michael michael    4096 Jun 20 15:31 chkSize/
drwxr-xr-x  2 michael michael    4096 May 29 12:28 blockData/
-rwxr-xr-x  1 michael michael  367474 May 22 14:34 chkArrayMaths*

[EMAIL PROTECTED]:~/Fortran$ gprof -l ./a.out |less
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 99.84     90.36    90.36        1    90.36    90.36  MAIN__
  0.15     90.50     0.14                             my_for_ran_
  0.02     90.51     0.02                             for_random_number

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

{snip other explanations}

                     Call graph (explanation follows)


granularity: each sample hit covers 2 byte(s) for 0.01% of 90.51 seconds

index % time    self  children    called     name
                                   1             MAIN__ [1]
               90.36    0.00       1/1           main [2]
[1]     99.8   90.36    0.00       1+1       MAIN__ [1]
                                   1             MAIN__ [1]
-----------------------------------------------
                                                 <spontaneous>
[2]     99.8    0.00   90.36                 main [2]
               90.36    0.00       1/1           MAIN__ [1]
-----------------------------------------------
                                                 <spontaneous>
[3]      0.1    0.14    0.00                 my_for_ran_ [3]
-----------------------------------------------
                                                 <spontaneous>
[4]      0.0    0.02    0.00                 for_random_number [4]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index      A unique number given to each element of the table.
                Index numbers are sorted numerically.
                The index number is printed next to every function name
so
                it is easier to look up where the function in the table.
{snip info details}
Index by function name

   [1] MAIN__                  [4] for_random_number       [3]
my_for_ran_

[EMAIL PROTECTED]:~/Fortran$ gprof -A ./a.out |less

[EMAIL PROTECTED]:~/Fortran$


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to