Flag to continue runs.

parent 0183b61e
...@@ -15,6 +15,11 @@ Stores as global variables 'parsed_args' (info from the command line) and 'param ...@@ -15,6 +15,11 @@ Stores as global variables 'parsed_args' (info from the command line) and 'param
function read_input() function read_input()
global parsed_args = parse_commandline() global parsed_args = parse_commandline()
global params = TOML.parsefile(parsed_args["i"]) global params = TOML.parsefile(parsed_args["i"])
if parsed_args["R"] && (isfile("./output/"*params["Run"]["name"]*".log") || isfile("./output/"*params["Run"]["name"]*".bdio"))
error("Output file already exists with this run name. Use flag -R to continue the run.")
end
return nothing return nothing
end end
...@@ -40,6 +45,10 @@ function parse_commandline() ...@@ -40,6 +45,10 @@ function parse_commandline()
help = "GPU for the job. Default 0" help = "GPU for the job. Default 0"
arg_type = Int arg_type = Int
default = 0 default = 0
"-R"
help = "Continue run. Needed to edit output files already created."
action = :store_false
end end
return parse_args(s) return parse_args(s)
......
Markdown is supported
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