Execution Model Events No events are associated with the implicit parallel region in each initial thread. The initial-thread-begin event occurs in an initial thread after the OpenMP runtime invokes the tool initializer but before the initial thread begins to execute the first OpenMP region in the initial task. The initial-task-begin event occurs after an initial-thread-begin event but before the first OpenMP region in the initial task begins to execute. The initial-task-end event occurs before an initial-thread-end event but after the last OpenMP region in the initial task finishes execution. The initial-thread-end event occurs as the final event in an initial thread at the end of an initial task immediately prior to invocation of the tool finalizer.
Tool Callbacks A thread dispatches a registered ompt_callback_thread_begin callback for the initial-thread-begin event in an initial thread. The callback occurs in the context of the initial thread. The callback has type signature ompt_callback_thread_begin_t. The callback receives ompt_thread_initial as its thread_type argument.
A thread dispatches a registered ompt_callback_implicit_task callback with ompt_scope_begin as its endpoint argument for each occurrence of an initial-task-begin event in that thread. Similarly, a thread dispatches a registered ompt_callback_implicit_task callback with ompt_scope_end as its endpoint argument for each occurrence of an initial-task-end event in that thread. The callbacks occur in the context of the initial task and have type signature ompt_callback_implicit_task_t. In the dispatched callback, (flag & ompt_task_initial) always evaluates to true.
A thread dispatches a registered ompt_callback_thread_end callback for the initial-thread-end event in that thread. The callback occurs in the context of the thread. The callback has type signature ompt_callback_thread_end_t. The implicit parallel region does not dispatch a ompt_callback_parallel_end callback; however, the implicit parallel region can be finalized within this ompt_callback_thread_end callback.