From 3a085e82cfc8a27d47d9630058dfe9bb8f2b2fa2 Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Fri, 14 Aug 2020 17:37:16 +0100 Subject: [PATCH] Start time at beginning to tidy up log output --- swiftmpirdmastepsim3.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/swiftmpirdmastepsim3.c b/swiftmpirdmastepsim3.c index 6e92e8e..207be92 100644 --- a/swiftmpirdmastepsim3.c +++ b/swiftmpirdmastepsim3.c @@ -469,6 +469,10 @@ static void usage(char *argv[]) { */ int main(int argc, char *argv[]) { + /* Start time for logging. This will be reset to restart time. */ + clocks_set_cpufreq(0); + cpufreq = clocks_get_cpufreq(); + /* Initiate MPI. */ int prov = 0; int res = MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &prov); @@ -553,11 +557,7 @@ int main(int argc, char *argv[]) { } } - /* Time to start time. Try to make it synchronous across the ranks. - * Note we reset this once more when the startup costs have been - * done. */ - clocks_set_cpufreq(0); - cpufreq = clocks_get_cpufreq(); + /* Make synchronous across the ranks. */ MPI_Barrier(MPI_COMM_WORLD); clocks_set_cpufreq(cpufreq); if (myrank == 0) { -- GitLab