[Openmp-commits] [PATCH] D11157: Fix bug in affinity binding during team allocation.

Jonathan Peyton jonathan.l.peyton at intel.com
Mon Jul 13 13:35:18 PDT 2015


jlpeyton created this revision.
jlpeyton added a reviewer: hfinkel.
jlpeyton added subscribers: llvm-commits, openmp-commits, brianbliss.
jlpeyton set the repository for this revision to rL LLVM.

One line addition which re-binds threads to places (__kmp_partition_places()) in case the hot team size is reduced via omp_set_num_threads().

Repository:
  rL LLVM

http://reviews.llvm.org/D11157

Files:
  runtime/src/kmp_runtime.c

Index: runtime/src/kmp_runtime.c
===================================================================
--- runtime/src/kmp_runtime.c
+++ runtime/src/kmp_runtime.c
@@ -4853,7 +4853,8 @@
 
 #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 ) );


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11157.29601.patch
Type: text/x-patch
Size: 648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20150713/b56a30be/attachment.bin>


More information about the Openmp-commits mailing list