Skip to content

Commit

Permalink
Merge pull request #83 from zenotech/ProblemNomenclatureChange
Browse files Browse the repository at this point in the history
gres support
  • Loading branch information
mike-jt79 authored Jul 14, 2023
2 parents 42f5413 + de33f60 commit 55574b8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions mycluster/schedulers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def create_submit(
qos=None,
exclusive=True,
output_name=None,
gres=None,
):
"""
Write a new job file
Expand Down
1 change: 1 addition & 0 deletions mycluster/schedulers/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def create_submit(
qos=None,
exclusive=True,
output_name=None,
gres=None
):
if tasks_per_node is None:
tasks_per_node = self.tasks_per_node(queue_id)
Expand Down
1 change: 1 addition & 0 deletions mycluster/schedulers/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def create_submit(
qos=None,
exclusive=True,
output_name=None,
gres=None
):
queue_name = queue_id
if tasks_per_node is None:
Expand Down
1 change: 1 addition & 0 deletions mycluster/schedulers/sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def create_submit(
qos=None,
exclusive=True,
output_name=None,
gres=None
):
parallel_env = queue_id.split(":")[0]
queue_name = queue_id.split(":")[1]
Expand Down
2 changes: 2 additions & 0 deletions mycluster/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def create_submit(
qos=None,
exclusive=True,
output_name=None,
gres=None
):
queue_name = queue_id
if tasks_per_node is None:
Expand Down Expand Up @@ -158,6 +159,7 @@ def create_submit(
openmpi_args=openmpi_args,
qos=qos,
exclusive=exclusive,
gres=gres
)
return script_str

Expand Down
4 changes: 4 additions & 0 deletions mycluster/schedulers/templates/slurm.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
{% if qos %}
#SBATCH --qos {{qos}}
{% endif %}
{% if gres %}
#SBATCH --gres={{gres}}
{% endif %}


export MYCLUSTER_QUEUE={{queue_name}}
export MYCLUSTER_JOB_NAME={{my_name}}
Expand Down

0 comments on commit 55574b8

Please sign in to comment.