diff options
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/include/50/ompt.h.var | 150 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_barrier.cpp | 6 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_cancel.cpp | 4 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_csupport.cpp | 4 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_runtime.cpp | 5 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_sched.cpp | 2 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_taskdeps.cpp | 12 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_tasking.cpp | 8 | ||||
-rw-r--r-- | openmp/runtime/src/ompt-event-specific.h | 4 | ||||
-rw-r--r-- | openmp/runtime/src/ompt-general.cpp | 12 | ||||
-rw-r--r-- | openmp/runtime/src/ompt-internal.h | 3 | ||||
-rw-r--r-- | openmp/runtime/src/ompt-specific.h | 18 |
12 files changed, 138 insertions, 90 deletions
diff --git a/openmp/runtime/src/include/50/ompt.h.var b/openmp/runtime/src/include/50/ompt.h.var index 56c5834a113..24fc90b8c62 100644 --- a/openmp/runtime/src/include/50/ompt.h.var +++ b/openmp/runtime/src/include/50/ompt.h.var @@ -38,8 +38,10 @@ \ macro (ompt_get_parallel_info) \ macro (ompt_get_task_info) \ + macro (ompt_get_task_memory) \ macro (ompt_get_thread_data) \ macro (ompt_get_unique_id) \ + macro (ompt_finalize_tool) \ \ macro(ompt_get_num_procs) \ macro(ompt_get_num_places) \ @@ -151,6 +153,10 @@ macro (ompt_callback_flush, ompt_callback_flush_t, 29) /* after executing flush */ \ \ macro (ompt_callback_cancel, ompt_callback_cancel_t, 30) /* cancel innermost binding region */ \ + \ + macro (ompt_callback_reduction, ompt_callback_sync_region_t, 31) /* reduction */ \ + \ + macro (ompt_callback_dispatch, ompt_callback_dispatch_t, 32) /* dispatch of work */ @@ -191,16 +197,17 @@ typedef struct omp_frame_t { * dependences types *---------------------*/ -typedef enum ompt_task_dependence_flag_t { +typedef enum ompt_task_dependence_type_t { // a two bit field for the dependence type - ompt_task_dependence_type_out = 1, - ompt_task_dependence_type_in = 2, - ompt_task_dependence_type_inout = 3, -} ompt_task_dependence_flag_t; + ompt_task_dependence_type_in = 1, + ompt_task_dependence_type_out = 2, + ompt_task_dependence_type_inout = 3, + ompt_task_dependence_type_mutexinoutset = 4 +} ompt_task_dependence_type_t; typedef struct ompt_task_dependence_t { void *variable_addr; - unsigned int dependence_flags; + ompt_task_dependence_type_t dependence_type; } ompt_task_dependence_t; @@ -264,20 +271,22 @@ typedef ompt_interface_fn_t (*ompt_function_lookup_t)( ); /* threads */ -typedef enum ompt_thread_type_t { +typedef enum ompt_thread_t { ompt_thread_initial = 1, // start the enumeration at 1 ompt_thread_worker = 2, ompt_thread_other = 3, ompt_thread_unknown = 4 -} ompt_thread_type_t; +} ompt_thread_t; -typedef enum ompt_invoker_t { - ompt_invoker_program = 1, /* program invokes master task */ - ompt_invoker_runtime = 2 /* runtime invokes master task */ -} ompt_invoker_t; +typedef enum ompt_parallel_flag_t { + ompt_parallel_invoker_program = 0x00000001, /* program invokes master task */ + ompt_parallel_invoker_runtime = 0x00000002, /* runtime invokes master task */ + ompt_parallel_league = 0x40000000, + ompt_parallel_team = 0x80000000 +} ompt_parallel_flag_t; typedef void (*ompt_callback_thread_begin_t) ( - ompt_thread_type_t thread_type, /* type of thread */ + ompt_thread_t thread_type, /* type of thread */ ompt_data_t *thread_data /* data of thread */ ); @@ -301,8 +310,8 @@ typedef void (*ompt_callback_implicit_task_t) ( ompt_scope_endpoint_t endpoint, /* endpoint of implicit task */ ompt_data_t *parallel_data, /* data of parallel region */ ompt_data_t *task_data, /* data of implicit task */ - unsigned int team_size, /* team size */ - unsigned int thread_num /* thread number of calling thread */ + unsigned int actual_parallelism, /* team size */ + unsigned int index /* thread number of calling thread */ ); typedef void (*ompt_callback_parallel_begin_t) ( @@ -310,19 +319,19 @@ typedef void (*ompt_callback_parallel_begin_t) ( const omp_frame_t *encountering_task_frame, /* frame data of encountering task */ ompt_data_t *parallel_data, /* data of parallel region */ unsigned int requested_team_size, /* requested number of threads in team */ - ompt_invoker_t invoker, /* invoker of master task */ + int flag, /* flag for additional information */ const void *codeptr_ra /* return address of runtime call */ ); typedef void (*ompt_callback_parallel_end_t) ( ompt_data_t *parallel_data, /* data of parallel region */ ompt_data_t *encountering_task_data, /* data of encountering task */ - ompt_invoker_t invoker, /* invoker of master task */ + int flag, /* flag for additional information */ const void *codeptr_ra /* return address of runtime call */ ); /* tasks */ -typedef enum ompt_task_type_t { +typedef enum ompt_task_flag_t { ompt_task_initial = 0x1, ompt_task_implicit = 0x2, ompt_task_explicit = 0x4, @@ -332,13 +341,13 @@ typedef enum ompt_task_type_t { ompt_task_final = 0x20000000, ompt_task_mergeable = 0x40000000, ompt_task_merged = 0x80000000 -} ompt_task_type_t; +} ompt_task_flag_t; typedef enum ompt_task_status_t { ompt_task_complete = 1, ompt_task_yield = 2, ompt_task_cancel = 3, - ompt_task_others = 4 + ompt_task_switch = 4 } ompt_task_status_t; typedef void (*ompt_callback_task_schedule_t) ( @@ -351,7 +360,7 @@ typedef void (*ompt_callback_task_create_t) ( ompt_data_t *encountering_task_data, /* data of parent task */ const omp_frame_t *encountering_task_frame, /* frame data for parent task */ ompt_data_t *new_task_data, /* data of created task */ - int type, /* type of created task */ + int flag, /* type of created task */ int has_dependences, /* created task has dependences */ const void *codeptr_ra /* return address of runtime call */ ); @@ -369,15 +378,15 @@ typedef void (*ompt_callback_task_dependence_t) ( ); /* target and device */ -typedef enum ompt_target_type_t { +typedef enum ompt_target_t { ompt_target = 1, ompt_target_enter_data = 2, ompt_target_exit_data = 3, ompt_target_update = 4 -} ompt_target_type_t; +} ompt_target_t; typedef void (*ompt_callback_target_t) ( - ompt_target_type_t kind, + ompt_target_t kind, ompt_scope_endpoint_t endpoint, uint64_t device_num, ompt_data_t *task_data, @@ -396,14 +405,18 @@ typedef void (*ompt_callback_target_data_op_t) ( ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype, - void *host_addr, - void *device_addr, - size_t bytes + void *src_addr, + int src_device_num, + void *dest_addr, + int dest_device_num, + size_t bytes, + const void *codeptr_ra ); typedef void (*ompt_callback_target_submit_t) ( ompt_id_t target_id, - ompt_id_t host_op_id + ompt_id_t host_op_id, + unsigned int requested_num_teams ); typedef void (*ompt_callback_target_map_t) ( @@ -412,7 +425,8 @@ typedef void (*ompt_callback_target_map_t) ( void **host_addr, void **device_addr, size_t *bytes, - unsigned int *mapping_flags + unsigned int *mapping_flags, + const void *codeptr_ra ); typedef void (*ompt_callback_device_initialize_t) ( @@ -453,32 +467,31 @@ typedef int (*ompt_callback_control_tool_t) ( const void *codeptr_ra /* return address of runtime call */ ); -typedef enum ompt_mutex_kind_t { - ompt_mutex = 0x10, - ompt_mutex_lock = 0x11, - ompt_mutex_nest_lock = 0x12, - ompt_mutex_critical = 0x13, - ompt_mutex_atomic = 0x14, - ompt_mutex_ordered = 0x20 -} ompt_mutex_kind_t; +typedef enum ompt_mutex_t { + ompt_mutex_lock = 1, + ompt_mutex_nest_lock = 2, + ompt_mutex_critical = 3, + ompt_mutex_atomic = 4, + ompt_mutex_ordered = 5 +} ompt_mutex_t; typedef void (*ompt_callback_mutex_acquire_t) ( - ompt_mutex_kind_t kind, /* mutex kind */ + ompt_mutex_t kind, /* mutex kind */ unsigned int hint, /* mutex hint */ unsigned int impl, /* mutex implementation */ - omp_wait_id_t wait_id, /* id of object being awaited */ + omp_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); typedef void (*ompt_callback_mutex_t) ( - ompt_mutex_kind_t kind, /* mutex kind */ - omp_wait_id_t wait_id, /* id of object being awaited */ + ompt_mutex_t kind, /* mutex kind */ + omp_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); typedef void (*ompt_callback_nest_lock_t) ( ompt_scope_endpoint_t endpoint, /* endpoint of nested lock */ - omp_wait_id_t wait_id, /* id of object being awaited */ + omp_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); @@ -489,7 +502,7 @@ typedef void (*ompt_callback_master_t) ( const void *codeptr_ra /* return address of runtime call */ ); -typedef enum ompt_work_type_t { +typedef enum ompt_work_t { ompt_work_loop = 1, ompt_work_sections = 2, ompt_work_single_executor = 3, @@ -497,10 +510,10 @@ typedef enum ompt_work_type_t { ompt_work_workshare = 5, ompt_work_distribute = 6, ompt_work_taskloop = 7 -} ompt_work_type_t; +} ompt_work_t; typedef void (*ompt_callback_work_t) ( - ompt_work_type_t wstype, /* type of work region */ + ompt_work_t wstype, /* type of work region */ ompt_scope_endpoint_t endpoint, /* endpoint of work region */ ompt_data_t *parallel_data, /* data of parallel region */ ompt_data_t *task_data, /* data of task */ @@ -508,14 +521,18 @@ typedef void (*ompt_callback_work_t) ( const void *codeptr_ra /* return address of runtime call */ ); -typedef enum ompt_sync_region_kind_t { - ompt_sync_region_barrier = 1, - ompt_sync_region_taskwait = 2, - ompt_sync_region_taskgroup = 3 -} ompt_sync_region_kind_t; +typedef enum ompt_sync_region_t { + ompt_sync_region_barrier = 1, + ompt_sync_region_barrier_implicit = 2, + ompt_sync_region_barrier_explicit = 3, + ompt_sync_region_barrier_implementation = 4, + ompt_sync_region_taskwait = 5, + ompt_sync_region_taskgroup = 6, + ompt_sync_region_reduction = 7 +} ompt_sync_region_t; typedef void (*ompt_callback_sync_region_t) ( - ompt_sync_region_kind_t kind, /* kind of sync region */ + ompt_sync_region_t kind, /* kind of sync region */ ompt_scope_endpoint_t endpoint, /* endpoint of sync region */ ompt_data_t *parallel_data, /* data of parallel region */ ompt_data_t *task_data, /* data of task */ @@ -523,10 +540,10 @@ typedef void (*ompt_callback_sync_region_t) ( ); typedef enum ompt_cancel_flag_t { - ompt_cancel_parallel = 0x1, - ompt_cancel_sections = 0x2, - ompt_cancel_do = 0x4, - ompt_cancel_taskgroup = 0x8, + ompt_cancel_parallel = 0x01, + ompt_cancel_sections = 0x02, + ompt_cancel_loop = 0x04, + ompt_cancel_taskgroup = 0x08, ompt_cancel_activated = 0x10, ompt_cancel_detected = 0x20, ompt_cancel_discarded_task = 0x40 @@ -543,6 +560,18 @@ typedef void (*ompt_callback_flush_t) ( const void *codeptr_ra /* return address of runtime call */ ); +typedef enum ompt_dispatch_t { + ompt_dispatch_iteration = 1, + ompt_dispatch_section = 2 +} ompt_dispatch_t; + +typedef void (*ompt_callback_dispatch_t) ( + ompt_data_t *parallel_data, + ompt_data_t *task_data, + ompt_dispatch_t kind, + ompt_data_t instance +); + /**************************************************************************** * ompt API ***************************************************************************/ @@ -587,6 +616,12 @@ OMPT_API_FUNCTION(int, ompt_get_task_info, ( int *thread_num )); +OMPT_API_FUNCTION(int, ompt_get_task_memory, ( + void **addr, + size_t *size, + int block +)); + /* procs */ OMPT_API_FUNCTION(int, ompt_get_num_procs, (void)); @@ -615,7 +650,7 @@ OMPT_API_FUNCTION(int, ompt_get_proc_id, (void)); ***************************************************************************/ OMPT_API_FUNCTION(int, ompt_initialize, ( - ompt_function_lookup_t ompt_fn_lookup, + ompt_function_lookup_t lookup, ompt_data_t *tool_data )); @@ -673,6 +708,9 @@ OMPT_API_FUNCTION(int, ompt_enumerate_mutex_impls, ( /* get_unique_id */ OMPT_API_FUNCTION(uint64_t, ompt_get_unique_id, (void)); +/* finalize tool */ +OMPT_API_FUNCTION(void, ompt_finalize_tool, (void)); + #ifdef __cplusplus }; #endif diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp index 3f53d6b6730..e3925cb304d 100644 --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -1223,7 +1223,7 @@ int __kmp_barrier(enum barrier_type bt, int gtid, int is_split, kmp_info_t *this_thr = __kmp_threads[gtid]; kmp_team_t *team = this_thr->th.th_team; int status = 0; -#if OMPT_SUPPORT +#if OMPT_SUPPORT && OMPT_OPTIONAL ompt_data_t *my_task_data; ompt_data_t *my_parallel_data; void *return_address; @@ -1599,10 +1599,10 @@ void __kmp_join_barrier(int gtid) { ANNOTATE_BARRIER_BEGIN(&team->t.t_bar); #if OMPT_SUPPORT - ompt_data_t *my_task_data; - ompt_data_t *my_parallel_data; if (ompt_enabled.enabled) { #if OMPT_OPTIONAL + ompt_data_t *my_task_data; + ompt_data_t *my_parallel_data; void *codeptr = NULL; int ds_tid = this_thr->th.th_info.ds.ds_tid; if (KMP_MASTER_TID(ds_tid) && diff --git a/openmp/runtime/src/kmp_cancel.cpp b/openmp/runtime/src/kmp_cancel.cpp index 3895f97833e..5ed91673b77 100644 --- a/openmp/runtime/src/kmp_cancel.cpp +++ b/openmp/runtime/src/kmp_cancel.cpp @@ -65,7 +65,7 @@ kmp_int32 __kmpc_cancel(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 cncl_kind) { if (cncl_kind == cancel_parallel) type = ompt_cancel_parallel; else if (cncl_kind == cancel_loop) - type = ompt_cancel_do; + type = ompt_cancel_loop; else if (cncl_kind == cancel_sections) type = ompt_cancel_sections; ompt_callbacks.ompt_callback(ompt_callback_cancel)( @@ -172,7 +172,7 @@ kmp_int32 __kmpc_cancellationpoint(ident_t *loc_ref, kmp_int32 gtid, if (cncl_kind == cancel_parallel) type = ompt_cancel_parallel; else if (cncl_kind == cancel_loop) - type = ompt_cancel_do; + type = ompt_cancel_loop; else if (cncl_kind == cancel_sections) type = ompt_cancel_sections; ompt_callbacks.ompt_callback(ompt_callback_cancel)( diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index 8c8b8eb26f8..51934cbdffc 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -513,7 +513,7 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { if (ompt_enabled.ompt_callback_parallel_end) { ompt_callbacks.ompt_callback(ompt_callback_parallel_end)( &(serial_team->t.ompt_team_info.parallel_data), parent_task_data, - ompt_invoker_program, OMPT_LOAD_RETURN_ADDRESS(global_tid)); + ompt_parallel_invoker_program, OMPT_LOAD_RETURN_ADDRESS(global_tid)); } __ompt_lw_taskteam_unlink(this_thr); this_thr->th.ompt_thread_info.state = omp_state_overhead; @@ -1782,7 +1782,7 @@ void __kmpc_for_static_fini(ident_t *loc, kmp_int32 global_tid) { #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_work) { - ompt_work_type_t ompt_work_type = ompt_work_loop; + ompt_work_t ompt_work_type = ompt_work_loop; ompt_team_info_t *team_info = __ompt_get_teaminfo(0, NULL); ompt_task_info_t *task_info = __ompt_get_task_info_object(0); // Determine workshare type diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index 9078e3a4946..e0c15cdf5ec 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -1225,7 +1225,8 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { ompt_callbacks.ompt_callback(ompt_callback_parallel_begin)( &(parent_task_info->task_data), &(parent_task_info->frame), - &ompt_parallel_data, team_size, ompt_invoker_program, codeptr); + &ompt_parallel_data, team_size, ompt_parallel_invoker_program, + codeptr); } } #endif // OMPT_SUPPORT @@ -3824,7 +3825,7 @@ int __kmp_register_root(int initial_thread) { #if OMPT_SUPPORT if (!initial_thread && ompt_enabled.enabled) { - ompt_thread_t *root_thread = ompt_get_thread(); + kmp_info_t *root_thread = ompt_get_thread(); ompt_set_thread_state(root_thread, omp_state_overhead); diff --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp index 67fe02f7944..fc8000e65fd 100644 --- a/openmp/runtime/src/kmp_sched.cpp +++ b/openmp/runtime/src/kmp_sched.cpp @@ -68,7 +68,7 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, #if OMPT_SUPPORT && OMPT_OPTIONAL ompt_team_info_t *team_info = NULL; ompt_task_info_t *task_info = NULL; - ompt_work_type_t ompt_work_type = ompt_work_loop; + ompt_work_t ompt_work_type = ompt_work_loop; static kmp_int8 warn = 0; diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index 4efd12bac8a..34ea3793d1d 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -508,26 +508,26 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid, new_taskdata->ompt_task_info.deps[i].variable_addr = (void *)dep_list[i].base_addr; if (dep_list[i].flags.in && dep_list[i].flags.out) - new_taskdata->ompt_task_info.deps[i].dependence_flags = + new_taskdata->ompt_task_info.deps[i].dependence_type = ompt_task_dependence_type_inout; else if (dep_list[i].flags.out) - new_taskdata->ompt_task_info.deps[i].dependence_flags = + new_taskdata->ompt_task_info.deps[i].dependence_type = ompt_task_dependence_type_out; else if (dep_list[i].flags.in) - new_taskdata->ompt_task_info.deps[i].dependence_flags = + new_taskdata->ompt_task_info.deps[i].dependence_type = ompt_task_dependence_type_in; } for (i = 0; i < ndeps_noalias; i++) { new_taskdata->ompt_task_info.deps[ndeps + i].variable_addr = (void *)noalias_dep_list[i].base_addr; if (noalias_dep_list[i].flags.in && noalias_dep_list[i].flags.out) - new_taskdata->ompt_task_info.deps[ndeps + i].dependence_flags = + new_taskdata->ompt_task_info.deps[ndeps + i].dependence_type = ompt_task_dependence_type_inout; else if (noalias_dep_list[i].flags.out) - new_taskdata->ompt_task_info.deps[ndeps + i].dependence_flags = + new_taskdata->ompt_task_info.deps[ndeps + i].dependence_type = ompt_task_dependence_type_out; else if (noalias_dep_list[i].flags.in) - new_taskdata->ompt_task_info.deps[ndeps + i].dependence_flags = + new_taskdata->ompt_task_info.deps[ndeps + i].dependence_type = ompt_task_dependence_type_in; } ompt_callbacks.ompt_callback(ompt_callback_task_dependences)( diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp index e1b03f780b5..9028686bea1 100644 --- a/openmp/runtime/src/kmp_tasking.cpp +++ b/openmp/runtime/src/kmp_tasking.cpp @@ -473,7 +473,7 @@ static inline void __ompt_task_start(kmp_task_t *task, kmp_taskdata_t *current_task, kmp_int32 gtid) { kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task); - ompt_task_status_t status = ompt_task_others; + ompt_task_status_t status = ompt_task_switch; if (__kmp_threads[gtid]->th.ompt_thread_info.ompt_task_yielded) { status = ompt_task_yield; __kmp_threads[gtid]->th.ompt_thread_info.ompt_task_yielded = 0; @@ -1586,7 +1586,7 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid, // Scheduling back to the parent task. __ompt_task_finish(new_task, new_taskdata->ompt_task_info.scheduling_parent, - ompt_task_others); + ompt_task_switch); new_taskdata->ompt_task_info.frame.exit_frame = NULL; } } @@ -1766,7 +1766,7 @@ static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid, return TASK_CURRENT_NOT_QUEUED; } -#if OMPT_SUPPORT +#if OMPT_SUPPORT && OMPT_OPTIONAL OMPT_NOINLINE static kmp_int32 __kmpc_omp_taskwait_ompt(ident_t *loc_ref, kmp_int32 gtid, void *frame_address, @@ -1774,7 +1774,7 @@ static kmp_int32 __kmpc_omp_taskwait_ompt(ident_t *loc_ref, kmp_int32 gtid, return __kmpc_omp_taskwait_template<true>(loc_ref, gtid, frame_address, return_address); } -#endif // OMPT_SUPPORT +#endif // OMPT_SUPPORT && OMPT_OPTIONAL // __kmpc_omp_taskwait: Wait until all tasks generated by the current task are // complete diff --git a/openmp/runtime/src/ompt-event-specific.h b/openmp/runtime/src/ompt-event-specific.h index 305b1764f7b..1fb08444749 100644 --- a/openmp/runtime/src/ompt-event-specific.h +++ b/openmp/runtime/src/ompt-event-specific.h @@ -105,4 +105,8 @@ #define ompt_callback_cancel_implemented ompt_event_MAY_ALWAYS_OPTIONAL +#define ompt_callback_reduction_implemented ompt_event_UNIMPLEMENTED + +#define ompt_callback_dispatch_implemented ompt_event_UNIMPLEMENTED + #endif diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp index 25ad19d03af..964f6cdd1d8 100644 --- a/openmp/runtime/src/ompt-general.cpp +++ b/openmp/runtime/src/ompt-general.cpp @@ -351,7 +351,7 @@ void ompt_post_init() { return; } - ompt_thread_t *root_thread = ompt_get_thread(); + kmp_info_t *root_thread = ompt_get_thread(); ompt_set_thread_state(root_thread, omp_state_overhead); @@ -509,6 +509,12 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type, task_frame, parallel_data, thread_num); } +OMPT_API_ROUTINE int ompt_get_task_memory(void **addr, size_t *size, + int block) { + // stub + return 0; +} + /***************************************************************************** * num_procs ****************************************************************************/ @@ -678,6 +684,10 @@ OMPT_API_ROUTINE uint64_t ompt_get_unique_id(void) { return __ompt_get_unique_id_internal(); } +OMPT_API_ROUTINE void ompt_finalize_tool(void) { + // stub +} + /***************************************************************************** * Target ****************************************************************************/ diff --git a/openmp/runtime/src/ompt-internal.h b/openmp/runtime/src/ompt-internal.h index a8f3bac49a4..6b92eaa5e49 100644 --- a/openmp/runtime/src/ompt-internal.h +++ b/openmp/runtime/src/ompt-internal.h @@ -22,7 +22,8 @@ #define _OMP_EXTERN extern "C" #define OMPT_INVOKER(x) \ - ((x == fork_context_gnu) ? ompt_invoker_program : ompt_invoker_runtime) + ((x == fork_context_gnu) ? ompt_parallel_invoker_program \ + : ompt_parallel_invoker_runtime) #define ompt_callback(e) e##_callback diff --git a/openmp/runtime/src/ompt-specific.h b/openmp/runtime/src/ompt-specific.h index 28905bb5dc4..8cf74504a2d 100644 --- a/openmp/runtime/src/ompt-specific.h +++ b/openmp/runtime/src/ompt-specific.h @@ -17,25 +17,19 @@ #include "kmp.h" /***************************************************************************** - * types - ****************************************************************************/ - -typedef kmp_info_t ompt_thread_t; - -/***************************************************************************** * forward declarations ****************************************************************************/ void __ompt_team_assign_id(kmp_team_t *team, ompt_data_t ompt_pid); void __ompt_thread_assign_wait_id(void *variable); -void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, ompt_thread_t *thr, +void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int gtid, ompt_data_t *ompt_pid, void *codeptr); -void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt, ompt_thread_t *thr, +void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int on_heap); -void __ompt_lw_taskteam_unlink(ompt_thread_t *thr); +void __ompt_lw_taskteam_unlink(kmp_info_t *thr); ompt_team_info_t *__ompt_get_teaminfo(int depth, int *size); @@ -90,16 +84,16 @@ inline void *__ompt_load_return_address(int gtid) { // inline functions //****************************************************************************** -inline ompt_thread_t *ompt_get_thread_gtid(int gtid) { +inline kmp_info_t *ompt_get_thread_gtid(int gtid) { return (gtid >= 0) ? __kmp_thread_from_gtid(gtid) : NULL; } -inline ompt_thread_t *ompt_get_thread() { +inline kmp_info_t *ompt_get_thread() { int gtid = __kmp_get_gtid(); return ompt_get_thread_gtid(gtid); } -inline void ompt_set_thread_state(ompt_thread_t *thread, omp_state_t state) { +inline void ompt_set_thread_state(kmp_info_t *thread, omp_state_t state) { thread->th.ompt_thread_info.state = state; } |