Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lscsoft
GstLAL
Commits
99f97f30
Commit
99f97f30
authored
7 years ago
by
Duncan Meacher
Browse files
Options
Downloads
Patches
Plain Diff
ETG pipe: distribute channels evenely across all jobs
parent
8adbb17f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gstlal-ugly/bin/gstlal_etg_pipe
+30
-3
30 additions, 3 deletions
gstlal-ugly/bin/gstlal_etg_pipe
gstlal-ugly/share/etg/Makefile.gstlal_etg_offline
+3
-2
3 additions, 2 deletions
gstlal-ugly/share/etg/Makefile.gstlal_etg_offline
with
33 additions
and
5 deletions
gstlal-ugly/bin/gstlal_etg_pipe
+
30
−
3
View file @
99f97f30
...
...
@@ -58,10 +58,32 @@ lsctables.use_in(LIGOLWContentHandler)
def
etg_node_gen
(
gstlalETGJob
,
dag
,
parent_nodes
,
options
,
channels
,
data_source_info
):
etg_nodes
=
{}
cumsum_rates
=
0
total_rates
=
0
outstr
=
""
out_index
=
0
n_channels
=
0
n_cpu
=
0
for
ii
,
channel
in
enumerate
(
channels
,
1
):
samp_rate
=
data_source_info
.
channel_dict
[
channel
][
'
fsamp
'
]
max_samp_rate
=
min
(
2048
,
int
(
samp_rate
))
min_samp_rate
=
min
(
32
,
max_samp_rate
)
n_rates
=
int
(
numpy
.
log2
(
max_samp_rate
/
min_samp_rate
)
+
1
)
cumsum_rates
+=
n_rates
total_rates
+=
n_rates
if
cumsum_rates
>=
options
.
streams
or
ii
==
len
(
data_source_info
.
channel_dict
.
keys
()):
n_cpu
+=
1
cumsum_rates
=
0
n_streams
=
math
.
ceil
(
total_rates
/
n_cpu
)
if
options
.
verbose
:
print
"
Total streams =
"
,
total_rates
print
"
Total jobs needed =
"
,
n_cpu
print
"
Evenly distributed streams per job =
"
,
int
(
n_streams
)
cumsum_rates
=
0
for
ii
,
channel
in
enumerate
(
channels
,
1
):
n_channels
+=
1
samp_rate
=
data_source_info
.
channel_dict
[
channel
][
'
fsamp
'
]
max_samp_rate
=
min
(
2048
,
int
(
samp_rate
))
min_samp_rate
=
min
(
32
,
max_samp_rate
)
...
...
@@ -69,10 +91,12 @@ def etg_node_gen(gstlalETGJob, dag, parent_nodes, options, channels, data_source
cumsum_rates
+=
n_rates
outstr
=
outstr
+
channel
+
"
:
"
+
str
(
int
(
samp_rate
))
if
cumsum_rates
<
options
.
streams
:
#if cumsum_rates < options.streams:
if
cumsum_rates
<
n_streams
:
outstr
=
outstr
+
"
--channel-name=
"
if
cumsum_rates
>=
options
.
streams
or
ii
==
len
(
data_source_info
.
channel_dict
.
keys
()):
#if cumsum_rates >= options.streams or ii == len(data_source_info.channel_dict.keys()):
if
cumsum_rates
>=
n_streams
or
ii
==
len
(
data_source_info
.
channel_dict
.
keys
()):
out_index
+=
1
outpath
=
options
.
out_path
+
"
/gstlal_etg/gstlal_etg_%04d
"
%
out_index
etg_nodes
[
channel
]
=
\
...
...
@@ -90,8 +114,11 @@ def etg_node_gen(gstlalETGJob, dag, parent_nodes, options, channels, data_source
input_files
=
{
"
frame-cache
"
:
options
.
frame_cache
},
output_files
=
{
"
out-path
"
:
outpath
}
)
if
options
.
verbose
:
print
"
Job %04d, number of channels = %3d, number of streams = %4d
"
%
(
out_index
,
n_channels
,
cumsum_rates
)
cumsum_rates
=
0
outstr
=
""
n_channels
=
0
return
etg_nodes
...
...
@@ -175,4 +202,4 @@ etg_nodes = etg_node_gen(gstlalETGJob, dag, [], options, channels, data_source_i
dag
.
write_sub_files
()
dag
.
write_dag
()
dag
.
write_script
()
dag
.
write_cache
()
#
dag.write_cache()
This diff is collapsed.
Click to expand it.
gstlal-ugly/share/etg/Makefile.gstlal_etg_offline
+
3
−
2
View file @
99f97f30
...
...
@@ -16,7 +16,7 @@ STOP = 1176639000
OUTPATH
=
$(
PWD
)
# Number of streams (N_channels x N_rates_per_channel) that each processor will analise
N_STREAMS
=
1
00
N_STREAMS
=
5
00
MISMATCH
=
0.2
QHIGH
=
40
...
...
@@ -49,7 +49,7 @@ all : dag
# Run etg pipe to produce dag
dag
:
frame.cache plots channel_list.txt
gstlal_etg_pipe
\
./
gstlal_etg_pipe
\
--data-source
frames
\
--gps-start-time
$(
START
)
\
--gps-end-time
$(
STOP
)
\
...
...
@@ -62,6 +62,7 @@ dag : frame.cache plots channel_list.txt
$(
CONDOR_COMMANDS
)
\
--request-cpu
2
\
--request-memory
5GB
\
--verbose
\
--disable-web-service
# --web-dir $(WEBDIR) \
...
...
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