Skip to content
Snippets Groups Projects
Commit bf761e0a authored by Pascal Jahan Elahi's avatar Pascal Jahan Elahi
Browse files

update to velociraptor interface for snapshot numbering and temporal halo ids

parent b90ad760
No related branches found
No related tags found
1 merge request!717Updates to the Velociraptor interface for Pascal's runs
......@@ -45,6 +45,7 @@ int InitVelociraptor(char *config_name, char *output_name,
}
int InvokeVelociraptor(const size_t num_gravity_parts,
const size_t num_hydro_parts,
const int snapnum,
struct swift_vel_part *swift_parts,
const int *cell_node_ids, char *output_name) {
......
......@@ -114,6 +114,7 @@ int InitVelociraptor(char *config_name, char *output_name,
struct siminfo sim_info);
int InvokeVelociraptor(const size_t num_gravity_parts,
const size_t num_hydro_parts,
const int snapnum,
struct swift_vel_part *swift_parts,
const int *cell_node_ids, char *output_name);
......@@ -264,6 +265,7 @@ void velociraptor_invoke(struct engine *e) {
const int nr_cells = s->nr_cells;
int *cell_node_ids = NULL;
static int stf_output_count = 0;
int active_stf_output_count;
/* Allow thread to run on any core for the duration of the call to
* VELOCIraptor so that
......@@ -293,13 +295,12 @@ void velociraptor_invoke(struct engine *e) {
/* Append base name with either the step number or time depending on what
* format is specified in the parameter file. */
char outputFileName[PARSER_MAX_LINE_SIZE + 128];
if (e->stf_output_freq_format == io_stf_steps) {
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
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, stf_output_count);
}
if (e->stf_output_freq_format == io_stf_steps) active_stf_output_count = e->step;
else if (e->stf_output_freq_format == io_stf_time) active_stf_output_count = stf_output_count;
else active_stf_output_count = 0;
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
e->stfBaseName, active_stf_output_count);
/* Allocate and populate an array of swift_vel_parts to be passed to
* VELOCIraptor. */
......@@ -347,7 +348,7 @@ void velociraptor_invoke(struct engine *e) {
}
/* Call VELOCIraptor. */
if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, swift_parts, cell_node_ids,
if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, active_stf_output_count, swift_parts, cell_node_ids,
outputFileName))
error("Exiting. Call to VELOCIraptor failed on rank: %d.", e->nodeID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment