summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2015-08-17 10:04:38 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2015-08-17 10:04:38 +0000
commitf0c4ba633041cb73fecae023d1b7a9ca898dd46e (patch)
treeaf23969568e728fa0fcb87977ddd6aa9ca18c9f1 /openmp/runtime/src
parent65eccb463df7fe511c813ee6a1794c80d7489ff2 (diff)
downloadbcm5719-llvm-f0c4ba633041cb73fecae023d1b7a9ca898dd46e.tar.gz
bcm5719-llvm-f0c4ba633041cb73fecae023d1b7a9ca898dd46e.zip
D11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads
llvm-svn: 245206
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index 70e4150487c..85c7bcc6c3c 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -4865,7 +4865,8 @@ __kmp_allocate_team( kmp_root_t *root, int new_nproc, int max_nproc,
#if OMP_40_ENABLED
# if KMP_AFFINITY_SUPPORTED
- if ( team->t.t_proc_bind == new_proc_bind ) {
+ if ( ( team->t.t_size_changed == 0 )
+ && ( team->t.t_proc_bind == new_proc_bind ) ) {
KA_TRACE( 200, ("__kmp_allocate_team: reusing hot team #%d bindings: proc_bind = %d, partition = [%d,%d]\n",
team->t.t_id, new_proc_bind, team->t.t_first_place,
team->t.t_last_place ) );
OpenPOWER on IntegriCloud