Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
remind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerome Hilaire
remind
Commits
3e827f6f
Commit
3e827f6f
authored
5 years ago
by
Alois Dirnaichner
Browse files
Options
Downloads
Patches
Plain Diff
Improve documentation.
parent
4a0a6413
No related branches found
No related tags found
1 merge request
!109
Improve documentation of the multiComparison Utility
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/output/comparison/multiComparison.R
+13
-2
13 additions, 2 deletions
scripts/output/comparison/multiComparison.R
scripts/utils/compareParallel.R
+7
-1
7 additions, 1 deletion
scripts/utils/compareParallel.R
with
20 additions
and
3 deletions
scripts/output/comparison/multiComparison.R
+
13
−
2
View file @
3e827f6f
...
...
@@ -40,9 +40,18 @@ require(data.table)
#' in coupled runs
#' short: the run should run only on a time range up to 2060
#'
#' Eventually, `scripts/utils/compareParallel.R` reads the file
#' `multi_comparison.csv` and executes `compareScenarios` locally or on the cluster
#' (depending on the presence of the `sbatch` slurm utils).
#'
#' The number of cores to be used in parallel on the cluster is
#' determined by the variable CORES at the top of the function body.
#'
#' The prefix for coupled runs is also defined at the top (COUPLED_PREFIX).
#'
#' The scenarioComparison plots are stored in the subfolder
#' OUTPUT_FOLDER.
#'
#' @param listofruns a list of output folders, as given by the
#' `output.R` infrastructure
...
...
@@ -50,6 +59,7 @@ require(data.table)
compareScenTable
<-
function
(
listofruns
){
CORES
=
12
COUPLED_PREFIX
=
"C_"
OUTPUT_FOLDER
=
"multi_comparison_plots"
scendt
<-
fread
(
"config/multi_comparison_matrix.csv"
)
scendt
[
...
...
@@ -103,10 +113,11 @@ compareScenTable <- function(listofruns){
if
(
system
(
"hash sbatch 2>/dev/null"
)
==
0
){
cat
(
"Submitting comparison Jobs:\n"
)
system
(
sprintf
(
"sbatch --job-name=rem-compare --output=log-%%j.out --mail-type=END --cpus-per-task=%i --qos=priority --wrap=\"Rscript scripts/utils/compareParallel.R \""
,
CORES
))
system
(
sprintf
(
"sbatch --job-name=rem-compare --output=log-%%j.out --mail-type=END --cpus-per-task=%i --qos=priority --wrap=\"Rscript scripts/utils/compareParallel.R %s\""
,
CORES
,
OUTPUT_FOLDER
))
}
else
{
source
(
"scripts/utils/compareParallel.R"
)
}
}
compareScenTable
(
outputdirs
,
CORES
)
compareScenTable
(
outputdirs
)
This diff is collapsed.
Click to expand it.
scripts/utils/compareParallel.R
+
7
−
1
View file @
3e827f6f
...
...
@@ -8,7 +8,13 @@ require(data.table)
require
(
parallel
)
require
(
remind
)
plotfldr
<-
"multi_comparison_plots/"
args
=
commandArgs
(
trailingOnly
=
TRUE
)
if
(
length
(
args
)
==
0
)
{
plotfldr
<-
"multi_comparison_plots"
}
else
{
plotfldr
<-
args
[
1
]
}
dir.create
(
plotfldr
,
showWarnings
=
F
)
NUM_OF_CPUS_LOCAL
<-
2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment