diff --git a/dagrt/language.py b/dagrt/language.py index 9e5fb1685b936f6a7479315f5c9e4c15848b31a1..708b8d9e8a2eb6ee21e42c5ae5f6328d713c146c 100644 --- a/dagrt/language.py +++ b/dagrt/language.py @@ -819,7 +819,7 @@ class CodeBuilder(object): as the root dependencies, the phase can be executed by following the dependency list of each statement. - .. automethod:: fence + .. automethod:: reset_dep_tracking .. automethod:: if_ .. automethod:: else_ .. automethod:: __call__ @@ -876,7 +876,7 @@ class CodeBuilder(object): self._all_var_names = set() self._all_generated_var_names = set() - def fence(self): + def reset_dep_tracking(self): """ Enter a new logical block of statements. Force all prior statements to execute before subsequent ones. @@ -1171,19 +1171,19 @@ class CodeBuilder(object): time_id=time_id)) def fail_step(self): - self.fence() + self.reset_dep_tracking() self._add_inst_to_context(FailStep()) def restart_step(self): - self.fence() + self.reset_dep_tracking() self._add_inst_to_context(RestartStep()) def raise_(self, error_condition, error_message=None): - self.fence() + self.reset_dep_tracking() self._add_inst_to_context(Raise(error_condition, error_message)) def switch_phase(self, next_phase): - self.fence() + self.reset_dep_tracking() self._add_inst_to_context(SwitchPhase(next_phase)) def __enter__(self): @@ -1191,7 +1191,7 @@ class CodeBuilder(object): return self def __exit__(self, *ignored): - self.fence() + self.reset_dep_tracking() self.phase_dependencies = list(self._contexts[-1].lead_statement_ids) self.statements = set(self._statement_map.values()) diff --git a/dagrt/version.py b/dagrt/version.py index 78a7f0b5f35e6402a55367e5a38d626b9aa881fd..b8345dcde7d523978a5e5aa3767bf2a76c09ccde 100644 --- a/dagrt/version.py +++ b/dagrt/version.py @@ -1,2 +1,2 @@ -VERSION = (2019, 1) +VERSION = (2019, 2) VERSION_TEXT = ".".join(str(i) for i in VERSION) diff --git a/examples/adaptive_rk.py b/examples/adaptive_rk.py index 18f8a4cb9ca478e85ec2ed8d9bdebf071f0253ea..c2b093dca5fa4799bc7939f9c5b1045a4f33af7a 100644 --- a/examples/adaptive_rk.py +++ b/examples/adaptive_rk.py @@ -68,7 +68,7 @@ def adaptive_rk_method(tol): # Adaptation cb(dt_old, dt) - cb.fence() + cb.reset_dep_tracking() cb(dt, dt * dt_scaling(tol, y_h - y_e)) # Accept or reject step diff --git a/test/test_code_builder.py b/test/test_code_builder.py index 1ef7a66ad4046ba04eb1284d2261b073b6f6b4da..0641a80606e80bd13b098c66d35a4b19dd123669 100755 --- a/test/test_code_builder.py +++ b/test/test_code_builder.py @@ -147,7 +147,7 @@ def test_CodeBuilder_restart_step(python_method_impl): with CodeBuilder() as builder1: builder1("
x", 1) builder1.restart_step() - builder1.fence() + builder1.reset_dep_tracking() builder1("
x", 2)
with CodeBuilder() as builder2:
diff --git a/test/test_codegen_fortran.py b/test/test_codegen_fortran.py
index 3e690c05ebcc746f2b6c5aa181a5c004c2288bfd..df4cf8289e1659a255594f8b4c164304d1dc68b3 100755
--- a/test/test_codegen_fortran.py
+++ b/test/test_codegen_fortran.py
@@ -76,20 +76,20 @@ def test_arrays_and_linalg():
cb("nodes", "`