Skip to content

Commit

Permalink
Update OMPT context handler for implicit task
Browse files Browse the repository at this point in the history
- removed ignoring the first implicit task for non-main threads
  • Loading branch information
jrmadsen committed Oct 30, 2024
1 parent 2b6c514 commit 41096b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/timemory/components/ompt/context_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ context_handler<ApiT>::operator()(ompt_scope_endpoint_t endpoint,
return;

// implicit tasks do not have a valid end on non-main threads
static auto _first_global = std::atomic<size_t>{ 0 };
static thread_local auto _first_thread = std::atomic<size_t>{ 0 };
auto _first_global_v = _first_global++;
auto _first_thread_v = _first_thread++;
if(_first_global_v > 0 && _first_thread_v == 0)
return;
// static auto _first_global = std::atomic<size_t>{ 0 };
// static thread_local auto _first_thread = std::atomic<size_t>{ 0 };
// auto _first_global_v = _first_global++;
// auto _first_thread_v = _first_thread++;
// if(_first_global_v > 0 && _first_thread_v == 0)
// return;

auto _ctx_info = context_info{ "ompt_implicit_task", nullptr,
argument_array_t{ { "team_size", team_size },
Expand Down

0 comments on commit 41096b1

Please sign in to comment.