Skip to content

Commit

Permalink
Merge branch 'f_newstart' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dklein-pik committed Jan 15, 2020
2 parents 3453eb2 + 15b40ad commit 285f5c2
Show file tree
Hide file tree
Showing 44 changed files with 954 additions and 1,368 deletions.
7 changes: 0 additions & 7 deletions cluster_start_bundle.cmd

This file was deleted.

12 changes: 0 additions & 12 deletions cluster_start_coupled.cmd

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt3.op4

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt3.op5

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt3.op8

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op2

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op3

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op4

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op5

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op8

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.op9

This file was deleted.

10 changes: 0 additions & 10 deletions config/conopt4.opt

This file was deleted.

23 changes: 10 additions & 13 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cfg$revision <- 5.937
#### Force the model to download new input data ####
cfg$force_download <- FALSE

# Should an existing output folder be replaced if a new run with the same name is started?
cfg$force_replace <- FALSE

#### list of repositories containing input data
# defined in your local .Rprofile or on the cluster /p/projects/rd3mod/R/.Rprofile
cfg$repositories <- getOption("remind_repos")
Expand Down Expand Up @@ -411,9 +414,8 @@ cfg$action <- "ce" #def <- ce
# Tar-ball all the put files to save space?
cfg$tarball_puts <- "on" # def <- on

# Decide whether the runs should be send to slurm (TRUE) or executed directly (FALSE)
# NA means that this decision is taken automatically (typically on cluster = TRUE and locally = FALSE)
cfg$sendToSlurm <- NA
# Specify the way REMIND will be run on the cluster (job class, number of nodes, ...) or locally ("direct")
cfg$slurmConfig <- "direct"

# Should REMIND output be shown in console? (0:no, 2:logfile, 3:yes)
cfg$logoption <- 2
Expand All @@ -431,21 +433,16 @@ cfg$files2export <- list()
cfg$files2export$start <- c("config/conopt3.opt",
"config/conopt3.op2",
"config/conopt3.op3",
"config/conopt3.op4",
"config/conopt3.op5",
"config/conopt3.op8",
"config/conopt3.op9",
"scripts/run_submit/submit.cmd",
"scripts/run_submit/submit.R",
"scripts/run_submit/run_magicc.R",
"scripts/run_submit/run_magicc_temperatureImpulseResponse.R",
"scripts/run_submit/read_DAT_TOTAL_ANTHRO_RF.R",
"scripts/run_submit/read_DAT_SURFACE_TEMP.R",
"core/magicc/run_magicc.R",
"core/magicc/run_magicc_temperatureImpulseResponse.R",
"core/magicc/read_DAT_TOTAL_ANTHRO_RF.R",
"core/magicc/read_DAT_SURFACE_TEMP.R",
"core/input/historical/historical.mif",
"scripts/input/exoGAINSAirpollutants.R",
"config/input.gdx",
"config/input_ref.gdx",
"core/magicc",
"core/magicc",
".Rprofile",
"config/mappingEDGEtoREMINDsectors.csv")

Expand Down
5 changes: 2 additions & 3 deletions config/oneRegi.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,8 @@ cfg$action <- "ce" #def <- ce
# Tar-ball all the put files to save space?
cfg$tarball_puts <- "on" # def <- on

# Decide whether the runs should be send to slurm (TRUE) or executed directly (FALSE)
# NA means that this decision is taken automatically (typically on cluster = TRUE and locally = FALSE)
cfg$sendToSlurm <- NA
# Specify the way REMIND will be run on the cluster (job class, number of nodes, ...) or locally ("direct")
cfg$slurmConfig <- "direct"

