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
......@@ -1524,7 +1524,7 @@ void write_output_parallel(struct engine* e,
for (int ptype = 0; ptype < swift_type_count; ptype++) {
/* 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 */
char partTypeGroupName[PARTICLE_GROUP_BUFFER_SIZE];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment