From 3d5a42df0f4567fa738c1d2d3884b5c38f55721c Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Thu, 17 Mar 2016 08:14:37 +0000 Subject: [PATCH] Better check for whether or not to create the HDF5 groups for a given particle type --- src/serial_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serial_io.c b/src/serial_io.c index 05555f14a2..e4b92e5d0d 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -702,7 +702,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, for (int ptype = 0; ptype < NUM_PARTICLE_TYPES; ptype++) { /* Don't do anything if no particle of this kind */ - if (numParticles[ptype] == 0) continue; + if (N_total[ptype] == 0) continue; /* Open the particle group in the file */ char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE]; @@ -736,7 +736,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, for (int ptype = 0; ptype < NUM_PARTICLE_TYPES; ptype++) { /* Don't do anything if no particle of this kind */ - if (N[ptype] == 0) continue; + if (N_total[ptype] == 0) continue; /* Open the particle group in the file */ char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE]; -- GitLab