diff --git a/discopop_explorer/pattern_detectors/do_all_detector.py b/discopop_explorer/pattern_detectors/do_all_detector.py index 00eb620f0..49d1f9245 100644 --- a/discopop_explorer/pattern_detectors/do_all_detector.py +++ b/discopop_explorer/pattern_detectors/do_all_detector.py @@ -319,7 +319,9 @@ def __check_loop_dependencies( ) cond_2 = len([cf for cf in called_functions_lineids if cf in dep.metadata_inter_call_dep]) > 0 cond_3 = len([t for t in parent_loops if t in dep.metadata_inter_iteration_dep]) > 0 - if cond_1 or cond_2 or cond_3: + cond_4 = root_loop.start_position() in dep.metadata_inter_iteration_dep + # if cond_1 or cond_2 or cond_3: + if cond_2 or cond_4: return True # if it is an intra iteration dependency, it is problematic if it belongs to a parent loop else: diff --git a/discopop_explorer/pattern_detectors/reduction_detector.py b/discopop_explorer/pattern_detectors/reduction_detector.py index 21d8960b1..88ef8620e 100644 --- a/discopop_explorer/pattern_detectors/reduction_detector.py +++ b/discopop_explorer/pattern_detectors/reduction_detector.py @@ -284,7 +284,9 @@ def __check_loop_dependencies( ) cond_2 = len([cf for cf in called_functions_lineids if cf in dep.metadata_inter_call_dep]) > 0 cond_3 = len([t for t in parent_loops if t in dep.metadata_inter_iteration_dep]) > 0 - if cond_1 or cond_2 or cond_3: + cond_4 = root_loop.start_position() in dep.metadata_inter_iteration_dep + # if cond_1 or cond_2 or cond_3: + if cond_2 or cond_4: return True elif dep.dtype == DepType.WAR: # check WAR dependencies