Add --manager option to velocity_dependant_scan.py.
authorW. Trevor King <wking@drexel.edu>
Wed, 20 Oct 2010 07:05:18 +0000 (03:05 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 20 Oct 2010 07:05:18 +0000 (03:05 -0400)
pysawsim/manager/__init__.py
pysawsim/velocity_dependant_scan.py

index f7b2cb53bfc3dc181b0b91df7b3d168c94b0a085..8e3eb65d919cc8630d8da5d73e06485e486eff61 100644 (file)
@@ -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):
index f877b4491ad538947000a0b5e5dd816ab96cb837..9d12b1923b85e4ebb84e1b63a04ad1b303e8dde7 100644 (file)
@@ -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")