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

Fix bug in scripts for compareScenarios

Delete lusweave output files after generating runtime.pdf
parent 61718e08
No related branches found
No related tags found
1 merge request!45fix bug for starting compare scenarios
......@@ -52,7 +52,8 @@ start_comp <- function(outputdirs,shortTerm,outfilename) {
cat("Starting ",jobname,"\n")
on_cluster <- file.exists("/p/projects/")
if (on_cluster) {
system(paste0("sbatch --qos=standby --job-name=",jobname," --output=",jobname,".out --error=",jobname,".err --mail-type=END --time=200 --mem-per-cpu=8000 Rscript scripts/utils/run_compareScenarios.R outputdirs=",paste(outputdirs,collapse=",")," shortTerm=",shortTerm," outfilename=",jobname))
clcom <- paste0("sbatch --qos=standby --job-name=",jobname," --output=",jobname,".out --error=",jobname,".err --mail-type=END --time=200 --mem-per-cpu=8000 --wrap=\"Rscript scripts/utils/run_compareScenarios.R outputdirs=",paste(outputdirs,collapse=",")," shortTerm=",shortTerm," outfilename=",jobname,"\"")
system(clcom)
} else {
outfilename <- jobname
tmp.env <- new.env()
......
......@@ -13,8 +13,6 @@ if(!exists("source_include")) {
readArgs("outfilename")
}
source("compareScenarios.R")
wrap_to_have_a_clean_exit <- function(outputdirs,shortTerm,outfilename) {
# Set mif path
scenNames <- getScenNames(outputdirs)
......
......@@ -225,6 +225,7 @@ start_coupled <- function(path_remind,path_magpie,cfg_rem,cfg_mag,runname,max_it
runs <- findCoupledruns(resultsfolder=remindpath)
ret <- findIterations(runs,modelpath=c(remindpath,magpiepath),latest=FALSE)
readRuntime(ret,plot=TRUE,coupled=TRUE)
unlink(c("runtime.log","runtime.out","runtime.rda"))
# combine REMIND and MAgPIE reports of last coupling iteration (and REMIND water reporting if existing)
report_rem <- paste0(path_remind,outfolder_rem,"/REMIND_generic_",cfg_rem$title,".mif")
......
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