Name
TAU_PHASE_CREATE_STATIC — Defines a static phase.
Synopsis
C/C++:
TAU_PHASE_CREATE_STATIC( |
phase, | |
function_name, | ||
type, | ||
group) ;
|
Phase | phase; |
char* or string& | function_name; |
char* or string& | type; |
TauGroup_t | group; |
Fortran:
TAU_PHASE_CREATE_STATIC( |
phase, | |
name) ;
|
integer | phase(2); |
character | name(size); |
Description
TAU_PHASE_CREATE_STATIC
creates a static phase.
Static phases (and timers) are more efficient than dynamic ones because the
function registration only takes place once.
Example
C/C++ :
int f2(void) { TAU_PHASE_CREATE_STATIC(t2,"IO Phase", "", TAU_USER); TAU_PHASE_START(t2); input(); output(); TAU_PHASE_STOP(t2); return 0; }
Fortran :
subroutine F2() integer phase(2) / 0, 0 / save phase call TAU_PHASE_CREATE_STATIC(phase,'IO Phase') call TAU_PHASE_START(phase) call INPUT() call OUTPUT() call TAU_PHASE_STOP(phase) end
>Python:
import pytau ptr = pytau.phase("foo") pytau.start(ptr) foo(2) pytau.stop(ptr)