1.0.2 (revision 716)
Typedefs | Functions

pomp2_lib.h File Reference

This file contains the declarations of all POMP2 functions. More...

Go to the source code of this file.

Typedefs

typedef void * POMP2_Region_handle

Functions

void POMP2_Assign_handle (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Atomic_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Atomic_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_Barrier_enter (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle *pomp2_old_task, const char ctc_string[])
void POMP2_Barrier_exit (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
void POMP2_Begin (POMP2_Region_handle *pomp2_handle)
void POMP2_Critical_begin (POMP2_Region_handle *pomp2_handle)
void POMP2_Critical_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Critical_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Critical_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_Destroy_lock (omp_lock_t *s)
void POMP2_Destroy_nest_lock (omp_nest_lock_t *s)
void POMP2_End (POMP2_Region_handle *pomp2_handle)
void POMP2_Finalize ()
void POMP2_Flush_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Flush_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_For_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_For_exit (POMP2_Region_handle *pomp2_handle)
POMP2_Task_handle POMP2_Get_new_task_handle ()
void POMP2_Implicit_barrier_enter (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle *pomp2_old_task)
void POMP2_Implicit_barrier_exit (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
void POMP2_Init ()
void POMP2_Init_lock (omp_lock_t *s)
void POMP2_Init_nest_lock (omp_nest_lock_t *s)
int POMP2_Lib_get_max_threads ()
void POMP2_Master_begin (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Master_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Off ()
void POMP2_On ()
void POMP2_Ordered_begin (POMP2_Region_handle *pomp2_handle)
void POMP2_Ordered_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Ordered_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Ordered_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_Parallel_begin (POMP2_Region_handle *pomp2_handle)
void POMP2_Parallel_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Parallel_fork (POMP2_Region_handle *pomp2_handle, int if_clause, int num_threads, POMP2_Task_handle *pomp2_old_task, const char ctc_string[])
void POMP2_Parallel_join (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
void POMP2_Section_begin (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Section_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Sections_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Sections_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_Set_lock (omp_lock_t *s)
void POMP2_Set_nest_lock (omp_nest_lock_t *s)
void POMP2_Single_begin (POMP2_Region_handle *pomp2_handle)
void POMP2_Single_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Single_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Single_exit (POMP2_Region_handle *pomp2_handle)
void POMP2_Task_begin (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_task)
void POMP2_Task_create_begin (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle *pomp2_new_task, POMP2_Task_handle *pomp2_old_task, int pomp2_if, const char ctc_string[])
void POMP2_Task_create_end (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
void POMP2_Task_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Taskwait_begin (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle *pomp2_old_task, const char ctc_string[])
void POMP2_Taskwait_end (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
int POMP2_Test_lock (omp_lock_t *s)
int POMP2_Test_nest_lock (omp_nest_lock_t *s)
void POMP2_Unset_lock (omp_lock_t *s)
void POMP2_Unset_nest_lock (omp_nest_lock_t *s)
void POMP2_Untied_task_begin (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_task)
void POMP2_Untied_task_create_begin (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle *pomp2_new_task, POMP2_Task_handle *pomp2_old_task, int pomp2_if, const char ctc_string[])
void POMP2_Untied_task_create_end (POMP2_Region_handle *pomp2_handle, POMP2_Task_handle pomp2_old_task)
void POMP2_Untied_task_end (POMP2_Region_handle *pomp2_handle)
void POMP2_Workshare_enter (POMP2_Region_handle *pomp2_handle, const char ctc_string[])
void POMP2_Workshare_exit (POMP2_Region_handle *pomp2_handle)
Functions generated by the instrumenter
size_t POMP2_Get_num_regions ()
void POMP2_Init_regions ()
const char * POMP2_Get_opari2_version ()

Detailed Description

This file contains the declarations of all POMP2 functions.

alpha

Authors:
Daniel Lorenz <d.lorenz@fz-juelich.de> Dirk Schmidl <schmidl@rz.rwth-aachen.de> Peter Philippen <p.philippen@fz-juelich.de>

Typedef Documentation

typedef void* POMP2_Region_handle

Handles to identify OpenMP regions.


Function Documentation

void POMP2_Assign_handle ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Registers a POMP2 region and returns a region handle.

Parameters:
pomp2_handleReturns the handle for the newly registered region.
ctc_stringA string containing the region data.
void POMP2_Atomic_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before an atomic statement.

Parameters:
pomp2_handleThe handle of the started region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Atomic_exit ( POMP2_Region_handle pomp2_handle)

Called after an atomic statement.

Parameters:
pomp2_handleThe handle of the ended region.
void POMP2_Barrier_enter ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle *  pomp2_old_task,
const char  ctc_string[] 
)

Called before a barrier.

OpenMP 3.0: Barriers can be used as scheduling points for tasks. When entering a barrier the task id of the currently executing task (pomp2_current_task) is saved in pomp2_old_task, which is defined inside the instrumented user code.

Parameters:
pomp2_handleThe handle of the started region.
pomp2_old_taskPointer to a "taskprivate" variable where the current task id is stored.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Barrier_exit ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

Called after a barrier.

OpenMP 3.0: When a task exits a barrier the variable pomp2_old_task (defined in the instrumented user code) holds the id of the task that entered the barrier. The value is stored in the adapter (in pomp2_current_task) to be made available for the measurement system for the following regions.

Parameters:
pomp2_handleThe handle of the ended region.
pomp2_old_task"Taskprivate" variable storing the id of the task the barrier is located in.
void POMP2_Begin ( POMP2_Region_handle pomp2_handle)

Called at the begin of a user defined POMP2 region.

Parameters:
pomp2_handleThe handle of the started region.
void POMP2_Critical_begin ( POMP2_Region_handle pomp2_handle)

Called at the start of a critical region.

Parameters:
pomp2_handleThe handle of the started region.
void POMP2_Critical_end ( POMP2_Region_handle pomp2_handle)

Called at the end of a critical region.

Parameters:
pomp2_handleThe handle of the ended region.
void POMP2_Critical_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before a critical region.

Parameters:
pomp2_handleThe handle of the started region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Critical_exit ( POMP2_Region_handle pomp2_handle)

Called after a critical region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Destroy_lock ( omp_lock_t *  s)

Wraps the omp_destroy_lock function.

Parameters:
sThe OpenMP lock to destroy.
void POMP2_Destroy_nest_lock ( omp_nest_lock_t *  s)

Wraps the omp_destroy_nest_lock function.

Parameters:
sThe nested OpenMP lock to destroy.
void POMP2_End ( POMP2_Region_handle pomp2_handle)

Called at the begin of a user defined POMP2 region.

Parameters:
pomp2_handleThe handle of the started region.
void POMP2_Finalize ( )

Finalizes the POMP2 adapter. It is inserted at the #pragma pomp inst end.

void POMP2_Flush_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before an flush.

Parameters:
pomp2_handleThe handle of the started region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Flush_exit ( POMP2_Region_handle pomp2_handle)

Called after an flush.

Parameters:
pomp2_handleThe handle of the ended region.
void POMP2_For_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before a for loop.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_For_exit ( POMP2_Region_handle pomp2_handle)

Called after a for loop.

Parameters:
pomp2_handleThe handle of the region.
POMP2_Task_handle POMP2_Get_new_task_handle ( )

Function that returns a new task handle.

Returns:
new task handle
size_t POMP2_Get_num_regions ( )

Returns the number of instrumented regions.
The instrumenter scans all opari-created include files with nm and greps the POMP2_INIT_uuid_numRegions() function calls. Here we return the sum of all numRegions.

Returns:
number of instrumented regions
const char* POMP2_Get_opari2_version ( )

Returns the opari version.

Returns:
version string
void POMP2_Implicit_barrier_enter ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle *  pomp2_old_task 
)

Called before an implicit barrier.

OpenMP 3.0: Barriers can be used as scheduling points for tasks. When entering a barrier the task id of the currently executing task (pomp2_current_task) is saved in pomp2_old_task, which is defined inside the instrumented user code.

Parameters:
pomp2_handleThe handle of the started region.
pomp2_old_taskPointer to a "taskprivate" variable where the current task id is stored.
void POMP2_Implicit_barrier_exit ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

Called after an implicit barrier.

OpenMP 3.0: When a task exits a barrier the variable pomp2_old_task (defined in the instrumented user code) holds the id of the task that entered the barrier. The value is stored in the adapter (in pomp2_current_task) to be made available for the measurement system for the following regions.

Parameters:
pomp2_handleThe handle of the started region.
pomp2_old_task"Taskprivate" variable storing the id the task the implicit barrier is used in.
void POMP2_Init ( )

Initializes the POMP2 adapter. It is inserted at the #pragma pomp inst begin.

void POMP2_Init_lock ( omp_lock_t *  s)

Wraps the omp_init_lock function.

Parameters:
sThe OpenMP lock to initialize.
void POMP2_Init_nest_lock ( omp_nest_lock_t *  s)

Wraps the omp_init_nest_lock function.

Parameters:
sThe nested OpenMP lock to initialize.
void POMP2_Init_regions ( )

Init all opari-created regions.
The instrumentor scans all opari-created include files with nm and greps the POMP2_INIT_uuid_numRegions() function calls. The instrumentor then defines these functions by calling all grepped functions.

int POMP2_Lib_get_max_threads ( )

Wraps the omp_get_max_threads function.

Needed for the instrumentation of parallel regions where the num_threads clause is used with the return value of the omp_get_max_threads function. This can't be used directly because the user may have declared it himself. Double declarations are not allowed.

void POMP2_Master_begin ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called at the start of a master region.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Master_end ( POMP2_Region_handle pomp2_handle)

Called at the end of a master region.

Parameters:
pomp2_handleThe handle of the ended region.
void POMP2_Off ( )

Disables the POMP2 adapter.

void POMP2_On ( )

Enables the POMP2 adapter.

void POMP2_Ordered_begin ( POMP2_Region_handle pomp2_handle)

Called at the start of an ordered region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Ordered_end ( POMP2_Region_handle pomp2_handle)

Called at the end of an ordered region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Ordered_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before an ordered region.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. Ignored.
void POMP2_Ordered_exit ( POMP2_Region_handle pomp2_handle)

Called after an ordered region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Parallel_begin ( POMP2_Region_handle pomp2_handle)

Called at the start of a parallel region.

OpenMP 3.0: When a new parallel region is entered, each thread taking part in that region is executed as a task. These tasks are assigned a new unique task id which is stored in pomp2_current_task.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Parallel_end ( POMP2_Region_handle pomp2_handle)

Called at the end of a parallel region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Parallel_fork ( POMP2_Region_handle pomp2_handle,
int  if_clause,
int  num_threads,
POMP2_Task_handle *  pomp2_old_task,
const char  ctc_string[] 
)

Called before a parallel region.

OpenMP 3.0: The task id of the currently executing task (pomp2_current_task) is saved in pomp2_old_task, which is defined inside the instrumented user code. In each of the threads taking part in the following parallel region a newly defined unique task id is assigned (see POMP2_Parallel_begin)

Parameters:
pomp2_handleThe handle of the region.
if_clauseValue of the argument of an if clause (if present).
num_threadsUpper bound for number of child threads.
pomp2_old_taskThe task id of the region from which the parallel region was started.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Parallel_join ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

Called after a parallel region.

OpenMP 3.0: When a task exits a parallel region the variable pomp2_old_task (defined in the instrumented user code) holds the id of the task that entered the region. The value is stored in the adapter (in pomp2_current_task) to be made available for the measurement system for the following regions.

Parameters:
pomp2_handleThe handle of the region.
pomp2_old_taskThe task id of the region inside of which the parallel region was executed.
void POMP2_Section_begin ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called at the start of a section.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Section_end ( POMP2_Region_handle pomp2_handle)

Called at the end of a section.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Sections_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before a set of sections.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Sections_exit ( POMP2_Region_handle pomp2_handle)

Called after a set of sections.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Set_lock ( omp_lock_t *  s)

Wraps the omp_set_lock function.

Parameters:
sThe OpenMP lock to set.
void POMP2_Set_nest_lock ( omp_nest_lock_t *  s)

Wraps the omp_set_nest_lock function

Parameters:
sThe nested OpenMP lock to set.
void POMP2_Single_begin ( POMP2_Region_handle pomp2_handle)

Called at the start of a single region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Single_end ( POMP2_Region_handle pomp2_handle)

Called at the end of a single region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Single_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before a single region.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Single_exit ( POMP2_Region_handle pomp2_handle)

Called after a single region.

Parameters:
pomp2_handleThe handle of the region.
void POMP2_Task_begin ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_task 
)

OpenMP 3.0: Marks the beginning of the execution of a task.

Parameters:
pomp2_handleThe region handle.
pomp2_taskhandle of task.
void POMP2_Task_create_begin ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle *  pomp2_new_task,
POMP2_Task_handle *  pomp2_old_task,
int  pomp2_if,
const char  ctc_string[] 
)

OpenMP 3.0: When a task encounters a task construct it creates a new task. The task may be scheduled for later execution or executed immediately. In both cases the pomp-adapter assigns the id of the currently active task to pomp2_old_task which is defined in the instrumented user code.

Parameters:
pomp2_handleThe handle of the region.
pomp2_old_taskPointer to the task id in the instrumented user code
pomp2_ifIf an if clause is present on the task directive this variable holds the evaluated result of the argument of the if clause. Else it is 1.
ctc_stringThe initialization string.
void POMP2_Task_create_end ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

OpenMP 3.0: After the code region which is executed as a separate task, the task id of the creating task is restored from pomp2_old_task (defined in the instrumented user code) and stored in pomp2_current_task inside the adapter.

Parameters:
pomp2_handleThe region handle.
pomp2_old_taskThe task id of the task inside of which the task was created. This is stored inside the instrumented user code.
void POMP2_Task_end ( POMP2_Region_handle pomp2_handle)

OpenMP 3.0: Marks the end of the execution of a task.

Parameters:
pomp2_handleThe region handle.
void POMP2_Taskwait_begin ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle *  pomp2_old_task,
const char  ctc_string[] 
)

Called before a taskwait.

OpenMP 3.0: Taskwait directives can be used as scheduling points for tasks. When entering a taskwait region the task id of the currently executing task (pomp2_current_task) is saved in pomp2_old_task, which is defined inside the instrumented user code.

Parameters:
pomp2_handleThe handle of the started region.
pomp2_old_taskPointer to a "taskprivate" variable where the current task id is stored.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Taskwait_end ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

Called after a barrier.

OpenMP 3.0: When a task exits a taskwait region the variable pomp2_old_task (defined in the instrumented user code) holds the id of the task that entered the taskwait. The value is stored in the adapter (in pomp2_current_task) to be made available for the measurement system for the following regions.

Parameters:
pomp2_handleThe handle of the ended region.
pomp2_old_task"Taskprivate" variable storing the id of the task the barrier is located in.
int POMP2_Test_lock ( omp_lock_t *  s)

Wraps the omp_test_lock function

Parameters:
sthe OpenMP lock to test for.
Returns:
result of omp_test_lock
int POMP2_Test_nest_lock ( omp_nest_lock_t *  s)

Wraps the omp_test_nest_lock function

Parameters:
sThe nested OpenMP lock to test for.
Returns:
result of omp_test_nest_lock
void POMP2_Unset_lock ( omp_lock_t *  s)

Wraps the omp_unset_lock function.

Parameters:
sthe OpenMP lock to unset.
void POMP2_Unset_nest_lock ( omp_nest_lock_t *  s)

Wraps the omp_unset_nest_lock function

Parameters:
sThe nested OpenMP lock to unset.
void POMP2_Untied_task_begin ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_task 
)

OpenMp 3.0: Marks the beginning of the execution of an untied task.

Parameters:
pomp2_handleThe region handle.
pomp2_taskHandle of this task.
void POMP2_Untied_task_create_begin ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle *  pomp2_new_task,
POMP2_Task_handle *  pomp2_old_task,
int  pomp2_if,
const char  ctc_string[] 
)

OpenMP 3.0: When a task encounters a task construct it creates a new task. If the untied clause is specified the task is executed as an untied task. The task may be scheduled for later execution or executed immediately. In both cases the pomp-adapter assigns the id of the currently active task to pomp2_old_task which is defined in the instrumented user code.

Parameters:
pomp2_handleThe handle of the region.
pomp2_old_taskPointer to the task id in the instrumented user code.
pomp2_ifIf an if clause is present on the task directive this variable holds the evaluated result of the argument of the if clause. Else it is 1.
ctc_stringThe initialization string.
void POMP2_Untied_task_create_end ( POMP2_Region_handle pomp2_handle,
POMP2_Task_handle  pomp2_old_task 
)

OpenMP 3.0: After the code region which is executed as a separate untied task, the task id of the creating task is restored from pomp2_old_task (defined in the instrumented user code) and stored in pomp2_current_task inside the adapter.

Parameters:
pomp2_handleThe region handle.
pomp2_old_taskThe id of the task from which the untied task was created. This is stored in the instrumented user code.
void POMP2_Untied_task_end ( POMP2_Region_handle pomp2_handle)

OpenMP 3.0: Marks the end of the execution of a task.

Parameters:
pomp2_handleThe region handle.
void POMP2_Workshare_enter ( POMP2_Region_handle pomp2_handle,
const char  ctc_string[] 
)

Called before a workshare region.

Parameters:
pomp2_handleThe handle of the region.
ctc_stringInitialization string. May be ignored if <pomp2_handle> is already initialized.
void POMP2_Workshare_exit ( POMP2_Region_handle pomp2_handle)

Called after a workshare region.

Parameters:
pomp2_handleThe handle of the region.