From 792aa129556209b9ae12cdedd89ad75636e098b3 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 19 Aug 2021 10:20:41 -0400 Subject: [PATCH] Prevent duplicate frames from being written in a restart --- src/main/swiftest_driver.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/swiftest_driver.f90 b/src/main/swiftest_driver.f90 index a97ba46b0..0dc7641d1 100644 --- a/src/main/swiftest_driver.f90 +++ b/src/main/swiftest_driver.f90 @@ -50,8 +50,8 @@ program swiftest_driver iout = istep_out idump = istep_dump nloops = ceiling(tstop / dt, kind=I8B) - if (istep_out > 0) call nbody_system%write_frame(iu, param) - call nbody_system%dump(param) + if (istep_out > 0 .and. (.not.param%lrestart)) call nbody_system%write_frame(iu, param) + if (.not.param%lrestart) call nbody_system%dump(param) !> Define the maximum number of threads nthreads = 1 ! In the *serial* case