16#ifndef OMPT_MULTIPLEX_H
17#define OMPT_MULTIPLEX_H
40#ifdef OMPT_MULTIPLEX_TOOL_NAME
41#ifndef CLIENT_TOOL_LIBRARIES_VAR
42#define CLIENT_TOOL_LIBRARIES_VAR OMPT_MULTIPLEX_TOOL_NAME "_TOOL_LIBRARIES"
44#ifndef CLIENT_TOOL_VERBOSE_INIT_VAR
45#define CLIENT_TOOL_VERBOSE_INIT_VAR \
46 OMPT_MULTIPLEX_TOOL_NAME "_TOOL_VERBOSE_INIT"
52#ifndef CLIENT_TOOL_VERBOSE_INIT_VAR
53#warning CLIENT_TOOL_VERBOSE_INIT_VAR redefined to OMP_TOOL_VERBOSE_INIT
54#define CLIENT_TOOL_VERBOSE_INIT_VAR "OMP_TOOL_VERBOSE_INIT"
58#ifndef CLIENT_TOOL_LIBRARIES_VAR
59#error CLIENT_TOOL_LIBRARIES_VAR should be defined before including of ompt-multiplex.h
62#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) && \
63 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA)
64#error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA is set
67#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) && \
68 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA)
69#error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA is set
72#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) && \
73 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA)
74#error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA is set
77#define OMPT_API_ROUTINE static
80#define OMPT_STR_MATCH(haystack, needle) (!strcasecmp(haystack, needle))
87#define OMPT_VERBOSE_INIT_PRINT(...) \
89 fprintf(verbose_file, __VA_ARGS__)
90#define OMPT_VERBOSE_INIT_CONTINUED_PRINT(...) \
92 fprintf(verbose_file, __VA_ARGS__)
101 if (ompt_env_verbose_init && strcmp(ompt_env_verbose_init,
"") &&
109 getenv(
"OMP_TOOL_VERBOSE_INIT")))
113 printf(
"Multiplex: Can not open file defined in OMP_TOOL_VERBOSE_INIT "
120#define OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(macro) \
121 macro(callback_thread_begin, ompt_callback_thread_begin_t, 1); \
122 macro(callback_thread_end, ompt_callback_thread_end_t, 2); \
123 macro(callback_parallel_begin, ompt_callback_parallel_begin_t, 3); \
124 macro(callback_parallel_end, ompt_callback_parallel_end_t, 4); \
125 macro(callback_task_create, ompt_callback_task_create_t, 5); \
126 macro(callback_task_schedule, ompt_callback_task_schedule_t, 6); \
127 macro(callback_implicit_task, ompt_callback_implicit_task_t, 7); \
128 macro(callback_target, ompt_callback_target_t, 8); \
129 macro(callback_target_data_op, ompt_callback_target_data_op_t, 9); \
130 macro(callback_target_submit, ompt_callback_target_submit_t, 10); \
131 macro(callback_control_tool, ompt_callback_control_tool_t, 11); \
132 macro(callback_device_initialize, ompt_callback_device_initialize_t, 12); \
133 macro(callback_device_finalize, ompt_callback_device_finalize_t, 13); \
134 macro(callback_device_load, ompt_callback_device_load_t, 14); \
135 macro(callback_device_unload, ompt_callback_device_unload_t, 15); \
136 macro(callback_sync_region_wait, ompt_callback_sync_region_t, 16); \
137 macro(callback_mutex_released, ompt_callback_mutex_t, 17); \
138 macro(callback_dependences, ompt_callback_dependences_t, 18); \
139 macro(callback_task_dependence, ompt_callback_task_dependence_t, 19); \
140 macro(callback_work, ompt_callback_work_t, 20); \
141 macro(callback_masked, ompt_callback_masked_t, 21); \
142 macro(callback_target_map, ompt_callback_target_map_t, 22); \
143 macro(callback_sync_region, ompt_callback_sync_region_t, 23); \
144 macro(callback_lock_init, ompt_callback_mutex_acquire_t, 24); \
145 macro(callback_lock_destroy, ompt_callback_mutex_t, 25); \
146 macro(callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26); \
147 macro(callback_mutex_acquired, ompt_callback_mutex_t, 27); \
148 macro(callback_nest_lock, ompt_callback_nest_lock_t, 28); \
149 macro(callback_flush, ompt_callback_flush_t, 29); \
150 macro(callback_cancel, ompt_callback_cancel_t, 30); \
151 macro(callback_reduction, ompt_callback_sync_region_t, 31); \
152 macro(callback_dispatch, ompt_callback_dispatch_t, 32);
155#define ompt_event_macro(event, callback, eventid) callback ompt_##event
159#undef ompt_event_macro
163#define ompt_event_macro(event, callback, eventid) int ompt_##event
167#undef ompt_event_macro
183#if !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) || \
184 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) || \
185 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA)
189 if (!data_pointer->ptr) {
190 printf(
"Malloc ERROR\n");
201 free((*data_pointer).ptr);
228#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
236#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
244#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
252#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
260#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
268#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
278 ompt_wait_id_t wait_id,
279 const void *codeptr_ra) {
282 kind, hint, impl, wait_id, codeptr_ra);
286 kind, hint, impl, wait_id, codeptr_ra);
291 ompt_wait_id_t wait_id,
292 const void *codeptr_ra) {
304 ompt_wait_id_t wait_id,
305 const void *codeptr_ra) {
317 ompt_wait_id_t wait_id,
318 const void *codeptr_ra) {
330 ompt_scope_endpoint_t endpoint,
331 ompt_data_t *parallel_data,
332 ompt_data_t *task_data,
333 const void *codeptr_ra) {
347 ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint,
348 ompt_data_t *parallel_data, ompt_data_t *task_data,
349 const void *codeptr_ra) {
363 const void *codeptr_ra) {
375 const void *codeptr_ra) {
387 ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data,
388 ompt_data_t *task_data,
unsigned int team_size,
unsigned int thread_num,
390 if (endpoint == ompt_scope_begin) {
391#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
394#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
395 if (flags & ompt_task_initial)
413#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) || \
414 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA)
430#if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) && \
431 !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA)
440#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
444#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA)
445 if (flags & ompt_task_initial)
448#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA)
457 ompt_wait_id_t wait_id,
458 const void *codeptr_ra) {
461 wait_id, codeptr_ra);
465 kind, hint, impl, wait_id, codeptr_ra);
470 ompt_wait_id_t wait_id,
471 const void *codeptr_ra) {
483 ompt_scope_endpoint_t endpoint,
484 ompt_data_t *parallel_data,
485 ompt_data_t *task_data, uint64_t
count,
486 const void *codeptr_ra) {
501 ompt_data_t *parallel_data,
502 ompt_data_t *task_data,
503 const void *codeptr_ra) {
517 ompt_data_t *parent_task_data,
const ompt_frame_t *parent_task_frame,
518 ompt_data_t *parallel_data, uint32_t requested_team_size,
int flag,
519 const void *codeptr_ra) {
520#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
527 requested_team_size,
flag, codeptr_ra);
534 requested_team_size,
flag, codeptr_ra);
539 ompt_data_t *task_data,
541 const void *codeptr_ra) {
544#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) || \
545 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA)
559#if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) && \
560 !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA)
568#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
572#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA)
578 ompt_data_t *parent_task_data,
const ompt_frame_t *parent_frame,
579 ompt_data_t *new_task_data,
int type,
int has_dependences,
580 const void *codeptr_ra) {
581#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
585#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
586 if (
type & ompt_task_initial) {
587 ompt_data_t *parallel_data;
603 has_dependences, codeptr_ra);
609 ompt_task_status_t prior_task_status,
610 ompt_data_t *second_task_data) {
611 if (prior_task_status != ompt_task_complete) {
626#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) || \
627 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA)
642#if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) && \
643 !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA)
651#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
655#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA)
662 const ompt_dependence_t *deps,
676 ompt_data_t *second_task_data) {
690 ompt_data_t *thread_data) {
691#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
707#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) || \
708 !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA)
720#if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) && \
721 !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA)
728#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
732#if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA)
738 uint64_t modifier,
void *arg,
739 const void *codeptr_ra) {
740 int ownRet = 0, clientRet = 0;
743 command, modifier, arg, codeptr_ra);
747 command, modifier, arg, codeptr_ra);
749 return ownRet < clientRet ? ownRet : clientRet;
753 ompt_target_t kind, ompt_scope_endpoint_t endpoint,
int device_num,
754 ompt_data_t *task_data, ompt_id_t target_id,
const void *codeptr_ra) {
758 target_id, codeptr_ra);
762 kind, endpoint, device_num,
768 ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype,
769 void *src_addr,
int src_device_num,
void *dest_addr,
int dest_device_num,
770 size_t bytes,
const void *codeptr_ra) {
773 target_id, host_op_id, optype, src_addr, src_device_num, dest_addr,
774 dest_device_num, bytes, codeptr_ra);
778 target_id, host_op_id, optype, src_addr, src_device_num, dest_addr,
779 dest_device_num, bytes, codeptr_ra);
785 unsigned int requested_num_teams) {
788 target_id, host_op_id, requested_num_teams);
792 target_id, host_op_id, requested_num_teams);
797 int device_num,
const char *
type, ompt_device_t *device,
798 ompt_function_lookup_t lookup,
const char *documentation) {
801 device_num,
type, device, lookup, documentation);
805 device_num,
type, device, lookup, documentation);
820 int64_t offset_in_file,
void *vma_in_file,
821 size_t bytes,
void *host_addr,
822 void *device_addr, uint64_t module_id) {
825 device_num, filename, offset_in_file, vma_in_file, bytes, host_addr,
826 device_addr, module_id);
830 device_num, filename, offset_in_file, vma_in_file, bytes, host_addr,
831 device_addr, module_id);
836 uint64_t module_id) {
849 void **host_addr,
void **device_addr,
850 size_t *bytes,
unsigned int *mapping_flags,
851 const void *codeptr_ra) {
854 target_id, nitems, host_addr, device_addr, bytes, mapping_flags,
859 target_id, nitems, host_addr, device_addr, bytes, mapping_flags,
865 ompt_scope_endpoint_t endpoint,
866 ompt_data_t *parallel_data,
867 ompt_data_t *task_data,
868 const void *codeptr_ra) {
882 ompt_data_t *task_data,
883 ompt_dispatch_t kind,
900 ompt_data_t **task_data,
901 ompt_frame_t **task_frame,
902 ompt_data_t **parallel_data,
905 task_frame, parallel_data, thread_num);
907#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
911#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
919 ompt_data_t **task_data,
920 ompt_frame_t **task_frame,
921 ompt_data_t **parallel_data,
924 task_frame, parallel_data, thread_num);
927#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA
934#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
945#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
955#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA
965 ompt_data_t **parallel_data,
975 ompt_data_t **parallel_data,
980#ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA
990 ompt_callback_t callback) {
993#define ompt_event_macro(event_name, callback_type, event_id) \
994 case ompt_##event_name: \
995 ompt_multiplex_own_callbacks.ompt_##event_name = (callback_type)callback; \
996 if (ompt_multiplex_implementation_status.ompt_##event_name == -1) \
997 return ompt_multiplex_implementation_status.ompt_##event_name = \
998 ompt_multiplex_set_callback( \
1000 (ompt_callback_t)&ompt_multiplex_##event_name); \
1002 return ompt_multiplex_implementation_status.ompt_##event_name
1006#undef ompt_event_macro
1009 return ompt_set_error;
1015 ompt_callback_t callback) {
1018#define ompt_event_macro(event_name, callback_type, event_id) \
1019 case ompt_##event_name: \
1020 ompt_multiplex_client_callbacks.ompt_##event_name = \
1021 (callback_type)callback; \
1022 if (ompt_multiplex_implementation_status.ompt_##event_name == -1) \
1023 return ompt_multiplex_implementation_status.ompt_##event_name = \
1024 ompt_multiplex_set_callback( \
1025 ompt_##event_name, \
1026 (ompt_callback_t)&ompt_multiplex_##event_name); \
1028 return ompt_multiplex_implementation_status.ompt_##event_name
1032#undef ompt_event_macro
1035 return ompt_set_error;
1040 if (!strcmp(
name,
"ompt_set_callback"))
1042 else if (!strcmp(
name,
"ompt_get_task_info"))
1044 else if (!strcmp(
name,
"ompt_get_thread_data"))
1046 else if (!strcmp(
name,
"ompt_get_parallel_info"))
1053 if (!strcmp(
name,
"ompt_set_callback"))
1055 else if (!strcmp(
name,
"ompt_get_task_info"))
1057 else if (!strcmp(
name,
"ompt_get_thread_data"))
1059 else if (!strcmp(
name,
"ompt_get_parallel_info"))
1066 int initial_device_num, ompt_data_t *
data) {
1069 (ompt_set_callback_t)lookup(
"ompt_set_callback");
1071 (ompt_get_task_info_t)lookup(
"ompt_get_task_info");
1073 (ompt_get_thread_data_t)lookup(
"ompt_get_thread_data");
1075 (ompt_get_parallel_info_t)lookup(
"ompt_get_parallel_info");
1078#define ompt_event_macro(event_name, callback_type, event_id) \
1079 ompt_multiplex_implementation_status.ompt_##event_name = -1
1083#undef ompt_event_macro
1094 return ownRet > clientRet ? ownRet : clientRet;
1112 const char *runtime_version);
1115 const char *runtime_version) {
1118 "----- START LOGGING OF CLIENT TOOL REGISTRATION -----\n");
1127 char *tool_libs_buffer = strdup(tool_libs);
1128 if (!tool_libs_buffer) {
1129 printf(
"strdup Error (%i)\n", errno);
1136 while (progress < strlen(tool_libs)) {
1139 const char *) = NULL;
1142 int tmp_progress = progress;
1143 while (tmp_progress < strlen(tool_libs) &&
1144 tool_libs_buffer[tmp_progress] !=
':')
1146 if (tmp_progress < strlen(tool_libs))
1147 tool_libs_buffer[tmp_progress] = 0;
1149 char *fname = tool_libs_buffer + progress;
1151 void *
h = dlopen(fname, RTLD_LAZY);
1155 dlsym(
h,
"ompt_start_tool");
1156 if (client_start_tool &&
1158 (*client_start_tool)(omp_version, runtime_version))) {
1161 "Tool was started and is using the OMPT interface.\n");
1165 "Failed: client_start_tool = %p, ompt_multiplex_client_fns = %p, "
1171 printf(
"Loading %s from %s failed with: %s\n",
1175 progress = tmp_progress + 1;
1177 free(tool_libs_buffer);
1179 "----- END LOGGING OF CLIENT TOOL REGISTRATION -----\n");
1183 "----- START LOGGING OF OWN TOOL REGISTRATION -----\n");
1206#define ompt_start_tool ompt_multiplex_own_start_tool
__itt_string_handle * name
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void * data
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance * instance
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t count
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d int
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
struct ompt_start_tool_result_t ompt_start_tool_result_t
static ompt_start_tool_result_t * ompt_start_tool_result
static void ompt_multiplex_callback_sync_region(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
OMPT_API_ROUTINE int ompt_multiplex_own_set_callback(ompt_callbacks_t which, ompt_callback_t callback)
static FILE * verbose_file
static ompt_data_t * ompt_multiplex_get_client_ompt_data(ompt_data_t *data)
static ompt_get_parallel_info_t ompt_multiplex_get_parallel_info
static void ompt_multiplex_callback_thread_end(ompt_data_t *thread_data)
static void ompt_multiplex_free_data_pair(ompt_data_t *data_pointer)
static void ompt_multiplex_callback_sync_region_wait(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
#define OMPT_VERBOSE_INIT_CONTINUED_PRINT(...)
static void ompt_multiplex_callback_thread_begin(ompt_thread_t thread_type, ompt_data_t *thread_data)
static int ompt_multiplex_callback_control_tool(uint64_t command, uint64_t modifier, void *arg, const void *codeptr_ra)
#define ompt_event_macro(event, callback, eventid)
ompt_start_tool_result_t * ompt_multiplex_own_start_tool(unsigned int omp_version, const char *runtime_version)
#define OMPT_STR_MATCH(haystack, needle)
static void ompt_multiplex_callback_target_data_op(ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype, void *src_addr, int src_device_num, void *dest_addr, int dest_device_num, size_t bytes, const void *codeptr_ra)
static void ompt_multiplex_callback_mutex_released(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra)
ompt_multiplex_callback_implementation_status_t ompt_multiplex_implementation_status
struct ompt_multiplex_callbacks_s ompt_multiplex_callbacks_t
static void ompt_multiplex_callback_dependences(ompt_data_t *task_data, const ompt_dependence_t *deps, int ndeps)
static void ompt_multiplex_callback_work(ompt_work_t wstype, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, uint64_t count, const void *codeptr_ra)
static ompt_data_t * ompt_multiplex_get_own_ompt_data(ompt_data_t *data)
static void ompt_multiplex_callback_mutex_acquire(ompt_mutex_t kind, unsigned int hint, unsigned int impl, ompt_wait_id_t wait_id, const void *codeptr_ra)
static void ompt_multiplex_callback_parallel_begin(ompt_data_t *parent_task_data, const ompt_frame_t *parent_task_frame, ompt_data_t *parallel_data, uint32_t requested_team_size, int flag, const void *codeptr_ra)
#define OMPT_VERBOSE_INIT_PRINT(...)
ompt_interface_fn_t ompt_multiplex_client_lookup(const char *name)
static void ompt_multiplex_callback_dispatch(ompt_data_t *parallel_data, ompt_data_t *task_data, ompt_dispatch_t kind, ompt_data_t instance)
int ompt_multiplex_own_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size)
static ompt_data_t * ompt_multiplex_get_client_thread_data(ompt_data_t *data)
static void ompt_multiplex_callback_device_unload(int device_num, uint64_t module_id)
static void ompt_multiplex_callback_flush(ompt_data_t *thread_data, const void *codeptr_ra)
static void ompt_multiplex_callback_device_load(int device_num, const char *filename, int64_t offset_in_file, void *vma_in_file, size_t bytes, void *host_addr, void *device_addr, uint64_t module_id)
ompt_interface_fn_t ompt_multiplex_own_lookup(const char *name)
OMPT_API_ROUTINE int ompt_multiplex_client_set_callback(ompt_callbacks_t which, ompt_callback_t callback)
struct ompt_multiplex_callback_implementation_status_s ompt_multiplex_callback_implementation_status_t
static void ompt_multiplex_callback_lock_destroy(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra)
static ompt_data_t * ompt_multiplex_get_client_task_data(ompt_data_t *data)
#define OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(macro)
static ompt_data_t * ompt_multiplex_get_own_parallel_data(ompt_data_t *data)
static void ompt_multiplex_callback_reduction(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
ompt_data_t * ompt_multiplex_own_get_thread_data()
ompt_function_lookup_t ompt_multiplex_lookup_function
ompt_multiplex_callbacks_t ompt_multiplex_own_callbacks
static ompt_data_t * ompt_multiplex_get_own_task_data(ompt_data_t *data)
static void ompt_multiplex_callback_nest_lock(ompt_scope_endpoint_t endpoint, ompt_wait_id_t wait_id, const void *codeptr_ra)
static void ompt_multiplex_callback_lock_init(ompt_mutex_t kind, unsigned int hint, unsigned int impl, ompt_wait_id_t wait_id, const void *codeptr_ra)
void ompt_multiplex_finalize(ompt_data_t *fns)
static ompt_data_t * ompt_multiplex_get_own_thread_data(ompt_data_t *data)
defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) ||
ompt_start_tool_result_t * ompt_multiplex_own_fns
static ompt_multiplex_data_pair_t * ompt_multiplex_allocate_data_pair(ompt_data_t *data_pointer)
int ompt_multiplex_own_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num)
struct ompt_multiplex_data_pair_s ompt_multiplex_data_pair_t
static ompt_data_t * ompt_multiplex_get_client_parallel_data(ompt_data_t *data)
static void ompt_multiplex_callback_parallel_end(ompt_data_t *parallel_data, ompt_data_t *task_data, int flag, const void *codeptr_ra)
static void ompt_multiplex_callback_target_submit(ompt_id_t target_id, ompt_id_t host_op_id, unsigned int requested_num_teams)
static void ompt_multiplex_callback_task_create(ompt_data_t *parent_task_data, const ompt_frame_t *parent_frame, ompt_data_t *new_task_data, int type, int has_dependences, const void *codeptr_ra)
#define CLIENT_TOOL_VERBOSE_INIT_VAR
static void ompt_multiplex_callback_task_schedule(ompt_data_t *first_task_data, ompt_task_status_t prior_task_status, ompt_data_t *second_task_data)
static void ompt_multiplex_callback_task_dependence(ompt_data_t *first_task_data, ompt_data_t *second_task_data)
static ompt_set_callback_t ompt_multiplex_set_callback
int ompt_multiplex_initialize(ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *data)
int ompt_multiplex_client_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size)
static ompt_get_thread_data_t ompt_multiplex_get_thread_data
ompt_multiplex_callbacks_t ompt_multiplex_client_callbacks
static void ompt_multiplex_callback_target(ompt_target_t kind, ompt_scope_endpoint_t endpoint, int device_num, ompt_data_t *task_data, ompt_id_t target_id, const void *codeptr_ra)
static void ompt_multiplex_callback_device_initialize(int device_num, const char *type, ompt_device_t *device, ompt_function_lookup_t lookup, const char *documentation)
static void ompt_multiplex_callback_masked(ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
static void ompt_multiplex_callback_mutex_acquired(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra)
static void ompt_multiplex_callback_implicit_task(ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, unsigned int team_size, unsigned int thread_num, int flags)
static void ompt_multiplex_callback_device_finalize(int device_num)
ompt_start_tool_result_t * ompt_multiplex_client_fns
int ompt_multiplex_client_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num)
void setup_verbose_init()
static void ompt_multiplex_callback_cancel(ompt_data_t *task_data, int flags, const void *codeptr_ra)
static void ompt_multiplex_callback_target_map(ompt_id_t target_id, unsigned int nitems, void **host_addr, void **device_addr, size_t *bytes, unsigned int *mapping_flags, const void *codeptr_ra)
static ompt_get_task_info_t ompt_multiplex_get_task_info
ompt_data_t * ompt_multiplex_client_get_thread_data()