Note: This page has been marked as "Obselete" by the site administrator.

This is the traditional Unix profiling tool. It measures how much time is spent in each function call, and how many times these calls are made.

Step 1. Compile the program, passing -gp flag to the compiler; this tells the compiler to add debugging information to the executable.

Step 2. Run the executable as normal; some files named mon.*.out will have been created.

Step 3. Extract the useful information from each mon.*.out file using prof

% prof mon.0.out > prof.out

Step 4. Open up the prof.out file, and it should look something like:

 Name                 %Time     Seconds     Cumsecs  #Calls   msec/call
.floor                24.6        3.73        3.7387716946      0.0000
.__itrunc             15.2        2.31        6.04
.get_start            13.3        2.02        8.0622497362      0.0001
.MPI__Comm_size       11.7        1.77        9.83
.__mcount             11.1        1.68       11.51
.get_val_par           5.4        0.82       12.33 7230000      0.0001
.pthread_key_create    4.6        0.69       13.02
._mpi_lock             2.6        0.39       13.41
.get_end               2.6        0.39       13.80 6665102      0.0001
._mpi_unlock           2.3        0.35       14.15
.pow                   1.5        0.22       14.37 2410000      0.0001
.gauss_seidel.GL       0.9        0.14       14.51     482      0.29
.enforce_bc_par        0.7        0.11       14.62 1205000      0.0001
.pthread_setspecific   0.6        0.09       14.71
.pthread_setspecific   0.5        0.08       14.79
.PMPI_Comm_size        0.5        0.08       14.87
.pthread_getspecific   0.4        0.06       14.93
.get_convergence_sqd   0.4        0.06       14.99     482      0.12
.MPI_Comm_size.GL      0.4        0.06       15.05
.main                  0.3        0.05       15.10       1     50.0
.pthread_getspecific   0.3        0.04       15.14
.global_to_local       0.1        0.02       15.16 9167158      0.0000
.get_num_rows          0.0        0.00       15.16     967      0.00
.init_domain           0.0        0.00       15.16       2      0.0
.f                     0.0        0.00       15.16 1205000      0.0000

This is information for the test code available via subversion:

%svn co https://svn.loni.org/repos/2dheat/trunk 2dheat # LONI login required

To use the above code to test prof (and any other tool discussed here):

  1. get code via subversion
  2. cd into 2dheat
  3. compile using ./compile-debug.sh
  4. run executable, ./bin/2dheat.x
  5. analyze mon.*.out file(s)

To run interactively on a 575:

% poe ./bin/2dheat.x -v -rmpool 1 -nodes 1 -procs 2 # for a 2 proc interactive job



Users may direct questions to sys-help@loni.org.

Powered by MediaWiki