Skip to content

Commit c610715

Browse files
Merge branch 'master' into rc
2 parents 6aa49d6 + 465ae99 commit c610715

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

runtime/legion/legion_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,7 @@ typedef enum legion_error_t {
11561156
ERROR_EXCEEDED_MAXIMUM_NUMBER_LOCAL_FIELDS = 387,
11571157
ERROR_UNABLE_ALLOCATE_LOCAL_FIELD = 388,
11581158
ERROR_TASK_ATTEMPTED_ALLOCATE_FIELD = 389,
1159+
ERROR_DEFERRED_BUFFER_DOUBLE_DELETE = 390,
11591160
//ERROR_PREDICATED_TASK_LAUNCH_FOR_TASK = 392,
11601161
ERROR_PREDICATED_INDEX_TASK_LAUNCH = 393,
11611162
ERROR_ATTEMPTED_INLINE_MAPPING_REGION = 395,

runtime/legion/legion_context.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,11 @@ namespace Legion {
623623
{
624624
std::map<PhysicalInstance,LgEvent>::iterator finder =
625625
task_local_instances.find(instance);
626-
#ifdef DEBUG_LEGION
627-
assert(finder != task_local_instances.end());
628-
#endif
626+
if (finder == task_local_instances.end())
627+
REPORT_LEGION_ERROR(ERROR_DEFERRED_BUFFER_DOUBLE_DELETE,
628+
"Detected double deletion of deferred buffer " IDFMT
629+
"in parent task %s (UID %lld).",
630+
instance.id, get_task_name(), get_unique_id())
629631
task_local_instances.erase(finder);
630632
MemoryManager *manager =
631633
runtime->find_memory_manager(instance.get_location());

runtime/legion/region_tree.inl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,6 +3885,7 @@ namespace Legion {
38853885
{
38863886
const DomainPoint color =
38873887
partition->color_space->delinearize_color_to_point(*itr);
3888+
ApEvent child_ready;
38883889
Realm::IndexSpace<DIM,T> child_space;
38893890
if (future_map_domain.contains(color))
38903891
{
@@ -3910,19 +3911,20 @@ namespace Legion {
39103911
context->runtime->profiler->add_partition_request(requests,
39113912
op, DEP_PART_INTERSECTIONS);
39123913
Realm::IndexSpace<DIM,T> result;
3913-
ApEvent ready(Realm::IndexSpace<DIM,T>::compute_intersection(
3914-
parent_space, child_space, result, requests, parent_ready));
3914+
child_ready = ApEvent(
3915+
Realm::IndexSpace<DIM,T>::compute_intersection(
3916+
parent_space, child_space, result, requests, parent_ready));
39153917
child_space = result;
3916-
if (ready.exists())
3917-
result_events.insert(ready);
3918+
if (child_ready.exists())
3919+
result_events.insert(child_ready);
39183920
}
39193921
}
39203922
else
39213923
child_space = Realm::IndexSpace<DIM,T>::make_empty();
39223924
IndexSpaceNodeT<DIM,T> *child =
39233925
static_cast<IndexSpaceNodeT<DIM,T>*>(
39243926
partition->get_child(*itr));
3925-
if (child->set_realm_index_space(child_space, ApEvent::NO_AP_EVENT))
3927+
if (child->set_realm_index_space(child_space, child_ready))
39263928
delete child;
39273929
}
39283930
if (result_events.empty())

0 commit comments

Comments
 (0)