From d8913ceceab06e0d26ec6a62408aa29b1fd38113 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Fri, 16 Feb 2024 20:48:28 +0000 Subject: [PATCH] mpi: update halo-setup after rebase --- devito/types/dense.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devito/types/dense.py b/devito/types/dense.py index 8e5e9177b9..848cf37849 100644 --- a/devito/types/dense.py +++ b/devito/types/dense.py @@ -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]