Name
TAU_TRIGGER_CONTEXT_EVENT — Triggers a context event
Synopsis
C/C++:
TAU_TRIGGER_CONTEXT_EVENT( |
name, | |
value);
|
| const char * | name; |
| double | value; |
Fortran:
TAU_TRIGGER_CONTEXT_EVENT( |
value, | |
event_name);
|
| real | value; |
| character | event_name(size); |
Description
Triggers an event with a name and
the list of routines along the callstack. A context event tracks
information like a user defined event and TAU records the maxima,
minima, mean, std. deviation and the number of samples for each
context event. A context event helps distinguish the data supplied
by the user based on the location where an event occurs and the
sequence of actions (routine/timer invocations) that preceeded the
event. The depth of the the callstack embedded in the context
event's name is specified by the user in the environment variable
TAU_CALLPATH_DEPTH. If this variable is not
specified, TAU uses a default depth of 2.
Example
C/C++ :
int f2(void)
{
static int count = 0;
count ++;
TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER);
/*
if (count == 2)
TAU_DISABLE_CONTEXT_EVENT(event);
*/
printf("Inside f2: sleeps 2 sec, calls f3\n");
TAU_TRIGGER_CONTEXT_EVENT("Iteration count", 232+count);
sleep(2);
f3();
return 0;
}
Fortran :
integer memevent(2) / 0, 0 /
save memevent
call TAU_TRIGGER_CONTEXT_EVENT(memevent, SIZEOF(STORAGEARY)*sizeof(INTEGER), "STORAGEARY mem allocated")