Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make executor threadpool size configurable

fix #94
  • Loading branch information...
commit 242cdb3cf629f83d607753492b98b204cc68b804 1 parent 91c2a54
@drelu drelu authored
Showing with 8 additions and 1 deletion.
  1. +5 −1 bigjob/bigjob_agent.py
  2. +3 −0  bigjob_agent.conf
View
6 bigjob/bigjob_agent.py
@@ -97,12 +97,15 @@ def __init__(self, args):
# linked under mpirun_rsh
if default_dict.has_key("mpirun"):
self.MPIRUN=default_dict["mpirun"]
+
+ if default_dict.has_key("number_executor_threads"):
+ THREAD_POOL_SIZE=int(default_dict["number_executor_threads"])
+
self.OUTPUT_TAR=False
if default_dict.has_key("create_output_tar"):
self.OUTPUT_TAR=eval(default_dict["create_output_tar"])
logger.debug("Create output tar: %r", self.OUTPUT_TAR)
-
self.failed_polls = 0
##############################################################################
@@ -190,6 +193,7 @@ def __init__(self, args):
##############################################################################
# start background thread for polling new jobs and monitoring current jobs
+ logger.debug("Creating executor thread pool of size: %d"%(THREAD_POOL_SIZE))
self.resource_lock=threading.RLock()
self.threadpool = ThreadPool(THREAD_POOL_SIZE)
View
3  bigjob_agent.conf
@@ -5,6 +5,9 @@ cpr=False
shell = /bin/bash
mpirun = mpirun
+# control multi-threaded compute unit execution
+number_executor_threads=3
+
# Lauch Method
# Default launch method is ssh
# Future support for aprun (e.g. for Kraken)
Please sign in to comment.
Something went wrong with that request. Please try again.