Skip to content

Commit

Permalink
[BOLT] fixing th_active management
Browse files Browse the repository at this point in the history
An OpenMP thread that has finished its work should help run tasks in the same
team, while it did not happen since such a thread remains "active".  This patch
fixes it by marking a thread as inactive when it finishes.
  • Loading branch information
shintaro-iwasaki committed Jan 17, 2020
1 parent 0a0033b commit e844744
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/src/z_Linux_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ static void __kmp_abt_launch_worker(void *thr) {
td->td_tq_max_size = 0;
}

/* This thread has been finished. Any task can use this as a parent. */
__kmp_abt_release_info(this_thr);

if (end_tid - start_tid > 1)
__kmp_abt_join_workers_recursive(team, start_tid, end_tid);

Expand Down

0 comments on commit e844744

Please sign in to comment.