diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py index 9f77be0a99c4002ba87aea63ab742e4e8ebe6cbe..353d2d8d1d800dadaffafb42746acad4fdd49bc4 100755 --- a/xfel_calibrate/calibrate.py +++ b/xfel_calibrate/calibrate.py @@ -56,6 +56,10 @@ def make_initial_parser(): help='Filename (and optionally path) for output' ' report') + parser.add_argument('--concurrency-par', type=str, + help='Name of cuncurrency parameter.' + 'If not given, it is taken from configuration.') + parser.add_argument('--priority', type=int, default=2, help="Priority of batch jobs. If priority<=1, reserved" " nodes become available.") @@ -755,6 +759,10 @@ def run(): except KeyError: print("Not one of the known calibrations or detectors") return + + if args["concurrency_par"] is not None: + concurrency["parameter"] = args["concurrency_par"] + with open(notebook, "r") as f: nb = nbformat.read(f, as_version=4) @@ -798,7 +806,7 @@ def run(): run_uuid = uuid4() - # check that a modules field is present if we run concurrently + # check if concurrency parameter is given and we run concurrently if not has_parm(parms, concurrency["parameter"]) and concurrency["parameter"] is not None: msg = "Notebook cannot be run concurrently: no {} parameter".format( concurrency["parameter"])