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

Do not write particles that have no fields in parallel_io.c

parent 70e2c982
No related branches found
No related tags found
No related merge requests found
...@@ -1524,7 +1524,7 @@ void write_output_parallel(struct engine* e, ...@@ -1524,7 +1524,7 @@ void write_output_parallel(struct engine* e,
for (int ptype = 0; ptype < swift_type_count; ptype++) { for (int ptype = 0; ptype < swift_type_count; ptype++) {
/* Don't do anything if no particle of this kind */ /* Don't do anything if no particle of this kind */
if (N_total[ptype] == 0) continue; if (N_total[ptype] == 0 || numFields[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