From 8dda9c364c82b4cfbbb0839334058a648baffafa Mon Sep 17 00:00:00 2001 From: Duncan Meacher <duncan.meacher@ligo.org> Date: Fri, 29 Sep 2017 09:25:55 -0700 Subject: [PATCH] gstlal_etg: Added comments --- gstlal-ugly/bin/gstlal_etg_pipe | 12 +++++++----- gstlal-ugly/share/etg/Makefile.gstlal_etg_offline | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gstlal-ugly/bin/gstlal_etg_pipe b/gstlal-ugly/bin/gstlal_etg_pipe index bf6fe9da57..ca67a6349f 100755 --- a/gstlal-ugly/bin/gstlal_etg_pipe +++ b/gstlal-ugly/bin/gstlal_etg_pipe @@ -17,7 +17,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """ -This program makes a dag to run gstlal_inspiral offline +This program makes a dag to run gstlal_etg offline """ __author__ = 'Duncan Meacher <duncan.meacher@ligo.org>' @@ -62,8 +62,9 @@ def etg_node_gen(gstlalETGJob, dag, parent_nodes, options, channels, data_source outstr = "" out_index = 0 n_channels = 0 - n_cpu = 0 + + # Loop over all channels to determine number of streams and minimum number of processes needed for ii, channel in enumerate(channels,1): samp_rate = data_source_info.channel_dict[channel]['fsamp'] max_samp_rate = min(2048, int(samp_rate)) @@ -74,6 +75,7 @@ def etg_node_gen(gstlalETGJob, dag, parent_nodes, options, channels, data_source if cumsum_rates >= options.streams or ii == len(data_source_info.channel_dict.keys()): n_cpu += 1 cumsum_rates = 0 + # Create more even distribution of channels across minimum number of processes n_streams = math.ceil(total_rates / n_cpu) if options.verbose: print "Total streams =", total_rates @@ -91,11 +93,11 @@ 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: + # Adds channel to current process if cumsum_rates < n_streams: outstr = outstr + " --channel-name=" - #if cumsum_rates >= options.streams or ii == len(data_source_info.channel_dict.keys()): + # Finalise each process once number of streams passes threshold 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 @@ -190,7 +192,7 @@ dag = inspiral_pipe.DAG("etg_pipe") gstlalETGJob = inspiral_pipe.generic_job("gstlal_etg", condor_commands = inspiral_pipe.condor_command_dict_from_opts(options.condor_command, {"request_memory":options.request_memory, "request_cpus":options.request_cpu, "want_graceful_removal":"True", "kill_sig":"15"})) # -# Inspiral jobs by segment +# ETG jobs # etg_nodes = etg_node_gen(gstlalETGJob, dag, [], options, channels, data_source_info) diff --git a/gstlal-ugly/share/etg/Makefile.gstlal_etg_offline b/gstlal-ugly/share/etg/Makefile.gstlal_etg_offline index 9847e16c65..adca72ef65 100644 --- a/gstlal-ugly/share/etg/Makefile.gstlal_etg_offline +++ b/gstlal-ugly/share/etg/Makefile.gstlal_etg_offline @@ -2,7 +2,7 @@ SHELL := /bin/bash # condor commands # Set the accounting tag from https://ldas-gridmon.ligo.caltech.edu/ldg_accounting/user ACCOUNTING_TAG=ligo.dev.o3.detchar.onlinedq.idq -GROUP_USER=duncan.meacher +GROUP_USER=albert.einstein CONDOR_COMMANDS:=--condor-command=accounting_group=$(ACCOUNTING_TAG) --condor-command=accounting_group_user=$(GROUP_USER) ######################### -- GitLab