From 3957b4d6360b09541786c80ea357c305a17ac7da Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Mon, 24 Apr 2023 11:48:53 +0100 Subject: [PATCH] Formatting --- error.h | 1 + format.sh | 4 ++-- histogram.c | 4 ++-- mpiuse.c | 8 ++++---- swiftmpifakestepsim.c | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/error.h b/error.h index d5e3314..bda6a62 100644 --- a/error.h +++ b/error.h @@ -1,4 +1,5 @@ #include <mpi.h> + #include "clocks.h" extern int myrank; diff --git a/format.sh b/format.sh index 9134633..db5e7ab 100755 --- a/format.sh +++ b/format.sh @@ -1,8 +1,8 @@ #!/bin/bash # Clang format command, can be overridden using CLANG_FORMAT_CMD. -# We currrently use version 5.0 so any overrides should provide that. -clang=${CLANG_FORMAT_CMD:="clang-format-5.0"} +# We currrently use version 13.0 so any overrides should provide that. +clang=${CLANG_FORMAT_CMD:="clang-format-13.0"} # Formatting command cmd="$clang -style=file $(git ls-files | grep '\.[ch]$')" diff --git a/histogram.c b/histogram.c index 0995ac2..d9b1609 100644 --- a/histogram.c +++ b/histogram.c @@ -1,11 +1,11 @@ +#include "histogram.h" + #include <float.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "histogram.h" - /* * Simple histogram routines. int main(int argc, char *argv[]) { diff --git a/mpiuse.c b/mpiuse.c index 7e5b7d7..e25981d 100644 --- a/mpiuse.c +++ b/mpiuse.c @@ -400,10 +400,10 @@ void mpiuse_log_generate(int nr_nodes, int nr_logs, int size, int random, for (int i = 0; i < nr_nodes; i++) { for (int j = 0; j < nr_nodes; j++) { if (i != j) { - mpiuse_log_allocation(i, 1, k, SEND_TYPE, NO_SUBTYPE, 1, (size_t)logsize, j, - tag); - mpiuse_log_allocation(j, 1, k, RECV_TYPE, NO_SUBTYPE, 1, (size_t)logsize, i, - tag); + mpiuse_log_allocation(i, 1, k, SEND_TYPE, NO_SUBTYPE, 1, + (size_t)logsize, j, tag); + mpiuse_log_allocation(j, 1, k, RECV_TYPE, NO_SUBTYPE, 1, + (size_t)logsize, i, tag); } } } diff --git a/swiftmpifakestepsim.c b/swiftmpifakestepsim.c index 777531c..d14d853 100644 --- a/swiftmpifakestepsim.c +++ b/swiftmpifakestepsim.c @@ -305,7 +305,7 @@ static int cmp_logs(const void *p1, const void *p2) { * otherwise the order is randomized. * * @param random randomize injection order of sends or sends and recvs, - * otherwise use order of the original logs. Just sends + * otherwise use order of the original logs. Just sends * are randomized when 1, 2 randomizes both, 0 neither. */ static void pick_logs(int random) { @@ -523,7 +523,7 @@ int main(int argc, char *argv[]) { if (randomorder == 1) message("Message send order randomized"); if (randomorder == 2) message("Message send and recv order randomized"); } - + pick_logs(randomorder); /* Time to start time. Try to make it synchronous across the ranks. */ -- GitLab