Skip to content
Snippets Groups Projects
Commit 28f112e9 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Print the correct counts for the number of DM particles to screen on start-up.

parent 4bc3c1cc
No related branches found
No related tags found
3 merge requests!1407Move x-ray lightcone maps into extra_io/EAGLE,!1405xray functions for lightcone,!1399Print the correct counts for the number of DM particles to screen on start-up.
...@@ -1215,26 +1215,27 @@ int main(int argc, char *argv[]) { ...@@ -1215,26 +1215,27 @@ int main(int argc, char *argv[]) {
#if defined(WITH_MPI) #if defined(WITH_MPI)
long long N_long[swift_type_count + 1] = {0}; long long N_long[swift_type_count + 1] = {0};
N_long[swift_type_gas] = Ngas; N_long[swift_type_gas] = Ngas;
N_long[swift_type_dark_matter] =
with_gravity ? Ngpart - Ngpart_background - Nbaryons : 0;
N_long[swift_type_dark_matter_background] = Ngpart_background; N_long[swift_type_dark_matter_background] = Ngpart_background;
N_long[swift_type_sink] = Nsink; N_long[swift_type_sink] = Nsink;
N_long[swift_type_stars] = Nspart; N_long[swift_type_stars] = Nspart;
N_long[swift_type_black_hole] = Nbpart; N_long[swift_type_black_hole] = Nbpart;
N_long[swift_type_neutrino] = Nnupart; N_long[swift_type_neutrino] = Nnupart;
N_long[swift_type_count] = Ngpart; N_long[swift_type_count] = Ngpart;
N_long[swift_type_dark_matter] =
with_gravity ? Ngpart - Ngpart_background - Nbaryons - Nnupart : 0;
MPI_Allreduce(&N_long, &N_total, swift_type_count + 1, MPI_LONG_LONG_INT, MPI_Allreduce(&N_long, &N_total, swift_type_count + 1, MPI_LONG_LONG_INT,
MPI_SUM, MPI_COMM_WORLD); MPI_SUM, MPI_COMM_WORLD);
#else #else
N_total[swift_type_gas] = Ngas; N_total[swift_type_gas] = Ngas;
N_total[swift_type_dark_matter] =
with_gravity ? Ngpart - Ngpart_background - Nbaryons : 0;
N_total[swift_type_dark_matter_background] = Ngpart_background; N_total[swift_type_dark_matter_background] = Ngpart_background;
N_total[swift_type_sink] = Nsink; N_total[swift_type_sink] = Nsink;
N_total[swift_type_stars] = Nspart; N_total[swift_type_stars] = Nspart;
N_total[swift_type_black_hole] = Nbpart; N_total[swift_type_black_hole] = Nbpart;
N_total[swift_type_neutrino] = Nnupart; N_total[swift_type_neutrino] = Nnupart;
N_total[swift_type_count] = Ngpart; N_total[swift_type_count] = Ngpart;
N_total[swift_type_dark_matter] =
with_gravity ? Ngpart - Ngpart_background - Nbaryons - Nnupart : 0;
#endif #endif
if (myrank == 0) if (myrank == 0)
...@@ -1431,8 +1432,7 @@ int main(int argc, char *argv[]) { ...@@ -1431,8 +1432,7 @@ int main(int argc, char *argv[]) {
/* Get some info to the user. */ /* Get some info to the user. */
if (myrank == 0) { if (myrank == 0) {
const long long N_DM = N_total[swift_type_dark_matter] + const long long N_DM = N_total[swift_type_dark_matter] +
N_total[swift_type_dark_matter_background] + N_total[swift_type_dark_matter_background];
N_total[swift_type_neutrino];
message( message(
"Running on %lld gas particles, %lld sink particles, %lld stars " "Running on %lld gas particles, %lld sink particles, %lld stars "
"particles %lld black hole particles, %lld neutrino particles, and " "particles %lld black hole particles, %lld neutrino particles, and "
......
...@@ -652,8 +652,8 @@ int main(int argc, char *argv[]) { ...@@ -652,8 +652,8 @@ int main(int argc, char *argv[]) {
/* Get some info to the user. */ /* Get some info to the user. */
if (myrank == 0) { if (myrank == 0) {
const long long N_DM = N_total[swift_type_dark_matter] + const long long N_DM = N_total[swift_type_dark_matter] +
N_total[swift_type_dark_matter_background] + N_total[swift_type_dark_matter_background];
N_total[swift_type_neutrino];
message( message(
"Running FOF on %lld gas particles, %lld sink particles, %lld stars " "Running FOF on %lld gas particles, %lld sink particles, %lld stars "
"particles %lld black hole particles, %lld neutrino particles, and " "particles %lld black hole particles, %lld neutrino particles, and "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment