Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wtlib
WindEnergyToolbox
Commits
30462c26
Commit
30462c26
authored
8 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.Simulations: if pyenv==None, no post_launch after H2 sim
parent
f92812b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/prepost/Simulations.py
+13
-11
13 additions, 11 deletions
wetb/prepost/Simulations.py
with
13 additions
and
11 deletions
wetb/prepost/Simulations.py
+
13
−
11
View file @
30462c26
...
...
@@ -558,7 +558,7 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func,
update_cases
=
False
,
ignore_non_unique
=
False
,
wine_appendix
=
''
,
run_only_new
=
False
,
windows_nr_cpus
=
2
,
qsub
=
''
,
pbs_fname_appendix
=
True
,
short_job_names
=
True
,
update_model_data
=
True
,
maxcpu
=
1
):
update_model_data
=
True
,
maxcpu
=
1
,
pyenv
=
'
wetb_py3
'
):
"""
Create the htc files, pbs scripts and replace the tags in master file
=====================================================================
...
...
@@ -793,7 +793,8 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func,
launch
(
cases
,
runmethod
=
runmethod
,
verbose
=
verbose
,
check_log
=
check_log
,
copyback_turb
=
copyback_turb
,
qsub
=
qsub
,
wine_appendix
=
wine_appendix
,
windows_nr_cpus
=
windows_nr_cpus
,
short_job_names
=
short_job_names
,
pbs_fname_appendix
=
pbs_fname_appendix
,
silent
=
silent
,
maxcpu
=
maxcpu
)
pbs_fname_appendix
=
pbs_fname_appendix
,
silent
=
silent
,
maxcpu
=
maxcpu
,
pyenv
=
pyenv
)
return
cases
...
...
@@ -994,7 +995,7 @@ def prepare_launch_cases(cases, runmethod='gorm', verbose=False,write_htc=True,
def
launch
(
cases
,
runmethod
=
'
local
'
,
verbose
=
False
,
copyback_turb
=
True
,
silent
=
False
,
check_log
=
True
,
windows_nr_cpus
=
2
,
qsub
=
'
time
'
,
wine_appendix
=
''
,
pbs_fname_appendix
=
True
,
short_job_names
=
True
,
maxcpu
=
1
):
maxcpu
=
1
,
pyenv
=
'
wetb_py3
'
):
"""
The actual launching of all cases in the Cases dictionary. Note that here
only the PBS files are written and not the actuall htc files.
...
...
@@ -1029,7 +1030,7 @@ def launch(cases, runmethod='local', verbose=False, copyback_turb=True,
# create the pbs object
pbs
=
PBS
(
cases
,
server
=
runmethod
,
short_job_names
=
short_job_names
,
pbs_fname_appendix
=
pbs_fname_appendix
,
qsub
=
qsub
,
verbose
=
verbose
,
silent
=
silent
)
verbose
=
verbose
,
silent
=
silent
,
pyenv
=
pyenv
)
pbs
.
wine_appendix
=
wine_appendix
pbs
.
copyback_turb
=
copyback_turb
pbs
.
pbs_out_dir
=
pbs_out_dir
...
...
@@ -2247,13 +2248,14 @@ class PBS(object):
# first and then run the post-processing for all those cases
if
self
.
maxcpu
==
1
:
self
.
pbs
+=
'
wait
\n
'
self
.
pbs
+=
'
echo
"
POST-PROCESSING
"
\n
'
self
.
pbs
+=
'
source activate %s
\n
'
%
self
.
pyenv
self
.
pbs
+=
"
"
self
.
checklogs
()
self
.
pbs
+=
"
"
self
.
postprocessing
()
self
.
pbs
+=
'
source deactivate
\n
'
if
self
.
pyenv
is
not
None
:
self
.
pbs
+=
'
echo
"
POST-PROCESSING
"
\n
'
self
.
pbs
+=
'
source activate %s
\n
'
%
self
.
pyenv
self
.
pbs
+=
"
"
self
.
checklogs
()
self
.
pbs
+=
"
"
self
.
postprocessing
()
self
.
pbs
+=
'
source deactivate
\n
'
self
.
pbs
+=
"
else
\n
"
param
=
(
self
.
wine
,
hawc2_exe
,
self
.
htc_dir
+
case
,
self
.
wine_appendix
)
self
.
pbs
+=
'
echo
"
execute HAWC2, do not fork and wait
"
\n
'
...
...
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