Using Hardware Performance Monitor (HPM) Toolkit:
A primer
last update:
12/04/2008
Instrumenting code with HPM Toolkit is relatively easy. Here is a skeletal program with HPM Toolkit instrumentation of both serial and parallel sections of the code.
program mine
(declarations)
call F_HPMINIT(1, .mine.)
(some code)
! This will produce a section in the output report labeled ".100 ding":
call F_HPMSTART(100,.ding.)
do from=here,eternity
(some stuff)
end do
call F_HPMSTOP(100,.ding.)
(some more code)
! This will produce omp_num_thread sections in the output report each
! labeled omp_get_thread_num() dong:
!$OMP PARALLEL
!$OMP&PRIVATE (THID)
THID = 30+omp_get_thread_num()
call F_HPMTSTART(THID, "dong")
!$OMP DO
do ...
do_stuff()
end do
call F_HPMTSTOP(THID)
!$OMP END PARALLEL
(some more stuff)
call F_HPMTERMINATE(1)
stop
end
Next page | Table of contents - HPM Toolkit primer
If you have questions about this document, please contact us by any of the methods shown on this web page: CISL Customer Support.
© Copyright 2003. University Corporation for Atmospheric Research (UCAR). All Rights Reserved.
Address of this page: http://www.cisl.ucar.edu/docs/ibm/hpm.toolkit/instrument.html