[Openmp-commits] [openmp] r237916 - Fix task team synchronization

Jonathan Peyton jonathan.l.peyton at intel.com
Thu May 21 10:20:01 PDT 2015


Author: jlpeyton
Date: Thu May 21 12:20:01 2015
New Revision: 237916

URL: http://llvm.org/viewvc/llvm-project?rev=237916&view=rev
Log:
Fix task team synchronization 

The fix simply syncs up the new threads to have the same task_state and
task_team as the old threads.  The master thread is skipped,
because it shouldn't at this point have the team's task_team value yet
-- it should still have parent_team's task_team.  It gets pointed at
the new team's task_team later, after __kmp_allocate_team returns, and
the master has stored a memo of it's old task_state.


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=237916&r1=237915&r2=237916&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Thu May 21 12:20:01 2015
@@ -5060,6 +5060,7 @@ __kmp_allocate_team( kmp_root_t *root, i
                 for (f=0;  f < team->t.t_nproc; ++f) {
                     __kmp_initialize_info( team->t.t_threads[ f ], team, f, __kmp_gtid_from_tid( f, team ) );
                     team->t.t_threads[f]->th.th_task_state = old_state;
+                    team->t.t_threads[f]->th.th_task_team = team->t.t_task_team[old_state];
                 }
             }
 





More information about the Openmp-commits mailing list