From 5136422e13e779ffe33bd4d0e108251716dd9713 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 25 Apr 2023 23:11:00 -0400 Subject: [PATCH] Moved balance to just after dump step so we can control how often a balance gets done --- src/swiftest/swiftest_driver.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/swiftest/swiftest_driver.f90 b/src/swiftest/swiftest_driver.f90 index e15bbc383..931f40777 100644 --- a/src/swiftest/swiftest_driver.f90 +++ b/src/swiftest/swiftest_driver.f90 @@ -150,6 +150,9 @@ program swiftest_driver if (idump == dump_cadence) then idump = 0 call nbody_system%dump(param, system_history) +#ifdef COARRAY + if (param%lcoarray) call nbody_system%coarray_balance(param) +#endif end if #ifdef COARRAY if (this_image() == 1 .or. param%log_output) then @@ -166,7 +169,6 @@ program swiftest_driver if (param%lenergy) call nbody_system%conservation_report(param, lterminal=.true.) #ifdef COARRAY end if ! (this_image() == 1) - if (param%lcoarray) call nbody_system%coarray_balance(param) #endif end if end if