From ed3f2c46a1fba9702fceaba54220cbcf5b8f06a3 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 16 Mar 2016 16:07:38 +0000
Subject: [PATCH] Print correct number of particles

---
 examples/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/main.c b/examples/main.c
index dd112d28c6..b113621c7a 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -380,6 +380,7 @@ 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]);
-- 
GitLab