[Openmp-commits] [openmp] r245206 - D11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 17 03:04:38 PDT 2015


Author: achurbanov
Date: Mon Aug 17 05:04:38 2015
New Revision: 245206

URL: http://llvm.org/viewvc/llvm-project?rev=245206&view=rev
Log:
D11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads

Modified:
    openmp/trunk/runtime/src/kmp_runtime.c

Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=245206&r1=245205&r2=245206&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Mon Aug 17 05:04:38 2015
@@ -4865,7 +4865,8 @@ __kmp_allocate_team( kmp_root_t *root, i
 
 #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 ) );




More information about the Openmp-commits mailing list