From 328cdd8637003183ab09044c41674e3162e7baae Mon Sep 17 00:00:00 2001 From: David Klein <dklein@pik-potsdam.de> Date: Fri, 17 Jan 2020 16:01:32 +0100 Subject: [PATCH] Refactoring start scripts: fix bug in sbatch command, remove scenario name from name of log.txt so the rs script can easily find it. --- scripts/start/submit.R | 2 +- start_coupled.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start/submit.R b/scripts/start/submit.R index c6590db..360c4ae 100644 --- a/scripts/start/submit.R +++ b/scripts/start/submit.R @@ -55,7 +55,7 @@ submit <- function(cfg) { log <- format(Sys.time(), paste0(cfg$title,"-%Y-%H-%M-%S-%OS3.log")) system("Rscript prepare_and_run.R") } else { - system(paste0("sbatch --job-name=",cfg$title," --output=",cfg$title,".out --mail-type=END --comment=REMIND --wrap=\"Rscript prepare_and_run.R \" ",cfg$slurmConfig)) + system(paste0("sbatch --job-name=",cfg$title," --output=log.out --mail-type=END --comment=REMIND --wrap=\"Rscript prepare_and_run.R \" ",cfg$slurmConfig)) Sys.sleep(1) } diff --git a/start_coupled.R b/start_coupled.R index 15a9244..cea6775 100644 --- a/start_coupled.R +++ b/start_coupled.R @@ -215,7 +215,7 @@ start_coupled <- function(path_remind,path_magpie,cfg_rem,cfg_mag,runname,max_it #start subsequent runs via sbatch for(run in cfg_rem$subsequentruns){ cat("Submitting subsequent run",run,"\n") - system(paste0("sbatch --qos=standby --job-name=",run," --output=",run,".log --mail-type=END --comment=REMIND-MAgPIE --tasks-per-node=13",nr_of_regions," --wrap=\"Rscript start_coupled.R coupled_config=",run,".RData\"")) + system(paste0("sbatch --qos=standby --job-name=",run," --output=",run,".log --mail-type=END --comment=REMIND-MAgPIE --tasks-per-node=",nr_of_regions," --wrap=\"Rscript start_coupled.R coupled_config=C_",run,".RData\"")) } # Read runtime of ALL coupled runs (not just the current scenario) and produce comparison pdf -- GitLab