Skip to content
Snippets Groups Projects
Unverified Commit 91eb2ad0 authored by Lavinia Baumstark's avatar Lavinia Baumstark Committed by GitHub
Browse files

Merge pull request #45 from dklein-pik/develop

fix bug for starting compare scenarios
parents e3003d46 333075eb
No related branches found
No related tags found
No related merge requests found
......@@ -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