Next: Stopping the counters in
Up: Instrumentation routines
Previous: Closing call: hpmTerminate
Starting the counters in a non-threaded region:
hpmStart
To start the counters outside a threaded region, use the command:
f_hpmstart(instid, label)
hpmStart(instid, label)
instid has to be set to a unique number, identifying each
instrumented section. instid has to be positive and can be as
large as 100. However the maximum possible value of instid
can be changed with the environment variable HPM_NUM_INST_PTS.
label has to be set to a string. The label will be included
into the output files to assist in matching the results to the
correct code section.
Instrumented sections can be nested. An instrumented section can be
entered several times during code execution. This will restart the
counting. Placing instrumentation inside a loop is a typical example
for restarting. If a set of counters is restarted the counters will
be added to. See here for an
example code with nested and restarted instrumented sections.
Joachim Hein
2003-11-03