Skip to content

Commit 1c310ec

Browse files
committed
dsl: Fix missing halospot issue with petsc data dependencies
1 parent 27dea66 commit 1c310ec

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

devito/petsc/solve.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,16 @@ def linear_solve_args(self):
137137
exprs = exprs + (stagger_bc,)
138138

139139
funcs = get_funcs(exprs)
140-
# TODO: Double check but this is for data dependencies otherwise the
141-
# wrong halospots are generated
142-
funcs = tuple(f for f in funcs if f != target)
143-
# from IPython import embed; embed()
140+
# TODO: Add MPI tests for this but if not filtered, the wrong halospots
141+
# are generated or some halospots are missing...(for implicit)
142+
funcs = tuple(
143+
f for f in funcs
144+
if not (
145+
f.function is target.function and
146+
any(dim.is_Time and i == j
147+
for dim, i, j in zip(f.dimensions, f.indices, target.indices))
148+
)
149+
)
144150
self.time_mapper = generate_time_mapper(exprs)
145151
arrays = self.generate_arrays(target)
146152

0 commit comments

Comments
 (0)