Skip to content

Commit

Permalink
Move SBATCH_DEBUG to xml envars
Browse files Browse the repository at this point in the history
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 NOAA-EMC#619
  • Loading branch information
KateFriedman-NOAA committed Feb 22, 2024
1 parent 6fcb333 commit 984b672
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None:
'cyc': '<cyclestr>@H</cyclestr>',
'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
Expand Down
3 changes: 0 additions & 3 deletions workflow/rocoto/workflow_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 984b672

Please sign in to comment.