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

Better check for whether or not to create the HDF5 groups for a given particle type

parent 93b372e5
No related branches found
No related tags found
2 merge requests!136Master,!121Gpart mpi io
...@@ -702,7 +702,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, ...@@ -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++) { for (int ptype = 0; ptype < NUM_PARTICLE_TYPES; ptype++) {
/* Don't do anything if no particle of this kind */ /* 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 */ /* Open the particle group in the file */
char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE]; char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE];
...@@ -736,7 +736,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, ...@@ -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++) { for (int ptype = 0; ptype < NUM_PARTICLE_TYPES; ptype++) {
/* Don't do anything if no particle of this kind */ /* 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 */ /* Open the particle group in the file */
char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE]; char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment