From edb566cf649c12905940fe2943f8f662676c6cd7 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Fri, 11 Mar 2016 17:29:23 +0000
Subject: [PATCH] Nicer output to stdout

---
 examples/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/examples/main.c b/examples/main.c
index e073593ba0..c88f92a07a 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -376,14 +376,15 @@ int main(int argc, char *argv[]) {
 #if defined(WITH_MPI)
   long long N_long[2] = {Ngas, Ngpart};
   MPI_Reduce(&N_long, &N_total, 2, MPI_LONG_LONG, MPI_SUM, 0, MPI_COMM_WORLD);
-  N_total[1] -= N_total[0];
+  if (myrank == 0)
+    message("Read %lld gas particles and %lld DM particles from the ICs",
+            N_total[0], N_total[1]);
 #else
   N_total[0] = Ngas;
   N_total[1] = Ngpart - Ngas;
+  message("Read %lld gas particles and %lld DM particles from the ICs",
+	  N_total[0], N_total[1]);
 #endif
-  if (myrank == 0)
-    message("Read %lld gas particles and %lld DM particles from the ICs",
-            N_total[0], N_total[1]);
 
   /* Apply h scaling */
   if (scaling != 1.0)
-- 
GitLab