Personal tools
You are here: Home UiT Stallo Documentation Stallo User Guide HPCToolkit
Document Actions

HPCToolkit

Up to Table of Contents

HPCToolkit is a measurement tool for profiling application using statistical sampling of the system timer or hardware performance counters.

HPCToolkit is installed on Stallo, see http://hpctoolkit.org/

 

Example of basic use

On the compute-node:

module load hpctoolkit
mpiexec hpcrun-flat Myprog.x 

This will produce files such as "Myprog.x.hpcrun-flat.compute-24-5.local.3310.0x0" . Each process produces a separate file.

 

hpcstruct Myprog.x > Myprog.psxml
hpcprof-flat -I '/MyPath/To/Source/Code/*' -S Myprog.psxml Myprog.x.hpcrun-flat.compute-24-5.local.3310.0x*

One or more file can be included in the profile.

 

The results can be looked at from the front-end (stallo-2) with:
module load hpctoolkit
hpcviewer experiment-db/experiment.xml

The profiling information is given down to line numbers.

 

PAPI (Performance Application Programming Interface)

HPCToolkit make uses of some performance hardware counters.

You can read directly the counters if you include some calls to PAPI routines into your code.

See http://icl.cs.utk.edu/papi/ for details.

 

The PAPI Library is installed on the compute-nodes only.

Here is a simple fortran example to measure the number of FLOP/s using one of the high level PAPI functions:

program testpapi

real*4 :: rtime, ptime,  mflops
integer*8 ::flpops

  call PAPIF_flops(rtime, ptime, flpops, mflops,ierr)

  call my_calc

  call PAPIF_flops(rtime, ptime, flpops, mflops,ierr)

     write (*,90) rtime, ptime, flpops, mflops

90   format('           Real time (secs) :', f15.3, &
           /'            CPU time (secs) :', f15.3,&
           /'Floating point instructions :', i15,&
           /'                     MFLOPS :', f15.3)

end program testpapi

subroutine my_calc
real :: x
x=0.5
do i=1,100000000
   x=x*x-0.8
enddo
if(x==1000)write(*,*)x
end subroutine my_calc

Compile with

ifort -I/usr/include -L/usr/lib64  -lpapi papi.f90

 

 

 

by Peter Wind last modified Aug 26, 2010 12:59 PM Notur