diff --git a/docs/source/setup.rst b/docs/source/setup.rst index a4e70fbfcb7..19e3f9ac3fe 100644 --- a/docs/source/setup.rst +++ b/docs/source/setup.rst @@ -156,8 +156,6 @@ Example: ./setup_xml.py /some_safe_disk_area/Joe.Schmo/expdir/test -Additional options for setting up Rocoto are available with `setup_xml.py -h` that allow users to change the number of failed tries, number of concurrent cycles and tasks as well as Rocoto's verbosity levels. - **************************************** Step 4: Confirm files from setup scripts **************************************** diff --git a/workflow/rocoto/workflow_xml.py b/workflow/rocoto/workflow_xml.py index 856cade2b94..4e43ff8ec17 100644 --- a/workflow/rocoto/workflow_xml.py +++ b/workflow/rocoto/workflow_xml.py @@ -5,7 +5,6 @@ from datetime import datetime from pygw.timetools import to_timedelta from collections import OrderedDict -from typing import Dict from applications import AppConfig from rocoto.workflow_tasks import get_wf_tasks import rocoto.rocoto as rocoto @@ -13,10 +12,9 @@ class RocotoXML: - def __init__(self, app_config: AppConfig, rocoto_config: Dict) -> None: + def __init__(self, app_config: AppConfig) -> None: self._app_config = app_config - self.rocoto_config = rocoto_config self._base = self._app_config.configs['base'] @@ -62,7 +60,7 @@ def _get_definitions(self) -> str: entity['ROTDIR'] = self._base['ROTDIR'] entity['JOBS_DIR'] = self._base['BASE_JOB'] - entity['MAXTRIES'] = self.rocoto_config['maxtries'] + entity['MAXTRIES'] = self._base.get('ROCOTO_MAXTRIES', 2) # Put them all in an XML key-value syntax strings = [] @@ -77,9 +75,9 @@ def _get_workflow_header(self): """ scheduler = self._app_config.scheduler - cyclethrottle = self.rocoto_config['cyclethrottle'] - taskthrottle = self.rocoto_config['taskthrottle'] - verbosity = self.rocoto_config['verbosity'] + cyclethrottle = self._base.get('ROCOTO_CYCLETHROTTLE', 3) + taskthrottle = self._base.get('ROCOTO_TASKTHROTTLE', 25) + verbosity = self._base.get('ROCOTO_VERBOSITY', 10) expdir = self._base['EXPDIR'] diff --git a/workflow/setup_xml.py b/workflow/setup_xml.py index 8ecc4552092..09212b59d96 100755 --- a/workflow/setup_xml.py +++ b/workflow/setup_xml.py @@ -28,15 +28,6 @@ def input_args(): parser.add_argument('expdir', help='full path to experiment directory containing config files', type=str, default=os.environ['PWD']) - parser.add_argument('--maxtries', help='maximum number of retries', type=int, - default=2, required=False) - parser.add_argument('--cyclethrottle', help='maximum number of concurrent cycles', type=int, - default=3, required=False) - parser.add_argument('--taskthrottle', help='maximum number of concurrent tasks', type=int, - default=25, required=False) - parser.add_argument('--verbosity', help='verbosity level of Rocoto', type=int, - default=10, required=False) - args = parser.parse_args() return args @@ -54,10 +45,6 @@ def check_expdir(cmd_expdir, cfg_expdir): if __name__ == '__main__': user_inputs = input_args() - rocoto_param_dict = {'maxtries': user_inputs['maxtries'], - 'cyclethrottle': user_inputs['cyclethrottle'], - 'taskthrottle': user_inputs['taskthrottle'], - 'verbosity': user_inputs['verbosity']} cfg = Configuration(user_inputs.expdir) @@ -67,5 +54,5 @@ def check_expdir(cmd_expdir, cfg_expdir): app_config = AppConfig(cfg) # Create Rocoto Tasks and Assemble them into an XML - xml = RocotoXML(app_config, rocoto_param_dict) + xml = RocotoXML(app_config) xml.write()