# Should REMIND output be shown in console? (0:no, 2:logfile, 3:yes)
cfg$logoption <- 2
Expand Down
5 changes: 0 additions & 5 deletions core/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,10 @@ p_developmentState(tall,all_regi) = f_developmentState(tall,all_regi,"%c_GDPpcSc


*** Load information from BAU run
$ifthen.cm_compile_main %cm_compile_main% == "TRUE"
pm_gdp_gdx(ttot,regi) = 0;
p_inv_gdx(ttot,regi) = 0;
$else.cm_compile_main
Execute_Loadpoint 'input' vm_cesIO, vm_invMacro;

pm_gdp_gdx(ttot,regi) = vm_cesIO.l(ttot,regi,"inco");
p_inv_gdx(ttot,regi) = vm_invMacro.l(ttot,regi,"kap");
$endif.cm_compile_main

*** permit price initilization
pm_pricePerm(ttot) = 0;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ $setGlobal cm_magicc_temperatureImpulseResponse off !! def = off

$setGlobal cm_damage_DiceLike_specification HowardNonCatastrophic !! def = HowardNonCatastrophic


$setglobal cm_compile_main TRUE !! this will be changed by submit.R
$setglobal cm_CES_configuration stat_off-indu_fixed_shares-buil_simple-tran_complex-POP_pop_SSP2-GDP_gdp_SSP2-Kap_perfect-Reg_690d3718e1 !! this will be changed by start_run()

$setglobal c_CES_calibration_new_structure 0 !! def = 0
Expand Down
3 changes: 0 additions & 3 deletions modules/80_optimization/negishi/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
pm_pvp(ttot,trade)$(ttot.val ge 2005) = 1;
p80_trade(ttot,regi,trade)$(ttot.val ge 2005) = 0;

$ifthen.cm_compile_main %cm_compile_main% == "FALSE"

if (cm_emiscen eq 1,
Execute_Loadpoint "./input.gdx", p80_currentaccount_bau = p80_curracc;
else
Execute_Loadpoint "./input_ref.gdx", p80_currentaccount_bau = p80_curracc;
);

$endif.cm_compile_main

p80_defic_sum("1") = 1;

Expand Down
24 changes: 12 additions & 12 deletions modules/80_optimization/negishi/solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ if(o_modelstat eq 2,

IF(o_modelstat eq 2,
*AJS*2013-05* Default Negishi convergence scheme:
if (ord(iteration) eq 1, s80_cnptfile = 2);
if (ord(iteration) eq 2, s80_cnptfile = 3);
if (ord(iteration) eq 3, s80_cnptfile = 4);
if (ord(iteration) eq 4, s80_cnptfile = 5);
if (ord(iteration) eq 1, s80_cnptfile = 2); !! rtredg = 1.d-6
if (ord(iteration) eq 2, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 3, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 4, s80_cnptfile = 3); !! rtredg = 1.d-7
*RP* Slower convergence scheme
$IFTHEN.cm_SlowConvergence %cm_SlowConvergence% == "on"
if (ord(iteration) eq 1, s80_cnptfile = 1);
if (ord(iteration) eq 2, s80_cnptfile = 2);
if (ord(iteration) eq 3, s80_cnptfile = 2);
if (ord(iteration) eq 4, s80_cnptfile = 3);
if (ord(iteration) eq 5, s80_cnptfile = 3);
if (ord(iteration) eq 6, s80_cnptfile = 4);
if (ord(iteration) eq 7, s80_cnptfile = 4);
if (ord(iteration) eq 8, s80_cnptfile = 5);
if (ord(iteration) eq 1, s80_cnptfile = 1); !! rtredg = 1.d-5
if (ord(iteration) eq 2, s80_cnptfile = 2); !! rtredg = 1.d-6
if (ord(iteration) eq 3, s80_cnptfile = 2); !! rtredg = 1.d-6
if (ord(iteration) eq 4, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 5, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 6, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 7, s80_cnptfile = 3); !! rtredg = 1.d-7
if (ord(iteration) eq 8, s80_cnptfile = 3); !! rtredg = 1.d-7
$ENDIF.cm_SlowConvergence
);
*** EOF ./modules/80_optimization/negishi/solve.gms
3 changes: 1 addition & 2 deletions modules/80_optimization/testOneRegi/solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*** | Contact: remind@pik-potsdam.de
*** SOF ./modules/80_optimization/testOneRegi/solve.gms

$IFI %optimization% == "testOneRegi" s80_cnptfile = 9;
hybrid.optfile = s80_cnptfile;
hybrid.optfile = 9;

***reduce the problem to one region
regi(all_regi) = NO;
Expand Down
4 changes: 2 additions & 2 deletions scripts/output/comparison/compareScenarios.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ start_comp <- function(outputdirs,shortTerm,outfilename) {
cat("Starting ",jobname,"\n")
on_cluster <- file.exists("/p/projects/")
if (on_cluster) {
system(paste0("srun --qos=standby --job-name=",jobname," --output=",jobname,".out --error=",jobname,".err --mail-type=END --time=200 --mem-per-cpu=8000 Rscript scripts/run_submit/run_compareScenarios.R outputdirs=",paste(outputdirs,collapse=",")," shortTerm=",shortTerm," outfilename=",jobname," &"))
system(paste0("srun --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," &"))
} else {
outfilename <- jobname
tmp.env <- new.env()
script <- "scripts/run_submit/run_compareScenarios.R"
script <- "scripts/utils/run_compareScenarios.R"
tmp.error <- try(sys.source(script,envir=tmp.env))
if(!is.null(tmp.error)) warning("Script ",script," was stopped by an error and not executed properly!")
rm(tmp.env)
Expand Down
2 changes: 1 addition & 1 deletion scripts/output/comparison/multiComparison.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ compareScenTable <- function(listofruns){

if(system("hash sbatch 2>/dev/null") == 0){
cat("Submitting comparison Jobs:\n")
system("sbatch scripts/run_submit/submit_compare.cmd")
system(paste0("sbatch --job-name=rem-compare --output=log-%j.out --mail-type=END --cpus-per-task=2 --qos=priority --wrap=\"Rscript scripts/utils/compareParallel.R \""))
}else{
source("scripts/utils/compareParallel.R")
}
Expand Down
Loading

0 comments on commit 285f5c2

Please sign in to comment.