| OPENMP API Specification: Version 5.1 November 2020

4.6  OMPT Runtime Entry Points for Tools

OMPT supports two principal sets of runtime entry points for tools. One set of runtime entry points enables a tool to register callbacks for OpenMP events and to inspect the state of an OpenMP thread while executing in a tool callback or a signal handler. The second set of runtime entry points enables a tool to trace activities on a device. When directed by the tracing interface, an OpenMP implementation will trace activities on a device, collect buffers of trace records, and invoke callbacks on the host to process these records. OMPT runtime entry points should not be global symbols since tools cannot rely on the visibility of such symbols.

OMPT also supports runtime entry points for two classes of lookup routines. The first class of lookup routines contains a single member: a routine that returns runtime entry points in the OMPT callback interface. The second class of lookup routines includes a unique lookup routine for each kind of device that can return runtime entry points in a device’s OMPT tracing interface.

The omp-tools.h C/C++ header file provides the definitions of the types that are specified throughout this subsection.

Binding The binding thread set for each of the entry points in this section is the encountering thread unless otherwise specified. The binding task set is the task executing on the encountering thread.

Restrictions Restrictions on OMPT runtime entry points are as follows:

  4.6.1  Entry Points in the OMPT Callback Interface  ompt_enumerate_states_t  ompt_enumerate_mutex_impls_t  ompt_set_callback_t  ompt_get_callback_t  ompt_get_thread_data_t  ompt_get_num_procs_t  ompt_get_num_places_t  ompt_get_place_proc_ids_t  ompt_get_place_num_t  ompt_get_partition_place_nums_t  ompt_get_proc_id_t  ompt_get_state_t  ompt_get_parallel_info_t  ompt_get_task_info_t  ompt_get_task_memory_t  ompt_get_target_info_t  ompt_get_num_devices_t  ompt_get_unique_id_t  ompt_finalize_tool_t
  4.6.2  Entry Points in the OMPT Device Tracing Interface  ompt_get_device_num_procs_t  ompt_get_device_time_t  ompt_translate_time_t  ompt_set_trace_ompt_t  ompt_set_trace_native_t  ompt_start_trace_t  ompt_pause_trace_t  ompt_flush_trace_t  ompt_stop_trace_t  ompt_advance_buffer_cursor_t  ompt_get_record_type_t  ompt_get_record_ompt_t  ompt_get_record_native_t  ompt_get_record_abstract_t
  4.6.3  Lookup Entry Points: ompt_function_lookup_t