diff --git a/devito/ir/iet/nodes.py b/devito/ir/iet/nodes.py index 9def607678..378d0be721 100644 --- a/devito/ir/iet/nodes.py +++ b/devito/ir/iet/nodes.py @@ -1460,7 +1460,6 @@ def __repr__(self): fstrings = [] for f in self.functions: loc_indices = set().union(*[self.halo_scheme.fmapper[f].loc_indices.values()]) - loc_indices = list(loc_indices) loc_indices_str = str(list(loc_indices)) if loc_indices else "" fstrings.append(f"{f.name}{loc_indices_str}") diff --git a/devito/passes/iet/mpi.py b/devito/passes/iet/mpi.py index ccc3dc729f..2aff3fd5c9 100644 --- a/devito/passes/iet/mpi.py +++ b/devito/passes/iet/mpi.py @@ -137,10 +137,15 @@ def _process_halo_to_halo(hs0, hs1, iters, scopes, hsmapper, imapper): # the loc_indices with known values # TODO: Can I get this in a more elegant way? for d in hse.loc_indices: - root_min = hse.loc_indices[d].symbolic_min - new_min = root_min.subs(hse.loc_indices[d].root, - hse.loc_indices[d].root.symbolic_min) - raw_loc_indices[d] = new_min + if hse.loc_indices[d].is_Symbol: + assert d in hse.loc_indices[d]._defines + root_min = hse.loc_indices[d].symbolic_min + new_min = root_min.subs(hse.loc_indices[d].root, + hse.loc_indices[d].root.symbolic_min) + raw_loc_indices[d] = new_min + else: + assert d.symbolic_min in hse.loc_indices[d].free_symbols + raw_loc_indices[d] = hse.loc_indices[d] hse = hse.rebuild(loc_indices=frozendict(raw_loc_indices)) hs1.halo_scheme.fmapper[f] = hse diff --git a/examples/mpi/overview.ipynb b/examples/mpi/overview.ipynb index bf48338218..c76dd81cc8 100644 --- a/examples/mpi/overview.ipynb +++ b/examples/mpi/overview.ipynb @@ -248,17 +248,7 @@ "output_type": "stream", "text": [ "[stderr:0] \n", - "Operator `Kernel` ran in 0.01 s\n", - "INFO:Devito:Operator `Kernel` ran in 0.01 s\n", - "[stderr:1] \n", - "Operator `Kernel` ran in 0.01 s\n", - "INFO:Devito:Operator `Kernel` ran in 0.01 s\n", - "[stderr:2] \n", - "Operator `Kernel` ran in 0.01 s\n", - "INFO:Devito:Operator `Kernel` ran in 0.01 s\n", - "[stderr:3] \n", - "Operator `Kernel` ran in 0.01 s\n", - "INFO:Devito:Operator `Kernel` ran in 0.01 s\n" + "Operator `Kernel` ran in 0.01 s\n" ] } ], diff --git a/examples/seismic/abc_methods/03_pml.ipynb b/examples/seismic/abc_methods/03_pml.ipynb index d3ca9929b1..b0ab62839c 100644 --- a/examples/seismic/abc_methods/03_pml.ipynb +++ b/examples/seismic/abc_methods/03_pml.ipynb @@ -179,10 +179,8 @@ "# NBVAL_IGNORE_OUTPUT\n", "\n", "%matplotlib inline\n", - "from examples.seismic import TimeAxis\n", - "from examples.seismic import RickerSource\n", - "from examples.seismic import Receiver\n", - "from devito import SubDomain, Grid, NODE, TimeFunction, Function, Eq, solve, Operator" + "from devito import SubDomain, Grid, NODE, TimeFunction, Function, Eq, solve, Operator\n", + "from examples.seismic import TimeAxis, RickerSource, Receiver" ] }, { @@ -205,7 +203,7 @@ "compx = x1-x0\n", "z0 = 0.\n", "z1 = 1000.\n", - "compz = z1-z0;\n", + "compz = z1-z0\n", "hxv = (x1-x0)/(nptx-1)\n", "hzv = (z1-z0)/(nptz-1)" ]