From 7d9021e9a56ec5a5f05f852f6efaecc1cd6babab Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Fri, 29 Sep 2023 14:49:51 +0000 Subject: [PATCH] Add second native tag and ldebug flag to rocoto - In rocoto setup scripts, create second tag to set -l ldebug=true for PBS submissions on WCOSS2. - Use ldebug=True flag from config.resources to add it to specific jobs requesting it. Refs #1854 --- workflow/rocoto/rocoto.py | 3 +++ workflow/rocoto/tasks.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/workflow/rocoto/rocoto.py b/workflow/rocoto/rocoto.py index b3f88f01d36..c8f96c657ab 100644 --- a/workflow/rocoto/rocoto.py +++ b/workflow/rocoto/rocoto.py @@ -72,6 +72,7 @@ def create_task(task_dict: Dict[str, Any]) -> List[str]: partition = resources_dict.get('partition', None) walltime = resources_dict.get('walltime', '00:01:00') native = resources_dict.get('native', None) + native2 = resources_dict.get('native2', None) memory = resources_dict.get('memory', None) nodes = resources_dict.get('nodes', 1) ppn = resources_dict.get('ppn', 1) @@ -100,6 +101,8 @@ def create_task(task_dict: Dict[str, Any]) -> List[str]: strings.append(f'\t{memory}\n') if native is not None: strings.append(f'\t{native}\n') + if native2 is not None: + strings.append(f'\t{native2}\n') strings.append('\n') strings.append(f'\t{log}\n') strings.append('\n') diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index b9716c938eb..c209833d3bc 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -113,7 +113,7 @@ def get_resource(self, task_name): Given a task name (task_name) and its configuration (task_names), return a dictionary of resources (task_resource) used by the task. Task resource dictionary includes: - account, walltime, cores, nodes, ppn, threads, memory, queue, partition, native + account, walltime, cores, nodes, ppn, threads, memory, queue, partition, native[2] """ scheduler = self.app_config.scheduler @@ -143,10 +143,13 @@ def get_resource(self, task_name): memory = task_config.get(f'memory_{task_name}', None) native = None + native2 = None if scheduler in ['pbspro']: native = '-l debug=true,place=vscatter' if task_config.get('is_exclusive', False): native += ':exclhost' + if task_config.get('ldebug', False): + native2 = '-l ldebug=true' elif scheduler in ['slurm']: native = '--export=NONE' @@ -165,6 +168,7 @@ def get_resource(self, task_name): 'threads': threads, 'memory': memory, 'native': native, + 'native2': native2, 'queue': queue, 'partition': partition}