From d51aba79f7ec4829969469968530b98cd29f5605 Mon Sep 17 00:00:00 2001
From: Duncan Meacher <duncan.meacher@ligo.org>
Date: Wed, 4 Apr 2018 12:32:21 -0700
Subject: [PATCH] gstlal_inspiral_pipe: change number of chunks for final
 merger stages from 20 -> 50

---
 gstlal-inspiral/bin/gstlal_inspiral_pipe | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gstlal-inspiral/bin/gstlal_inspiral_pipe b/gstlal-inspiral/bin/gstlal_inspiral_pipe
index 7779a771ef..8190fb4ba7 100755
--- a/gstlal-inspiral/bin/gstlal_inspiral_pipe
+++ b/gstlal-inspiral/bin/gstlal_inspiral_pipe
@@ -791,6 +791,8 @@ def merge_in_bin(dag, toSqliteJob, lalappsRunSqliteJob, options):
 
 def finalize_runs(dag, lalappsRunSqliteJob, toXMLJob, ligolwInspinjFindJob, toSqliteJob, toSqliteNoCacheJob, cpJob, innodes, ligolw_add_nodes, options, instruments):
 
+	num_chunks = 50
+
 	if options.vetoes is None:
 		vetoes = []
 	else:
@@ -799,7 +801,7 @@ def finalize_runs(dag, lalappsRunSqliteJob, toXMLJob, ligolwInspinjFindJob, toSq
 	chunk_nodes = []
 	dbs_to_delete = []
 	# Process the chirp mass bins in chunks to paralellize the merging process
-	for chunk, nodes in enumerate(chunks(innodes[None], 20)):
+	for chunk, nodes in enumerate(chunks(innodes[None], num_chunks)):
 		try:
 			dbs = [node.input_files[""] for node in nodes]
 			parents = nodes
@@ -868,7 +870,7 @@ def finalize_runs(dag, lalappsRunSqliteJob, toXMLJob, ligolwInspinjFindJob, toSq
 		# extract only the nodes that were used for injections
 		chunk_nodes = []
 
-		for chunk, injnodes in enumerate(chunks(innodes[sim_tag_from_inj_file(injections)], 20)):
+		for chunk, injnodes in enumerate(chunks(innodes[sim_tag_from_inj_file(injections)], num_chunks)):
 			try:
 				dbs = [injnode.input_files[""] for injnode in injnodes]
 				parents = injnodes
-- 
GitLab