HOME
| OPENMP API Specification: Version 5.0 November 2018

2.17.3  Implicit Barriers

This section describes the OMPT events and tool callbacks associated with implicit barriers, which occur at the end of various regions as defined in the description of the constructs to which they correspond. Implicit barriers are task scheduling points. For a description of task scheduling points, associated events, and tool callbacks, see Section 2.10.6 on page 415.

Execution Model Events The implicit-barrier-begin event occurs in each implicit task at the beginning of an implicit barrier region.

The implicit-barrier-wait-begin event occurs when a task begins an interval of active or passive waiting in an implicit barrier region.

The implicit-barrier-wait-end event occurs when a task ends an interval of active or waiting and resumes execution of an implicit barrier region.

The implicit-barrier-end event occurs in each implicit task after the barrier synchronization on exit from an implicit barrier region.

A cancellation event occurs if cancellation is activated at an implicit cancellation point in an implicit barrier region.

Tool Callbacks A thread dispatches a registered ompt_callback_sync_region callback with ompt_sync_region_barrier_implicit — or ompt_sync_region_barrier, if the implementation cannot make a distinction — as its kind argument and ompt_scope_begin as its endpoint argument for each occurrence of an implicit-barrier-begin event in that thread. Similarly, a thread dispatches a registered ompt_callback_sync_region callback with ompt_sync_region_barrier_implicit — or ompt_sync_region_barrier, if the implementation cannot make a distinction — as its kind argument and ompt_scope_end as its endpoint argument for each occurrence of an implicit-barrier-end event in that thread. These callbacks occur in the implicit task that executes the parallel region and have the type signature ompt_callback_sync_region_t.

A thread dispatches a registered ompt_callback_sync_region_wait callback with ompt_sync_region_barrier_implicit — or ompt_sync_region_barrier, if the implementation cannot make a distinction — as its kind argument and ompt_scope_begin as its endpoint argument for each occurrence of a implicit-barrier-wait-begin event in that thread. Similarly, a thread dispatches a registered ompt_callback_sync_region_wait callback with ompt_sync_region_barrier_explicit — or ompt_sync_region_barrier, if the implementation cannot make a distinction — as its kind argument and ompt_scope_end as its endpoint argument for each occurrence of an implicit-barrier-wait-end event in that thread. These callbacks occur in the implicit task that executes the parallel region and have type signature ompt_callback_sync_region_t.

A thread dispatches a registered ompt_callback_cancel callback with ompt_cancel_detected as its flags argument for each occurrence of a cancellation event in that thread. The callback occurs in the context of the encountering task. The callback has type signature ompt_callback_cancel_t.

Restrictions If a thread is in the state ompt_state_wait_barrier_implicit_parallel, a call to ompt_get_parallel_info may return a pointer to a copy of the data object associated with the parallel region rather than a pointer to the associated data object itself. Writing to the data object returned by omp_get_parallel_info when a thread is in the ompt_state_wait_barrier_implicit_parallel results in unspecified behavior.

Cross References