HOME
| OPENMP API Specification: Version 5.1 November 2020

2.19.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.12.6.

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 for each implicit barrier begin and end event. Similarly, a thread dispatches a registered ompt_callback_sync_region_wait callback for each implicit barrier wait-begin and wait-end event. All callbacks for implicit barrier events execute in the context of the encountering task and have type signature ompt_callback_sync_region_t.

For the implicit barrier at the end of a worksharing construct, the kind argument is ompt_sync_region_barrier_implicit_workshare. For the implicit barrier at the end of a parallel region, the kind argument is ompt_sync_region_barrier_implicit_parallel. For an extra barrier added by an OpenMP implementation, the kind argument is ompt_sync_region_barrier_implementation. For a barrier at the end of a teams region, the kind argument is ompt_sync_region_barrier_teams.

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 Restrictions to implicit barriers are as follows:

Cross References