From 8c7c92414114413032f7b10bb9c1f9d226d0f1a6 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Mon, 22 Oct 2018 14:23:32 +0200 Subject: [PATCH] Read the resubmission command from the YAML file. --- examples/main.c | 3 ++- examples/parameter_example.yml | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/main.c b/examples/main.c index 0ceba6ce75..8e9ee1e05c 100644 --- a/examples/main.c +++ b/examples/main.c @@ -607,7 +607,8 @@ int main(int argc, char *argv[]) { /* What command should we run to resubmit at the end? */ char resubmit_command[PARSER_MAX_LINE_SIZE]; if (resubmit_after_max_hours) - parser_get_param_string(params, "Restarts:basename", resubmit_command); + parser_get_param_string(params, "Restarts:resubmit_command", + resubmit_command); /* If restarting, look for the restart files. */ if (restart) { diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index 218a3cb2b8..05102e8a94 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -114,15 +114,16 @@ InitialConditions: # Parameters controlling restarts Restarts: - enable: 1 # (Optional) whether to enable dumping restarts at fixed intervals. - save: 1 # (Optional) whether to save copies of the previous set of restart files (named .prev) - onexit: 0 # (Optional) whether to dump restarts on exit (*needs enable*) - subdir: restart # (Optional) name of subdirectory for restart files. - basename: swift # (Optional) prefix used in naming restart files. - delta_hours: 6.0 # (Optional) decimal hours between dumps of restart files. - stop_steps: 100 # (Optional) how many steps to process before checking if the <subdir>/stop file exists. When present the application will attempt to exit early, dumping restart files first. - max_run_time: 24.0 # (optional) Maximal wall-clock time in hours. The application will exit when this limit is reached. - resubmit_on_exit: 0 # (Optional) whether to run a command when exiting after the time limit has been reached. + enable: 1 # (Optional) whether to enable dumping restarts at fixed intervals. + save: 1 # (Optional) whether to save copies of the previous set of restart files (named .prev) + onexit: 0 # (Optional) whether to dump restarts on exit (*needs enable*) + subdir: restart # (Optional) name of subdirectory for restart files. + basename: swift # (Optional) prefix used in naming restart files. + delta_hours: 6.0 # (Optional) decimal hours between dumps of restart files. + stop_steps: 100 # (Optional) how many steps to process before checking if the <subdir>/stop file exists. When present the application will attempt to exit early, dumping restart files first. + max_run_time: 24.0 # (optional) Maximal wall-clock time in hours. The application will exit when this limit is reached. + resubmit_on_exit: 0 # (Optional) whether to run a command when exiting after the time limit has been reached. + resubmit_command: ./resub.sh # (Optional) Command to run when time limit is reached. Compulsory if resubmit_on_exit is switched on. # Parameters governing domain decomposition DomainDecomposition: -- GitLab