Skip to content

Commit de011e3

Browse files
author
Jonathan Peyton
authored
[OpenMP] [NFC] Remove KMP_NESTED_HOT_TEAMS macro (#143584)
The feature was introduced back in 2014 and has been on ever since. Leave the feature in place. Removing only the macro.
1 parent 5062fe5 commit de011e3

File tree

5 files changed

+52
-126
lines changed

5 files changed

+52
-126
lines changed

openmp/runtime/src/kmp.h

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,6 @@ class kmp_stats_list;
160160
#define USE_FAST_MEMORY 3
161161
#endif
162162

163-
#ifndef KMP_NESTED_HOT_TEAMS
164-
#define KMP_NESTED_HOT_TEAMS 0
165-
#define USE_NESTED_HOT_ARG(x)
166-
#else
167-
#if KMP_NESTED_HOT_TEAMS
168-
#define USE_NESTED_HOT_ARG(x) , x
169-
#else
170-
#define USE_NESTED_HOT_ARG(x)
171-
#endif
172-
#endif
173-
174163
// Assume using BGET compare_exchange instruction instead of lock by default.
175164
#ifndef USE_CMP_XCHG_FOR_BGET
176165
#define USE_CMP_XCHG_FOR_BGET 1
@@ -2913,14 +2902,12 @@ typedef struct kmp_free_list {
29132902
// sync list)
29142903
} kmp_free_list_t;
29152904
#endif
2916-
#if KMP_NESTED_HOT_TEAMS
29172905
// Hot teams array keeps hot teams and their sizes for given thread. Hot teams
29182906
// are not put in teams pool, and they don't put threads in threads pool.
29192907
typedef struct kmp_hot_team_ptr {
29202908
kmp_team_p *hot_team; // pointer to hot_team of given nesting level
29212909
kmp_int32 hot_team_nth; // number of threads allocated for the hot_team
29222910
} kmp_hot_team_ptr_t;
2923-
#endif
29242911
typedef struct kmp_teams_size {
29252912
kmp_int32 nteams; // number of teams in a league
29262913
kmp_int32 nth; // number of threads in each team of the league
@@ -2995,9 +2982,7 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info {
29952982
int th_nt_sev; // error severity for strict modifier
29962983
const char *th_nt_msg; // error message for strict modifier
29972984
int th_set_nested_nth_sz;
2998-
#if KMP_NESTED_HOT_TEAMS
29992985
kmp_hot_team_ptr_t *th_hot_teams; /* array of hot teams */
3000-
#endif
30012986
kmp_proc_bind_t
30022987
th_set_proc_bind; /* if != proc_bind_default, use request for next fork */
30032988
kmp_teams_size_t
@@ -3553,10 +3538,8 @@ extern int __kmp_dflt_max_active_levels;
35533538
extern bool __kmp_dflt_max_active_levels_set;
35543539
extern int __kmp_dispatch_num_buffers; /* max possible dynamic loops in
35553540
concurrent execution per team */
3556-
#if KMP_NESTED_HOT_TEAMS
35573541
extern int __kmp_hot_teams_mode;
35583542
extern int __kmp_hot_teams_max_level;
3559-
#endif
35603543

35613544
#if KMP_MIC_SUPPORTED
35623545
extern enum mic_type __kmp_mic_type;
@@ -4040,16 +4023,16 @@ extern void __kmp_suspend_uninitialize_thread(kmp_info_t *th);
40404023

40414024
extern kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team,
40424025
int tid);
4043-
extern kmp_team_t *
4044-
__kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc,
4026+
extern kmp_team_t *__kmp_allocate_team(kmp_root_t *root, int new_nproc,
4027+
int max_nproc,
40454028
#if OMPT_SUPPORT
4046-
ompt_data_t ompt_parallel_data,
4029+
ompt_data_t ompt_parallel_data,
40474030
#endif
4048-
kmp_proc_bind_t proc_bind, kmp_internal_control_t *new_icvs,
4049-
int argc USE_NESTED_HOT_ARG(kmp_info_t *thr));
4031+
kmp_proc_bind_t proc_bind,
4032+
kmp_internal_control_t *new_icvs,
4033+
int argc, kmp_info_t *thr);
40504034
extern void __kmp_free_thread(kmp_info_t *);
4051-
extern void __kmp_free_team(kmp_root_t *,
4052-
kmp_team_t *USE_NESTED_HOT_ARG(kmp_info_t *));
4035+
extern void __kmp_free_team(kmp_root_t *, kmp_team_t *, kmp_info_t *);
40534036
extern kmp_team_t *__kmp_reap_team(kmp_team_t *);
40544037

40554038
/* ------------------------------------------------------------------------ */

openmp/runtime/src/kmp_config.h.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
# define BUILD_I8 1
115115
#endif
116116

117-
#define KMP_NESTED_HOT_TEAMS 1
118117
#define KMP_ADJUST_BLOCKTIME 1
119118
#define BUILD_PARALLEL_ORDERED 1
120119
#define KMP_ASM_INTRINS 1

openmp/runtime/src/kmp_global.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ int __kmp_tp_cached = 0;
135135
int __kmp_dispatch_num_buffers = KMP_DFLT_DISP_NUM_BUFF;
136136
int __kmp_dflt_max_active_levels = 1; // Nesting off by default
137137
bool __kmp_dflt_max_active_levels_set = false; // Don't override set value
138-
#if KMP_NESTED_HOT_TEAMS
139138
int __kmp_hot_teams_mode = 0; /* 0 - free extra threads when reduced */
140139
/* 1 - keep extra threads when reduced */
141140
int __kmp_hot_teams_max_level = 1; /* nesting level of hot teams */
142-
#endif
143141
enum library_type __kmp_library = library_none;
144142
enum sched_type __kmp_sched =
145143
kmp_sch_default; /* scheduling method for runtime scheduling */

0 commit comments

Comments
 (0)