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

Set a default non-empty run name.

parent 152a3422
Branches
Tags
1 merge request!817Added a run label to the parameter file that gets written to the snapshot headers.
......@@ -4974,7 +4974,11 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
/* Read the run label */
memset(e->run_name, 0, PARSER_MAX_LINE_SIZE);
parser_get_opt_param_string(params, "MetaData:run_name", e->run_name, "");
parser_get_opt_param_string(params, "MetaData:run_name", e->run_name,
"Untitled SWIFT simulation");
if (strlen(e->run_name) == 0) {
error("The run name in the parameter file cannot be an empty string.")
}
if (e->nodeID == 0) message("Running simulation '%s'.", e->run_name);
/* Setup the timestep if non-cosmological */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment