Name
TAU_PROFILE_CREATE_DYNAMIC — Creates a dynamic timer
Synopsis
C/C++:
TAU_PROFILE_CREATE_DYNAMIC( |
timer, | |
function_name, | ||
type, | ||
group) ;
|
Timer | timer; |
char* or string& | function_name; |
char* or string& | type; |
taugroup_t | group; |
Fortran:
TAU_PROFILE_CREATE_DYNAMIC( |
timer, | |
name) ;
|
integer | timer(2); |
character | name(size); |
description
TAU_PROFILE_CREATE_DYNAMIC
creates a dynamic
timer the name of the timer should be different for each execution.
example
>C/C++:
int main(int argc, char **argv) { int i; TAU_PROFILE_TIMER(t,"main()", "", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_START(t); for (i=0; i&5; i++) { char buf[32]; sprintf(buf, "Iteration %d", i); TAU_PROFILE_CREATE_DYNAMIC(timer, buf, "", TAU_USER); TAU_PROFILE_START(timer); printf("Iteration %d\n", i); f1(); TAU_PROFILE_STOP(timer); } return 0; }
>Fortran:
subroutine ITERATION(val) integer val character(13) cvar integer profiler(2) / 0, 0 / save profiler print *, "Iteration ", val write (cvar,'(a9,i2)') 'Iteration', val call TAU_PROFILE_CREATE_DYNAMIC(profiler, cvar) call TAU_PROFILE_START(profiler) call F1() call TAU_PROFILE_STOP(profiler) return end