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
91eb2ad0
Unverified
Commit
91eb2ad0
authored
5 years ago
by
Lavinia Baumstark
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/output/comparison/compareScenarios.R
+2
-1
2 additions, 1 deletion
scripts/output/comparison/compareScenarios.R
scripts/utils/run_compareScenarios.R
+0
-2
0 additions, 2 deletions
scripts/utils/run_compareScenarios.R
start_coupled.R
+1
-0
1 addition, 0 deletions
start_coupled.R
with
3 additions
and
3 deletions
scripts/output/comparison/compareScenarios.R
+
2
−
1
View file @
91eb2ad0
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
scripts/utils/run_compareScenarios.R
+
0
−
2
View file @
91eb2ad0
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
start_coupled.R
+
1
−
0
View file @
91eb2ad0
...
...
@@ -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"
)
...
...
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