From f0c4ba633041cb73fecae023d1b7a9ca898dd46e Mon Sep 17 00:00:00 2001 From: Andrey Churbanov Date: Mon, 17 Aug 2015 10:04:38 +0000 Subject: D11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads llvm-svn: 245206 --- openmp/runtime/src/kmp_runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openmp/runtime/src') 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 ) ); -- cgit v1.2.3