From 723b0beb0459a84da019edb2d8ed31bc8c28b87a Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Thu, 12 Dec 2024 04:40:12 +0000 Subject: [PATCH] Merge branch 'fixindexrace' into 'master' Fix Replicated Index Space Race See merge request StanfordLegion/legion!1577 (cherry picked from commit ebb7f17f834a894cd207830f6ce4e449489906e5) 84235cf7 legion: fix race in registering commit preconditions for control replicated index space tasks Co-authored-by: Mike Bauer --- runtime/legion/legion_replication.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/legion/legion_replication.cc b/runtime/legion/legion_replication.cc index 93e7bea6e3..55d99fb60e 100644 --- a/runtime/legion/legion_replication.cc +++ b/runtime/legion/legion_replication.cc @@ -1522,8 +1522,11 @@ namespace Legion { // No need to do anything with the output local precondition // We already added it to the complete_effects when we made // the collective at the beginning - if (collective_done.exists()) + if (collective_done.exists() && !collective_done.has_triggered()) + { + AutoLock o_lock(op_lock); commit_preconditions.insert(collective_done); + } } // Now call the base version of this to finish making // the instances for the future results