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() {
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"
# if they also exist in "update_with".
......
......@@ -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
# copied to by submit(cfg)
if (!file.exists("fulldata.gdx")) {
# If no "fulldata.gdx" exists, the script assumes that REMIND did not run before and
if (!file.exists("full.gms")) {
# If no "full.gms" exists, the script assumes that REMIND did not run before and
# prepares all inputs before starting the run.
prepare()
start_subsequent_runs <- TRUE
} else {
# If "fulldata.gdx" exists, the script assumes that REMIND did run before and you want
# to restart REMIND in the same folder using the gdx that it previously produced.
file.copy("fulldata.gdx", "input.gdx", overwrite = TRUE)
# 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 eventually previously produced.
if(file.exists("fulldata.gdx")) file.copy("fulldata.gdx", "input.gdx", overwrite = TRUE)
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