Skip to content

Commit 9159701

Browse files
committed
compiler: Polish abstract_component_accesses
1 parent 8863b2d commit 9159701

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

devito/passes/iet/engine.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,12 @@ def abstract_component_accesses(efuncs):
341341
if not isinstance(efunc, (HaloUpdate, HaloWait)):
342342
continue
343343

344-
calls = FindNodes((Gather, Scatter)).visit(efunc)
345-
if len(calls) != 1:
346-
continue
347-
call_copy_buffer, = calls
348-
copy_buffer = efuncs[call_copy_buffer.name]
349-
350344
# Retrieve expected objects. If this fails, it means it's a structure
351345
# we don't recognize (e.g., an unsupported MPI scheme?), so we just
352346
# give up and move on
353347
try:
348+
call_copy_buffer, = FindNodes((Gather, Scatter)).visit(efunc)
349+
copy_buffer = efuncs[call_copy_buffer.name]
354350
f, = [i for i in copy_buffer.parameters if i.is_Bundle]
355351
msg, = [i for i in efunc.parameters if isinstance(i, MPIMsg)]
356352
dim, = FindSymbols('dimensions').visit(efunc)

0 commit comments

Comments
 (0)