From 2110029a9fb4f868f77aad73cdcfd3bf3cb32f19 Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Mon, 31 Aug 2026 10:52:14 +0000 Subject: [PATCH] compiler: Patch halo exchange placement at stree construction time --- devito/ir/stree/algorithms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devito/ir/stree/algorithms.py b/devito/ir/stree/algorithms.py index fb313f7640..5c09e30891 100644 --- a/devito/ir/stree/algorithms.py +++ b/devito/ir/stree/algorithms.py @@ -275,7 +275,9 @@ def augment_whole_subtree(cluster, tip, mapper, it): def needs_nodehalo(d, hs): - return d and hs and d._defines.intersection(hs.distributed_aindices) + if not d or not hs: + return False + return any(d._defines & i._defines for i in hs.distributed_aindices) def reuse_section(candidate, section):