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
61718e08
Commit
61718e08
authored
5 years ago
by
David Klein
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix in start scripts (testOneRegi) and compareScenarios
parent
08e58efe
No related branches found
No related tags found
1 merge request
!42
Bugfix in start scripts (testOneRegi) and compareScenarios
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/output/comparison/compareScenarios.R
+1
-1
1 addition, 1 deletion
scripts/output/comparison/compareScenarios.R
scripts/utils/run_compareScenarios.R
+2
-0
2 additions, 0 deletions
scripts/utils/run_compareScenarios.R
start.R
+3
-1
3 additions, 1 deletion
start.R
with
6 additions
and
2 deletions
scripts/output/comparison/compareScenarios.R
+
1
−
1
View file @
61718e08
...
@@ -52,7 +52,7 @@ start_comp <- function(outputdirs,shortTerm,outfilename) {
...
@@ -52,7 +52,7 @@ start_comp <- function(outputdirs,shortTerm,outfilename) {
cat
(
"Starting "
,
jobname
,
"\n"
)
cat
(
"Starting "
,
jobname
,
"\n"
)
on_cluster
<-
file.exists
(
"/p/projects/"
)
on_cluster
<-
file.exists
(
"/p/projects/"
)
if
(
on_cluster
)
{
if
(
on_cluster
)
{
system
(
paste0
(
"s
run
--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
,
" &"
))
system
(
paste0
(
"s
batch
--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
{
}
else
{
outfilename
<-
jobname
outfilename
<-
jobname
tmp.env
<-
new.env
()
tmp.env
<-
new.env
()
...
...
This diff is collapsed.
Click to expand it.
scripts/utils/run_compareScenarios.R
+
2
−
0
View file @
61718e08
...
@@ -13,6 +13,8 @@ if(!exists("source_include")) {
...
@@ -13,6 +13,8 @@ if(!exists("source_include")) {
readArgs
(
"outfilename"
)
readArgs
(
"outfilename"
)
}
}
source
(
"compareScenarios.R"
)
wrap_to_have_a_clean_exit
<-
function
(
outputdirs
,
shortTerm
,
outfilename
)
{
wrap_to_have_a_clean_exit
<-
function
(
outputdirs
,
shortTerm
,
outfilename
)
{
# Set mif path
# Set mif path
scenNames
<-
getScenNames
(
outputdirs
)
scenNames
<-
getScenNames
(
outputdirs
)
...
...
This diff is collapsed.
Click to expand it.
start.R
+
3
−
1
View file @
61718e08
...
@@ -101,6 +101,8 @@ config.file <- argv[1]
...
@@ -101,6 +101,8 @@ config.file <- argv[1]
if
(
'--testOneRegi'
%in%
argv
)
{
if
(
'--testOneRegi'
%in%
argv
)
{
testOneRegi
<-
TRUE
testOneRegi
<-
TRUE
config.file
<-
NA
config.file
<-
NA
}
else
{
testOneRegi
<-
FALSE
}
}
if
(
!
is.na
(
config.file
))
{
if
(
!
is.na
(
config.file
))
{
...
@@ -137,7 +139,7 @@ for (scen in rownames(scenarios)) {
...
@@ -137,7 +139,7 @@ for (scen in rownames(scenarios)) {
cfg
$
results_folder
<-
'output/testOneRegi'
cfg
$
results_folder
<-
'output/testOneRegi'
# delete existing Results directory
# delete existing Results directory
unlink
(
'output/testOneRegi'
,
recursive
=
TRUE
)
cfg
$
force_replace
<-
TRUE
}
}
# configure cfg based on settings from csv if provided
# configure cfg based on settings from csv if provided
...
...
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