diff --git a/examples/main.c b/examples/main.c index e073593ba0a1925cd6d85203d2b87ae0cab7762b..c88f92a07a747c327692b5e0fbbc7dc07b93ac0c 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)