From 984b67253bd0ffbfdcd560e640a75c16dd60ce89 Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Thu, 22 Feb 2024 17:34:31 +0000 Subject: [PATCH] Move SBATCH_DEBUG to xml envars Set SBATCH_DEBUG via the envars in the xml instead of as an ENTITY at the top. The setting now exports with job submissions. Refs #619 --- workflow/rocoto/tasks.py | 4 ++++ workflow/rocoto/workflow_xml.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index c24b4868e9..1a84d692f1 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -63,6 +63,10 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None: 'cyc': '@H', 'COMROOT': self._base.get('COMROOT'), 'DATAROOT': self._base.get('DATAROOT')} + + if self._base['DEBUG'] and self.app_config.scheduler in ['slurm']: + envar_dict['SBATCH_DEBUG'] = '2' + self.envars = self._set_envars(envar_dict) @staticmethod diff --git a/workflow/rocoto/workflow_xml.py b/workflow/rocoto/workflow_xml.py index bf90192041..11b2cdfc45 100644 --- a/workflow/rocoto/workflow_xml.py +++ b/workflow/rocoto/workflow_xml.py @@ -64,9 +64,6 @@ 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():