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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
toolbox
WindEnergyToolbox
Commits
f92812b3
Commit
f92812b3
authored
8 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.dlctemplate: add option for running in zip-chunk mode
parent
e01df4e2
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/dlctemplate.py
+17
-2
17 additions, 2 deletions
wetb/prepost/dlctemplate.py
with
17 additions
and
2 deletions
wetb/prepost/dlctemplate.py
+
17
−
2
View file @
f92812b3
...
@@ -26,6 +26,7 @@ from matplotlib import pyplot as plt
...
@@ -26,6 +26,7 @@ from matplotlib import pyplot as plt
from
wetb.prepost
import
Simulations
as
sim
from
wetb.prepost
import
Simulations
as
sim
from
wetb.prepost
import
dlcdefs
from
wetb.prepost
import
dlcdefs
from
wetb.prepost
import
dlcplots
from
wetb.prepost
import
dlcplots
from
wetb.prepost.simchunks
import
create_chunks_htc_pbs
plt
.
rc
(
'
font
'
,
family
=
'
serif
'
)
plt
.
rc
(
'
font
'
,
family
=
'
serif
'
)
plt
.
rc
(
'
xtick
'
,
labelsize
=
10
)
plt
.
rc
(
'
xtick
'
,
labelsize
=
10
)
...
@@ -183,7 +184,7 @@ def variable_tag_func(master, case_id_short=False):
...
@@ -183,7 +184,7 @@ def variable_tag_func(master, case_id_short=False):
# =============================================================================
# =============================================================================
def
launch_dlcs_excel
(
sim_id
,
silent
=
False
,
verbose
=
False
,
pbs_turb
=
True
,
def
launch_dlcs_excel
(
sim_id
,
silent
=
False
,
verbose
=
False
,
pbs_turb
=
True
,
runmethod
=
None
,
write_htc
=
True
):
runmethod
=
None
,
write_htc
=
True
,
zipchunks
=
False
):
"""
"""
Launch load cases defined in Excel files
Launch load cases defined in Excel files
"""
"""
...
@@ -248,6 +249,17 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=True,
...
@@ -248,6 +249,17 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=True,
mann64
=
sim
.
MannTurb64
(
silent
=
silent
)
mann64
=
sim
.
MannTurb64
(
silent
=
silent
)
mann64
.
gen_pbs
(
cases
)
mann64
.
gen_pbs
(
cases
)
if
zipchunks
:
# create chunks
# sort so we have minimal copying turb files from mimer to node/scratch
sorts_on
=
[
'
[DLC]
'
,
'
[Windspeed]
'
]
create_chunks_htc_pbs
(
cases
,
sort_by_values
=
sorts_on
,
ppn
=
20
,
nr_procs_series
=
9
,
processes
=
1
,
walltime
=
'
20:00:00
'
,
chunks_dir
=
'
zip-chunks-jess
'
)
create_chunks_htc_pbs
(
cases
,
sort_by_values
=
sorts_on
,
ppn
=
12
,
nr_procs_series
=
15
,
processes
=
1
,
walltime
=
'
20:00:00
'
,
chunks_dir
=
'
zip-chunks-gorm
'
)
def
post_launch
(
sim_id
,
statistics
=
True
,
rem_failed
=
True
,
check_logs
=
True
,
def
post_launch
(
sim_id
,
statistics
=
True
,
rem_failed
=
True
,
check_logs
=
True
,
force_dir
=
False
,
update
=
False
,
saveinterval
=
2000
,
csv
=
False
,
force_dir
=
False
,
update
=
False
,
saveinterval
=
2000
,
csv
=
False
,
...
@@ -414,6 +426,9 @@ if __name__ == '__main__':
...
@@ -414,6 +426,9 @@ if __name__ == '__main__':
dest
=
'
envelopeblade
'
,
help
=
'
Compute envelopeblade
'
)
dest
=
'
envelopeblade
'
,
help
=
'
Compute envelopeblade
'
)
parser
.
add_argument
(
'
--envelopeturbine
'
,
default
=
False
,
action
=
'
store_true
'
,
parser
.
add_argument
(
'
--envelopeturbine
'
,
default
=
False
,
action
=
'
store_true
'
,
dest
=
'
envelopeturbine
'
,
help
=
'
Compute envelopeturbine
'
)
dest
=
'
envelopeturbine
'
,
help
=
'
Compute envelopeturbine
'
)
parser
.
add_argument
(
'
--zipchunks
'
,
default
=
False
,
action
=
'
store_true
'
,
dest
=
'
zipchunks
'
,
help
=
'
Create PBS launch files for
'
'
running in zip-chunk find+xargs mode.
'
)
opt
=
parser
.
parse_args
()
opt
=
parser
.
parse_args
()
# TODO: use arguments to determine the scenario:
# TODO: use arguments to determine the scenario:
...
@@ -451,7 +466,7 @@ if __name__ == '__main__':
...
@@ -451,7 +466,7 @@ if __name__ == '__main__':
# create HTC files and PBS launch scripts (*.p)
# create HTC files and PBS launch scripts (*.p)
if
opt
.
prep
:
if
opt
.
prep
:
print
(
'
Start creating all the htc files and pbs_in files...
'
)
print
(
'
Start creating all the htc files and pbs_in files...
'
)
launch_dlcs_excel
(
sim_id
,
silent
=
False
)
launch_dlcs_excel
(
sim_id
,
silent
=
False
,
zipchunks
=
opt
.
zipchunks
)
# post processing: check log files, calculate statistics
# post processing: check log files, calculate statistics
if
opt
.
check_logs
or
opt
.
stats
or
opt
.
fatigue
or
opt
.
envelopeblade
or
opt
.
envelopeturbine
:
if
opt
.
check_logs
or
opt
.
stats
or
opt
.
fatigue
or
opt
.
envelopeblade
or
opt
.
envelopeturbine
:
post_launch
(
sim_id
,
check_logs
=
opt
.
check_logs
,
update
=
False
,
post_launch
(
sim_id
,
check_logs
=
opt
.
check_logs
,
update
=
False
,
...
...
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