Skip to content

Commit

Permalink
Strip cdump from resource variables in tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jun 25, 2024
1 parent efe234d commit 4883ddd
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,33 +178,16 @@ def get_resource(self, task_name):

account = task_config['ACCOUNT_SERVICE'] if task_name in Tasks.SERVICE_TASKS else task_config['ACCOUNT']

if f'wtime_{task_name}_{self.cdump}' in task_config:
walltime = task_config[f'wtime_{task_name}_{self.cdump}']
else:
walltime = task_config[f'wtime_{task_name}']

if f'npe_{task_name}_{self.cdump}' in task_config:
cores = task_config[f'npe_{task_name}_{self.cdump}']
else:
cores = task_config[f'npe_{task_name}']

if f'npe_node_{task_name}_{self.cdump}' in task_config:
ppn = task_config[f'npe_node_{task_name}_{self.cdump}']
else:
ppn = task_config[f'npe_node_{task_name}']
walltime = task_config[f'wtime']
cores = task_config[f'npe']
ppn = task_config[f'npe_node']

nodes = int(np.ceil(float(cores) / float(ppn)))

if f'nth_{task_name}_{self.cdump}' in task_config:
threads = task_config[f'nth_{task_name}_{self.cdump}']
else:
threads = task_config[f'nth_{task_name}']
threads = task_config[f'nth']

if f'memory_{task_name}_{self.cdump}' in task_config:
memory = task_config[f'memory_{task_name}_{self.cdump}']
else:
# Memory is not required
memory = task_config.get(f'memory_{task_name}', None)
# Memory is not required
memory = task_config.get(f'memory', None)

if scheduler in ['pbspro']:
if task_config.get('prepost', False):
Expand Down

0 comments on commit 4883ddd

Please sign in to comment.