From: W. Trevor King Date: Wed, 20 Oct 2010 07:05:18 +0000 (-0400) Subject: Add --manager option to velocity_dependant_scan.py. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=903af5c7f51e29875a00e8c1151f2f9c08c2a156;p=sawsim.git Add --manager option to velocity_dependant_scan.py. --- diff --git a/pysawsim/manager/__init__.py b/pysawsim/manager/__init__.py index f7b2cb5..8e3eb65 100644 --- a/pysawsim/manager/__init__.py +++ b/pysawsim/manager/__init__.py @@ -24,7 +24,8 @@ from .. import invoke as invoke from .. import log -SUBMODS = ['thread', 'pbs'] +MANAGERS = ['thread', 'pbs'] +"""Submodules with JobManager subclasses.""" class Job (object): diff --git a/pysawsim/velocity_dependant_scan.py b/pysawsim/velocity_dependant_scan.py index f877b44..9d12b19 100644 --- a/pysawsim/velocity_dependant_scan.py +++ b/pysawsim/velocity_dependant_scan.py @@ -30,6 +30,7 @@ from scipy.optimize import leastsq from . import log from .histogram import Histogram +from .manager import MANAGERS, get_manager from .sawsim_histogram import SawsimHistogram @@ -230,10 +231,15 @@ def main(): metavar="PARAMS", help="Param range for plotting (%default).", default='[1e-5,1e-3,20],[0.1e-9,1e-9,20]') - parser.add_option("--N", "--number-of-runs", dest="N", + parser.add_option("-N", "--number-of-runs", dest="N", metavar="INT", type='int', help="Number of sawsim runs at each point in parameter space (%default).", default=400) + parser.add_option("-m", "--manager", dest="manager", + metavar="STRING", + help="Job manager name (one of %s) (%%default)." + % (', '.join(MANAGERS)), + default=MANAGERS[0]) parser.add_option("--logx", dest="logx", help="Use a log scale for the x range.", default=False, action="store_true")