Skip to content

Commit

Permalink
mpi: update halo-setup after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Feb 16, 2024
1 parent be34f3b commit d8913ce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions devito/types/dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,12 +1111,17 @@ def __halo_setup__(self, **kwargs):
else:
space_order = kwargs.get('space_order', 1)
if isinstance(space_order, int):
# v = (space_order, space_order)
# halo = [v if i.is_Space else (0, 0) for i in self.dimensions]
# import pdb;pdb.set_trace()
if configuration['safe-halo'] == 'HALF':
halo = (int(space_order/2), int(space_order/2))
v = (int(space_order/2), int(space_order/2))
elif configuration['safe-halo'] == 'CUSTOM':
halo = (int(space_order/2) + 1, int(space_order/2) + 1)
v = (int(space_order/2) + 1, int(space_order/2) + 1)
else:
halo = (space_order, space_order)
v = (space_order, space_order)

halo = [v if i.is_Space else (0, 0) for i in self.dimensions]
elif isinstance(space_order, tuple) and len(space_order) == 3:
_, l, r = space_order
halo = [(l, r) if i.is_Space else (0, 0) for i in self.dimensions]
Expand Down

0 comments on commit d8913ce

Please sign in to comment.