diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 77847133a9..c24b4868e9 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -192,7 +192,11 @@ def get_resource(self, task_name): native = None if scheduler in ['pbspro']: - native = '-l debug=true,place=vscatter' + # Set place=vscatter by default and debug=true if DEBUG="YES" + if self._base['DEBUG']: + native = '-l debug=true,place=vscatter' + else: + native = '-l place=vscatter' # Set either exclusive or shared - default on WCOSS2 is exclusive when not set if task_config.get('is_exclusive', False): native += ':exclhost' diff --git a/workflow/rocoto/workflow_xml.py b/workflow/rocoto/workflow_xml.py index 11b2cdfc45..bf90192041 100644 --- a/workflow/rocoto/workflow_xml.py +++ b/workflow/rocoto/workflow_xml.py @@ -64,6 +64,9 @@ def _get_definitions(self) -> str: entity['MAXTRIES'] = self.rocoto_config['maxtries'] + if self._base['DEBUG'] and self._app_config.scheduler in ['slurm']: + entity['SBATCH_DEBUG'] = '2' + # Put them all in an XML key-value syntax strings = [] for key, value in entity.items():