Skip to content

Commit

Permalink
increase memory on single node runs
Browse files Browse the repository at this point in the history
  • Loading branch information
orichters committed Feb 20, 2024
1 parent 59e260b commit ffe1f46
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion core/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ $endif.altFeEmiFac
***######################## R SECTION START (MODULES) ###############################
*** THIS CODE IS CREATED AUTOMATICALLY, DO NOT MODIFY THESE LINES DIRECTLY
*** ANY DIRECT MODIFICATION WILL BE LOST AFTER NEXT MODEL START
*** CHANGES CAN BE DONE USING THE RESPECTIVE LINES IN scripts/start/prepare.R

sets

Expand Down Expand Up @@ -960,7 +961,7 @@ sets
codePerformance
/

module2realisation(modules,*) "mapping of modules and active realisations" /
module2realisation(modules,*) "mapping of modules and active realisations" /
macro . %macro%
welfare . %welfare%
PE_FE_parameters . %PE_FE_parameters%
Expand Down
6 changes: 3 additions & 3 deletions output.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ helpText <- "
#' folders, comma-separated, such as remind_dir=.,../otherremind
#' slurmConfig= use slurmConfig=priority, short or standby to specify slurm
#' selection. You may also pass complicated arguments such as
#' slurmConfig='--qos=priority --mem=8000'
#' slurmConfig='--qos=priority --mem=16000'
"

argv <- get0("argv", ifnotfound = commandArgs(trailingOnly = TRUE))
Expand Down Expand Up @@ -85,8 +85,8 @@ if ("--help" %in% flags) {

choose_slurmConfig_output <- function(slurmExceptions = NULL) {
slurm_options <- c("--qos=priority", "--qos=short", "--qos=standby",
"--qos=priority --mem=8000", "--qos=short --mem=8000",
"--qos=standby --mem=8000", "--qos=priority --mem=32000")
"--qos=priority --mem=16000", "--qos=short --mem=16000",
"--qos=standby --mem=16000", "--qos=priority --mem=32000")

if (!isSlurmAvailable())
return("direct")
Expand Down
10 changes: 5 additions & 5 deletions scripts/start/choose_slurmConfig.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ choose_slurmConfig <- function(identifier = FALSE, flags = NULL) {
"1" = "--qos=standby --nodes=1 --tasks-per-node=12" , # SLURM standby - task per node: 12 (nash H12) [recommended]
"2" = "--qos=standby --nodes=1 --tasks-per-node=13" , # SLURM standby - task per node: 13 (nash H12 coupled)
"3" = "--qos=standby --nodes=1 --tasks-per-node=16" , # SLURM standby - task per node: 16 (nash H12+)
"4" = "--qos=standby --nodes=1 --tasks-per-node=1 --mem=8000" , # SLURM standby - task per node: 1 (nash debug, test one regi)
"4" = "--qos=standby --nodes=1 --tasks-per-node=1 --mem=16000" , # SLURM standby - task per node: 1 (nash debug, test one regi)
"5" = "--qos=priority --nodes=1 --tasks-per-node=12" , # SLURM priority - task per node: 12 (nash H12) [recommended]
"6" = "--qos=priority --nodes=1 --tasks-per-node=13" , # SLURM priority - task per node: 13 (nash H12 coupled)
"7" = "--qos=priority --nodes=1 --tasks-per-node=16" , # SLURM priority - task per node: 16 (nash H12+)
"8" = "--qos=priority --nodes=1 --tasks-per-node=1 --mem=8000" , # SLURM priority - task per node: 1 (nash debug, test one regi)
"8" = "--qos=priority --nodes=1 --tasks-per-node=1 --mem=16000" , # SLURM priority - task per node: 1 (nash debug, test one regi)
"9" = "--qos=short --nodes=1 --tasks-per-node=12" , # SLURM short - task per node: 12 (nash H12)
"10" = "--qos=short --nodes=1 --tasks-per-node=16" , # SLURM short - task per node: 16 (nash H12+)
"11" = "--qos=short --nodes=1 --tasks-per-node=1 --mem=8000" , # SLURM short - task per node: 1 (nash debug, test one regi)
"12" = "--qos=medium --nodes=1 --tasks-per-node=1 --mem=8000" , # SLURM medium - task per node: 1 (negishi)
"13" = "--qos=long --nodes=1 --tasks-per-node=1 --mem=8000" , # SLURM long - task per node: 1 (negishi)
"11" = "--qos=short --nodes=1 --tasks-per-node=1 --mem=16000" , # SLURM short - task per node: 1 (nash debug, test one regi)
"12" = "--qos=medium --nodes=1 --tasks-per-node=1 --mem=16000" , # SLURM medium - task per node: 1 (negishi)
"13" = "--qos=long --nodes=1 --tasks-per-node=1 --mem=16000" , # SLURM long - task per node: 1 (negishi)
"14" = "--qos=medium --nodes=1 --tasks-per-node=12" , # SLURM medium - task per node: 12 (nash long calibration)
"15" = "--qos=medium --nodes=1 --tasks-per-node=16" , # SLURM medium - task per node: 16 (nash long calibration)
"16" = "direct")
Expand Down
2 changes: 1 addition & 1 deletion start_bundle_coupled.R
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ for (scen in common) {
}
slurmOptions <- combine_slurmConfig(paste0("--qos=", runEnv$qos, " --job-name=", fullrunname, " --output=", logfile,
" --open-mode=append --mail-type=END --comment=REMIND-MAgPIE --tasks-per-node=", runEnv$numberOfTasks,
if (runEnv$numberOfTasks == 1) " --mem=8000"), runEnv$sbatch)
if (runEnv$numberOfTasks == 1) " --mem=16000"), runEnv$sbatch)
slurmCommand <- paste0("sbatch ", slurmOptions, " --wrap=\"Rscript start_coupled.R coupled_config=", Rdatafile, "\"")
message(slurmCommand)
exitCode <- system(slurmCommand)
Expand Down
2 changes: 1 addition & 1 deletion start_coupled.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ start_coupled <- function(path_remind, path_magpie, cfg_rem, cfg_mag, runname, m
}
slurmOptions <- combine_slurmConfig(paste0("--qos=", subseq.env$qos, " --job-name=", subseq.env$fullrunname, " --output=", logfile,
" --open-mode=append --mail-type=END --comment=REMIND-MAgPIE --tasks-per-node=", subseq.env$numberOfTasks,
if (subseq.env$numberOfTasks == 1) " --mem=8000"), subseq.env$sbatch)
if (subseq.env$numberOfTasks == 1) " --mem=16000"), subseq.env$sbatch)
subsequentcommand <- paste0("sbatch ", slurmOptions, " --wrap=\"Rscript start_coupled.R coupled_config=", RData_file, "\"")
message(subsequentcommand)
if (length(needfulldatagdx) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_06-output.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ skipIfPreviousFailed()

test_that("output.R -> single -> reporting works", {
output <- localSystem2("Rscript", c("output.R", "comp=single", "output=reporting", "outputdir=output/testOneRegi",
"slurmConfig='--qos=priority --mem=8000 --wait'"))
"slurmConfig='--qos=priority --mem=16000 --wait'"))
printIfFailed(output)
expectSuccessStatus(output)
expect_true(file.exists("../../output/testOneRegi/REMIND_generic_testOneRegi.mif"))
Expand Down

0 comments on commit ffe1f46

Please sign in to comment.