diff --git a/src/common_io.c b/src/common_io.c index 1f28098f6cb28a207d7f516c886a29a89ef4b8f8..34207113d996b6a1dffb4ba535f67c243e9dff5b 100644 --- a/src/common_io.c +++ b/src/common_io.c @@ -888,7 +888,8 @@ void io_check_output_fields(const struct swift_params* params, if (retParam != 0 && retParam != 1) message("WARNING: Unexpected input for %s. " - "Received %i but expect 0 or 1", field_name, retParam); + "Received %i but expect 0 or 1. " + "We will write this field.", field_name, retParam); continue; } } @@ -933,7 +934,7 @@ void io_write_output_field_parameter(const char* filename) { if (num_fields == 0) continue; - fprintf(file, " # Particle Type %i\n", ptype); + fprintf(file, " # Particle Type %s\n", part_type_names[ptype]); /* Write everything */ for (int i = 0; i < num_fields; ++i) { fprintf(file, " %s_%s: 1\n", diff --git a/src/parallel_io.c b/src/parallel_io.c index 76278ac93ac2e374cee8182383f576c96f277798..a87c8e9fa1f8f30838996b098f57973e26aabc56 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -1268,7 +1268,7 @@ void write_output_parallel(struct engine* e, const char* baseName, char field[PARSER_MAX_LINE_SIZE]; sprintf(field, "SelectOutput:%s_%s", list[i].name, part_type_names[ptype]); int should_write = parser_get_opt_param_int(params, field, 1); - if (should_write) + if (should_write != 0) writeArray(e, h_grp, fileName, partTypeGroupName, list[i], Nparticles, N_total[ptype], mpi_rank, offset[ptype], internal_units, snapshot_units); diff --git a/src/serial_io.c b/src/serial_io.c index d9d7f2cb8b7d9f964de17bf58530a8d5f9f7be20..9c0a3c1fb4f58d88445d78643a90cfb62c63afc7 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -1012,7 +1012,7 @@ void write_output_serial(struct engine* e, const char* baseName, char field[PARSER_MAX_LINE_SIZE]; sprintf(field, "SelectOutput:%s_%s", list[i].name, part_type_names[ptype]); int should_write = parser_get_opt_param_int(params, field, 1); - if (should_write) + if (should_write != 0) writeArray(e, h_grp, fileName, xmfFile, partTypeGroupName, list[i], Nparticles, N_total[ptype], mpi_rank, offset[ptype], internal_units, snapshot_units); diff --git a/src/single_io.c b/src/single_io.c index 244a8c65fb9071072e918aa4b177dc48e08e6d76..3a89d7a02587173af184bd53c00edc3eb22f858c 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -831,7 +831,7 @@ void write_output_single(struct engine* e, const char* baseName, char field[PARSER_MAX_LINE_SIZE]; sprintf(field, "SelectOutput:%s_%s", list[i].name, part_type_names[ptype]); int should_write = parser_get_opt_param_int(params, field, 1); - if (should_write) + if (should_write != 0) writeArray(e, h_grp, fileName, xmfFile, partTypeGroupName, list[i], N, internal_units, snapshot_units); }