diff --git a/swiftest/simulation_class.py b/swiftest/simulation_class.py index a4a2b12b8..0f8bea50c 100644 --- a/swiftest/simulation_class.py +++ b/swiftest/simulation_class.py @@ -412,15 +412,16 @@ def run(self,dask: bool = False, **kwargs): if len(kwargs) > 0: self.set_parameter(**kwargs) - # Write out the current parameter set before executing run - self.save(verbose=False) - if self.codename != "Swiftest": warnings.warn(f"Running an integration is not yet supported for {self.codename}",stacklevel=2) return + # Save initial conditions if not self.restart: self.clean() + + # Write out the current parameter set before executing run + self.write_param(verbose=False,**kwargs) print(f"Running a {self.codename} {self.integrator} run from tstart={self.param['TSTART']} {self.TU_name} to tstop={self.param['TSTOP']} {self.TU_name}") diff --git a/tests/test_swiftest.py b/tests/test_swiftest.py index 717142012..63f07829c 100755 --- a/tests/test_swiftest.py +++ b/tests/test_swiftest.py @@ -85,6 +85,7 @@ def test_integrators(self): # Add the modern planets and the Sun using the JPL Horizons Database. sim.add_solar_system_body(major_bodies) + sim.clean() # Add 10 user-defined test particles. ntp = 10 @@ -103,7 +104,6 @@ def test_integrators(self): integrators= ["whm","helio","rmvs","symba"] for i in integrators: try: - sim.clean() sim.run(integrator=i) except: self.fail(f"Failed with integrator {i}") @@ -213,4 +213,5 @@ def test_gr(self): if __name__ == '__main__': + os.environ["HDF5_USE_FILE_LOCKING"]="FALSE" unittest.main() \ No newline at end of file