Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tau_context_event(3) [debian man page]

TAU_CONTEXT_EVENT(3)					      TAU Instrumentation API					      TAU_CONTEXT_EVENT(3)

NAME
TAU_CONTEXT_EVENT - Triggers a context event SYNOPSIS
C/C++: TAU_CONTEXT_EVENT(TauUserEvent variable, double value); Fortran: TAU_CONTEXT_EVENT(integer variable(2), real value); DESCRIPTION
Triggers a context event. A context event associates the name with 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); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); /* if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); */ printf("Inside f2: sleeps 2 sec, calls f3 "); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } Fortran : integer memevent(2) / 0, 0 / save memevent call TAU_REGISTER_CONTEXT_EVENT(memevent, "STORAGEARY mem allocated') call TAU_CONTEXT_EVENT(memevent, SIZEOF(STORAGEARY)*sizeof(INTEGER)) SEE ALSO
TAU_REGISTER_CONTEXT_EVENT(3) 08/31/2005 TAU_CONTEXT_EVENT(3)

Check Out this Related Man Page

TAU_REGISTER_EVENT(3)					      TAU Instrumentation API					     TAU_REGISTER_EVENT(3)

NAME
TAU_REGISTER_EVENT - Registers a user event SYNOPSIS
C/C++: TAU_REGISTER_EVENT(TauUserEvent variable, char *event_name); Fortran: TAU_REGISTER_EVENT(int variable(2), character event_name(size)); DESCRIPTION
TAU can profile user-defined events using TAU_REGISTER_EVENT. The meaning of the event is determined by the user. The first argument to TAU_REGISTER_EVENT is the pointer to an integer array. This array is declared with a save attribute as shown below. EXAMPLE
C/C++ : int user_square(int count) { TAU_REGISTER_EVENT(ue1, "UserSquare Event"); TAU_EVENT(ue1, count * count); return 0; } Fortran : integer eventid(2) save eventid call TAU_REGISTER_EVENT(eventid, 'Error in Iteration') call TAU_EVENT(eventid, count) SEE ALSO
TAU_EVENT(3), TAU_REGISTER_CONTEXT_EVENT(3), TAU_REPORT_STATISTICS(3), TAU_REPORT_THREAD_STATISTICS(3), TAU_GET_EVENT_NAMES(3), TAU_GET_EVENT_VALS(3) 08/31/2005 TAU_REGISTER_EVENT(3)
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with setting a variable!

I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat. how can i do this??? ... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

2. Shell Programming and Scripting

Using a variable within a variable name

Hello all, I am currently trying to over-complicate things by doing something similar to the code below: count=1 for x in $(cat /etc/filename); do file_$count=$(echo $variable| awk '{print $1}') count=$(( $count + 1 )) done What I expected was different variable names file_1 file_2 .... (1 Reply)
Discussion started by: Khoomfire
1 Replies