Skip to content

Commit

Permalink
If tasks_per_node provided as a kwarg take that as the tpn value
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-jt79 committed Oct 2, 2019
1 parent 22a9ef9 commit bcc4ea4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mycluster/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ def create_submit(queue_id, **kwargs):

tpn = tasks_per_node(queue_id)
queue_tpn = tpn

if 'tasks_per_node' in kwargs:
tpn = min(tpn, kwargs['tasks_per_node'])
tpn = kwargs['tasks_per_node']

nc = node_config(queue_id)
qc = available_tasks(queue_id)
Expand Down
3 changes: 2 additions & 1 deletion mycluster/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def create_submit(queue_id, **kwargs):

tpn = tasks_per_node(queue_id)
queue_tpn = tpn

if 'tasks_per_node' in kwargs:
tpn = min(tpn, kwargs['tasks_per_node'])
tpn = kwargs['tasks_per_node']

nc = node_config(queue_id)
qc = available_tasks(queue_id)
Expand Down
3 changes: 2 additions & 1 deletion mycluster/sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ def create_submit(queue_id, **kwargs):

tpn = tasks_per_node(queue_id)
queue_tpn = tpn

if 'tasks_per_node' in kwargs:
tpn = min(tpn, kwargs['tasks_per_node'])
tpn = kwargs['tasks_per_node']

nc = node_config(queue_id)
qc = available_tasks(queue_id)
Expand Down
2 changes: 1 addition & 1 deletion mycluster/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def create_submit(queue_id, **kwargs):
tpn = tasks_per_node(queue_id)
queue_tpn = tpn
if 'tasks_per_node' in kwargs:
tpn = min(tpn, kwargs['tasks_per_node'])
tpn = kwargs['tasks_per_node']

if 'num_threads_per_task' in kwargs:
num_threads_per_task = kwargs['num_threads_per_task']
Expand Down

0 comments on commit bcc4ea4

Please sign in to comment.