Skip to content
Snippets Groups Projects
Commit ca73c230 authored by David Klein's avatar David Klein
Browse files

Bugfix for restarting runs: do not execute prepare() for runs that already have full.gms.

parent d8cbbdcb
No related branches found
No related tags found
1 merge request!155A coupled of fixes and improvements to the start scripts
...@@ -70,7 +70,7 @@ choose_slurmConfig <- function() { ...@@ -70,7 +70,7 @@ choose_slurmConfig <- function() {
return(comp) return(comp)
} }
# combine_slurmconfig takes two strings with SLURM parameters (e.g. "--qos=priority --time=40000") # combine_slurmconfig takes two strings with SLURM parameters (e.g. "--qos=priority --time=03:30:00")
# and combines them into one sting of SLURM parameters overwriting the parameters in "original" # and combines them into one sting of SLURM parameters overwriting the parameters in "original"
# if they also exist in "update_with". # if they also exist in "update_with".
......
...@@ -852,15 +852,15 @@ run <- function(start_subsequent_runs = TRUE) { ...@@ -852,15 +852,15 @@ run <- function(start_subsequent_runs = TRUE) {
# Call prepare and run without cfg, because cfg is read from results folder, where it has been # Call prepare and run without cfg, because cfg is read from results folder, where it has been
# copied to by submit(cfg) # copied to by submit(cfg)
if (!file.exists("fulldata.gdx")) { if (!file.exists("full.gms")) {
# If no "fulldata.gdx" exists, the script assumes that REMIND did not run before and # If no "full.gms" exists, the script assumes that REMIND did not run before and
# prepares all inputs before starting the run. # prepares all inputs before starting the run.
prepare() prepare()
start_subsequent_runs <- TRUE start_subsequent_runs <- TRUE
} else { } else {
# If "fulldata.gdx" exists, the script assumes that REMIND did run before and you want # If "full.gms" exists, the script assumes that a full.gms has been generated before and you want
# to restart REMIND in the same folder using the gdx that it previously produced. # to restart REMIND in the same folder using the gdx that it eventually previously produced.
file.copy("fulldata.gdx", "input.gdx", overwrite = TRUE) if(file.exists("fulldata.gdx")) file.copy("fulldata.gdx", "input.gdx", overwrite = TRUE)
start_subsequent_runs <- FALSE start_subsequent_runs <- FALSE
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment