HOME
| OPENMP API Specification: Version 5.0 November 2018

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 C/C++ header file (omp-tools.h) provides the definitions of the types that are specified throughout this subsection.

  4.6.1  Entry Points in the OMPT Callback Interface
   4.6.1.1  ompt_enumerate_states_t
   4.6.1.2  ompt_enumerate_mutex_impls_t
   4.6.1.3  ompt_set_callback_t
   4.6.1.4  ompt_get_callback_t
   4.6.1.5  ompt_get_thread_data_t
   4.6.1.6  ompt_get_num_procs_t
   4.6.1.7  ompt_get_num_places_t
   4.6.1.8  ompt_get_place_proc_ids_t
   4.6.1.9  ompt_get_place_num_t
   4.6.1.10  ompt_get_partition_place_nums_t
   4.6.1.11  ompt_get_proc_id_t
   4.6.1.12  ompt_get_state_t
   4.6.1.13  ompt_get_parallel_info_t
   4.6.1.14  ompt_get_task_info_t
   4.6.1.15  ompt_get_task_memory_t
   4.6.1.16  ompt_get_target_info_t
   4.6.1.17  ompt_get_num_devices_t
   4.6.1.18  ompt_get_unique_id_t
   4.6.1.19  ompt_finalize_tool_t
  4.6.2  Entry Points in the OMPT Device Tracing Interface
   4.6.2.1  ompt_get_device_num_procs_t
   4.6.2.2  ompt_get_device_time_t
   4.6.2.3  ompt_translate_time_t
   4.6.2.4  ompt_set_trace_ompt_t
   4.6.2.5  ompt_set_trace_native_t
   4.6.2.6  ompt_start_trace_t
   4.6.2.7  ompt_pause_trace_t
   4.6.2.8  ompt_flush_trace_t
   4.6.2.9  ompt_stop_trace_t
   4.6.2.10  ompt_advance_buffer_cursor_t
   4.6.2.11  ompt_get_record_type_t
   4.6.2.12  ompt_get_record_ompt_t
   4.6.2.13  ompt_get_record_native_t
   4.6.2.14  ompt_get_record_abstract_t
  4.6.3  Lookup Entry Points: ompt_function_lookup_t

Restrictions OMPT runtime entry points have the following restrictions: