Skip to content

Commit

Permalink
legion: Issue execution fence before deleting task local regions
Browse files Browse the repository at this point in the history
  • Loading branch information
magnatelee committed Apr 22, 2018
1 parent 4e3008f commit c946e72
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/legion/legion_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6267,12 +6267,19 @@ namespace Legion {
unmap_all_regions();
// If we own any task local regions, we issue deletion operations on them.
if (!local_regions.empty())
{
// We cannot destroy task local regions until our child tasks are done
// accessing them.
issue_execution_fence();
for (std::set<LogicalRegion>::iterator it = local_regions.begin();
it != local_regions.end(); it++)
{
#ifdef DEBUG_LEGION
assert(created_regions.find(*it) != created_regions.end());
#endif
destroy_logical_region(*it);
}
}
const std::deque<InstanceSet> &physical_instances =
single_task->get_physical_instances();
// Note that this loop doesn't handle create regions
Expand Down

0 comments on commit c946e72

Please sign in to comment.