From 62b5d8ae29f1b0fb4bb769df59e0dfaa36dfadb6 Mon Sep 17 00:00:00 2001 From: David Minton Date: Mon, 10 May 2021 12:24:25 -0400 Subject: [PATCH] Added random seeding in order to aid in troubleshooting. --- src/main/swiftest_symba.f90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/swiftest_symba.f90 b/src/main/swiftest_symba.f90 index ae4f631df..98fb404bc 100644 --- a/src/main/swiftest_symba.f90 +++ b/src/main/swiftest_symba.f90 @@ -40,6 +40,8 @@ program swiftest_symba character(len=*), parameter :: simtimefmt = '(" Time = ", es12.5, "; fraction done = ", f5.3, "; number of active pl, tp = ", i7, ", ", i7)' character(len=*), parameter :: walltimefmt = '(" Wall time (s): ", es12.5, "; Wall time/step in this interval (s): ", es12.5)' character(len=*), parameter :: endwallfmt = '("Wall time to complete run (s): ", es12.5)' + integer(I4B), allocatable :: seed(:) + integer(I4B) :: nseeds ! Executable code ! temporary until the conversion to the derived type argument list is complete @@ -70,7 +72,11 @@ program swiftest_symba ntp => symba_tpA%helio%swiftest%nbody) call util_version - call random_seed() + + call random_seed(size = nseeds) + allocate(seed(nseeds)) + seed(:) = [(i * 1, i = 1, nseeds)] + call random_seed(put = seed) call get_command_argument(1, inparfile, status = ierr) if (ierr /= 0) then