Next: Closing call: hpmTerminate
Up: Instrumentation routines
Previous: Header files
Initialising the tool: hpmInit
Initialise the toolkit with the subroutine hpmInit
f_hpminit(taskid, name)
hpmInit(taskid, name)
taskid has to be different for each MPI task.
- For a serial code, a zero can be entered for
taskid.
- In a pure MPI code it is recommended to set
taskid to
the processor rank in the communicator MPI_comm_world.
- For a pure OpenMP code the command
hpmInit or
f_hpminit has to be placed outside a parallel region. As in the
serial case we recommend entering a zero for taskid. If the
counters are started and stopped inside a parallel region, the
commands hpmTstart and
hpmTstop have to be used, to which the
thread identification can be passed.
- For a mixed mode code using MPI and OpenMP,
again, the command
hpmInit or f_hpminit has to be placed
outside a parallel region. As in the MPI case we recommend setting
taskid to the processor rank in the communicator
MPI_comm_world. If the counters are
started and stopped inside a parallel region, the commands
hpmTstart and
hpmTstop have to be used, to whom the
thread identification can be passed.
name will become part of the name of the *.viz
file for the HPMVIZ visualisation tool.
Next: Closing call: hpmTerminate
Up: Instrumentation routines
Previous: Header files
Joachim Hein
2003-11-03