Commit 55011843 authored by James Willis's avatar James Willis
Browse files

Made sft_output_count a static variable in velociraptor_interface.c.

parent 190e7b6f
......@@ -6329,7 +6329,6 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
e->snapshot_units = (struct unit_system *)malloc(sizeof(struct unit_system));
units_init_default(e->snapshot_units, params, "Snapshots", internal_units);
e->snapshot_output_count = 0;
e->stf_output_count = 0;
e->dt_min = parser_get_param_double(params, "TimeIntegration:dt_min");
e->dt_max = parser_get_param_double(params, "TimeIntegration:dt_max");
e->dt_max_RMS_displacement = FLT_MAX;
......
......@@ -235,7 +235,6 @@ struct engine {
double a_first_stf_output;
double time_first_stf_output;
double delta_time_stf;
int stf_output_count;
/* Output_List for the structure finding */
struct output_list *output_list_stf;
......
......@@ -189,6 +189,7 @@ void velociraptor_invoke(struct engine *e) {
const size_t nr_hydro_parts = s->nr_parts;
const int nr_cells = s->nr_cells;
int *cell_node_ids = NULL;
static int stf_output_count = 0;
/* Allow thread to run on any core for the duration of the call to
* VELOCIraptor so that
......@@ -223,7 +224,7 @@ void velociraptor_invoke(struct engine *e) {
e->stfBaseName, e->step);
} else if (e->stf_output_freq_format == io_stf_time) {
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
e->stfBaseName, e->stf_output_count);
e->stfBaseName, stf_output_count);
}
/* Allocate and populate an array of swift_vel_parts to be passed to
......@@ -282,7 +283,7 @@ void velociraptor_invoke(struct engine *e) {
free(cell_node_ids);
free(swift_parts);
e->stf_output_count++;
stf_output_count++;
message("VELOCIraptor took %.3f %s on rank %d.",
clocks_from_ticks(getticks() - tic), clocks_getunit(), engine_rank);
......
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