diff --git a/devito/passes/clusters/unevaluate.py b/devito/passes/clusters/unevaluate.py index 4d8eaff6b0..cec8e9e770 100644 --- a/devito/passes/clusters/unevaluate.py +++ b/devito/passes/clusters/unevaluate.py @@ -7,7 +7,7 @@ __all__ = ['unevaluate'] -@cluster_pass +@cluster_pass(mode='all') def unevaluate(cluster): exprs = [_unevaluate(e) for e in cluster.exprs] diff --git a/tests/test_pickle.py b/tests/test_pickle.py index dd3633c2ae..bf1b859a75 100644 --- a/tests/test_pickle.py +++ b/tests/test_pickle.py @@ -864,7 +864,8 @@ def test_full_model(self, pickle): assert np.isclose(np.linalg.norm(ricker.data), np.linalg.norm(new_ricker.data)) # FIXME: fails randomly when using data.flatten() AND numpy is using MKL - def test_usave_sampled(self, pickle): + @pytest.mark.parametrize('subs', [False, True]) + def test_usave_sampled(self, pickle, subs): grid = Grid(shape=(10, 10, 10)) u = TimeFunction(name="u", grid=grid, time_order=2, space_order=8) @@ -884,7 +885,9 @@ def test_usave_sampled(self, pickle): eqn = [stencil] + src_term eqn += [Eq(u0_save, u)] - op_fwd = Operator(eqn) + + subs = grid.spacing_map if subs else {} + op_fwd = Operator(eqn, subs=subs) tmp_pickle_op_fn = "tmp_operator.pickle" pickle.dump(op_fwd, open(tmp_pickle_op_fn, "wb"))