diff --git a/examples/implicit_euler/implicit_euler.py b/examples/implicit_euler/implicit_euler.py index d99e01bd1891f308d98f037bc2253f789420f6dc..b2f2d5e7eefa64970aaef9b17384a7c9493c0de7 100644 --- a/examples/implicit_euler/implicit_euler.py +++ b/examples/implicit_euler/implicit_euler.py @@ -80,5 +80,5 @@ class ImplicitEulerMethod(Method): builder.yield_state(self.state, self.component_id, self.t + self.dt, 'final') - builder.fence() + builder.reset_dep_tracking() builder.assign(self.t, self.t + self.dt) diff --git a/leap/__init__.py b/leap/__init__.py index cc434697fc946ee9674f1e2cdfbbb0322400622e..ec749a570bfd18347c55c33f50bfda7f71a143c4 100644 --- a/leap/__init__.py +++ b/leap/__init__.py @@ -141,13 +141,13 @@ class TwoOrderAdaptiveMethod(Method): cb.raise_(TimeStepUnderflow) with cb.else_(): cb.fail_step() - cb.fence() + cb.reset_dep_tracking() with cb.else_(): # This updates :
should not be set before this is called. self.finish_nonadaptive(cb, high_order_estimate, low_order_estimate) - cb.fence() + cb.reset_dep_tracking() cb(self.dt, Min((0.9 * self.dt * rel_error ** (-1 / self.high_order), self.max_dt_growth * self.dt))) diff --git a/leap/multistep/__init__.py b/leap/multistep/__init__.py index 2187c460a5cd2b011dcbaff3075700170276ac69..ff1fe06e327e9b65a356e54333d02f83a1ce55fe 100644 --- a/leap/multistep/__init__.py +++ b/leap/multistep/__init__.py @@ -135,7 +135,7 @@ def _emit_func_family_operation(cb, name_gen, for j in range(len(function_family)*len(function_family)): cb(sig_array[j], 0) - cb.fence() + cb.reset_dep_tracking() for i in range(len(function_family)): cb(sig_array[i*(nfunctions+1)], sigma[i]**-1) @@ -297,7 +297,7 @@ class AdamsBashforthMethod(Method): t_end = 1 cb_primary(rhs_var, self.eval_rhs(self.t, self.state)) - cb_primary.fence() + cb_primary.reset_dep_tracking() history = self.history + [rhs_var] ab_sum = emit_ab_integration( @@ -313,13 +313,13 @@ class AdamsBashforthMethod(Method): # Rotate history and time history. for i in range(self.hist_length - 1): - cb_primary.fence() + cb_primary.reset_dep_tracking() cb_primary(self.history[i], history[i + 1]) if not self.static_dt: cb_primary(self.time_history[i], time_history_data[i + 1]) - cb_primary.fence() + cb_primary.reset_dep_tracking() cb_primary(self.t, self.t + self.dt) cb_primary.yield_state(expression=self.state, component_id=self.component_id, @@ -400,7 +400,7 @@ class AdamsBashforthMethod(Method): # Merge the values of the RHSs. rk_comb = sum(coeff * rhss[j] for j, coeff in enumerate(rk_coeffs)) - cb.fence() + cb.reset_dep_tracking() state_est = self.state + self.dt * rk_comb if self.state_filter is not None: diff --git a/leap/multistep/multirate/__init__.py b/leap/multistep/multirate/__init__.py index 79f5593b8c0ea4f2b97924b5bafba07f7094af9f..6792ecc9ffba07b42c14b85b86403b476e532d2e 100644 --- a/leap/multistep/multirate/__init__.py +++ b/leap/multistep/multirate/__init__.py @@ -539,7 +539,7 @@ class MultiRateMultiStepMethod(Method): # }}} - cb.fence() + cb.reset_dep_tracking() component_state_ests = {} @@ -576,7 +576,7 @@ class MultiRateMultiStepMethod(Method): component_state_ests[comp_name] = state_var - cb.fence() + cb.reset_dep_tracking() for component_name in self.component_names: state = component_state_ests[component_name] @@ -588,7 +588,7 @@ class MultiRateMultiStepMethod(Method): cb(var(""+component_name), state) - cb.fence() + cb.reset_dep_tracking() cb(self.t, self.t + self.dt/self.nsubsteps) @@ -712,18 +712,18 @@ class MultiRateMultiStepMethod(Method): # }}} - cb.fence() + cb.reset_dep_tracking() if isubstep == 0: with cb.if_(self.bootstrap_step, "==", bootstrap_steps): cb.switch_phase("primary") cb.restart_step() - cb.fence() + cb.reset_dep_tracking() self.emit_small_rk_step(cb, name_prefix, name_gen, current_rhss) - cb.fence() + cb.reset_dep_tracking() cb(self.bootstrap_step, self.bootstrap_step + 1) return cb @@ -1081,7 +1081,7 @@ class MultiRateMultiStepMethod(Method): # }}} - cb.fence() + cb.reset_dep_tracking() log_hist_state() @@ -1089,7 +1089,7 @@ class MultiRateMultiStepMethod(Method): get_state(component_name, self.nsubsteps) for component_name in self.component_names] - cb.fence() + cb.reset_dep_tracking() # {{{ commit temp history to permanent history @@ -1104,13 +1104,13 @@ class MultiRateMultiStepMethod(Method): temp_time_vars[comp_name, irhs][-rhs.history_length:]): cb(time_var, time_expr) - cb.fence() + cb.reset_dep_tracking() for hist_var, hist_expr in zip( self.history_vars[key], temp_hist_vars[comp_name, irhs][-rhs.history_length:]): cb(hist_var, hist_expr) - cb.fence() + cb.reset_dep_tracking() commit_temp_hist_vars() @@ -1125,7 +1125,7 @@ class MultiRateMultiStepMethod(Method): cb(var(""+component_name), state) - cb.fence() + cb.reset_dep_tracking() cb(self.t, self.t + self.dt) diff --git a/leap/rk/__init__.py b/leap/rk/__init__.py index e019ca090b2c54962e4c0d5141aa52f2b7001dc2..c64264bc56ced5b8d56e20d24c9bcb73b3ca4e49 100644 --- a/leap/rk/__init__.py +++ b/leap/rk/__init__.py @@ -320,7 +320,7 @@ class ButcherTableauMethod(Method): estimate_vars[iest], state_est) - cb.fence() + cb.reset_dep_tracking() # This updates . self.finish(cb, estimate_coeff_set_names, estimate_vars) @@ -334,7 +334,7 @@ class ButcherTableauMethod(Method): self.c, stage_coeff_sets[name])): cb(last_rhss[name], stage_rhs_vars[name][-1]) - cb.fence() + cb.reset_dep_tracking() cb_primary = cb @@ -350,7 +350,7 @@ class ButcherTableauMethod(Method): def finish(self, cb, estimate_names, estimate_vars): cb(self.state, estimate_vars[0]) cb.yield_state(self.state, self.component_id, self.t + self.dt, 'final') - cb.fence() + cb.reset_dep_tracking() cb(self.t, self.t + self.dt) # }}} @@ -587,7 +587,7 @@ class EmbeddedButcherTableauMethod(ButcherTableauMethod, TwoOrderAdaptiveMethod) cb(self.state, est) cb.yield_state(self.state, self.component_id, self.t + self.dt, 'final') - cb.fence() + cb.reset_dep_tracking() cb(self.t, self.t + self.dt) # }}} @@ -751,7 +751,7 @@ class LSRK4Method(Method): with CodeBuilder("primary") as cb: for a, b, c in self.coeffs: - cb.fence() + cb.reset_dep_tracking() cb(rhs_val, rhs_func(t=t + c*dt, **{comp_id: state})) cb(residual, a*residual + dt*rhs_val) new_state_expr = state + b * residual @@ -759,11 +759,11 @@ class LSRK4Method(Method): if self.state_filter is not None: new_state_expr = self.state_filter(**{comp_id: new_state_expr}) - cb.fence() + cb.reset_dep_tracking() cb(state, new_state_expr) cb.yield_state(state, comp_id, t + dt, 'final') - cb.fence() + cb.reset_dep_tracking() cb(t, t + dt) cb_primary = cb diff --git a/leap/rk/imex.py b/leap/rk/imex.py index bc60a677ac1e6ca0792918ec5e157a8d2b50fda1..5df7e3de04500c3aebfb40739aaea718f2aacfcc 100644 --- a/leap/rk/imex.py +++ b/leap/rk/imex.py @@ -140,7 +140,7 @@ class KennedyCarpenterIMEXRungeKuttaMethodBase( cb(self.state, est) cb.yield_state(self.state, self.component_id, self.t + self.dt, 'final') - cb.fence() + cb.reset_dep_tracking() cb(self.t, self.t + self.dt) diff --git a/leap/version.py b/leap/version.py index 78a7f0b5f35e6402a55367e5a38d626b9aa881fd..b8345dcde7d523978a5e5aa3767bf2a76c09ccde 100644 --- a/leap/version.py +++ b/leap/version.py @@ -1,2 +1,2 @@ -VERSION = (2019, 1) +VERSION = (2019, 2) VERSION_TEXT = ".".join(str(i) for i in VERSION) diff --git a/setup.py b/setup.py index bff99cd164fd6c520aa07a3f3278958f8308eccd..db14a32034cfcb32509731491cd7cc5c5d856733 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def main(): "pytools>=2014.1", "pymbolic>=2014.1", "pytest>=2.3", - "dagrt>=2019.1", + "dagrt>=2019.2", "mako", "six", ],