Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only use default nodes/partitions when lists aren't defined #26

Merged
merged 1 commit into from
Mar 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions templates/slurm.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,31 @@ AccountingStorageEnforce={{ slurm_accounting_storage_enforce }}
# TOPOLOGY
#
#TopologyPlugin=topology/tree

# COMPUTE NODES
#NodeName={{ nodeBase }}[1-4] RealMemory=126000 Sockets=2 CoresPerSocket=6 ThreadsPerCore=1 State=UNKNOWN
{% if slurm_nodelist is defined %}
{% for nodelist in slurm_nodelist %}
{{ nodelist }}
{% endfor %}
{% else %}
NodeName={{ slurm_compute_nodes }} RealMemory={{ slurm_compute_realmemory }} Sockets={{ slurm_compute_sockets }} CoresPerSocket={{ slurm_compute_corespersocket }} ThreadsPerCore={{ slurm_compute_threadspercore }} State={{ slurm_node_state }}

# If slurm_with_gpu is True then add some nodes and a partition for them.
{% if slurm_with_gpu %}
NodeName={{ slurm_gpu_nodes }} RealMemory=250000 Sockets=2 CoresPerSocket=12 ThreadsPerCore=2 State=UNKNOWN feature=gpu
PartitionName=normal Nodes={{ slurm_compute_nodes }},{{ slurm_gpu_nodes }} Default=YES MaxTime=INFINITE State=UP DefaultTime=2:00:00
{% else %}
PartitionName=normal Nodes={{ slurm_compute_nodes }} Default=YES MaxTime=INFINITE State=UP DefaultTime=2:00:00
{% endif %}
{% if slurm_nodelist is defined %}
{% for nodelist in slurm_nodelist %}
{{ nodelist }}
{% endfor %}
{% endif %}
# partitions

PartitionName=test Nodes={{ slurm_compute_nodes }} Default=NO MaxTime=INFINITE State=UP DefaultTime=2:00:00
PartitionName=grid Nodes={{ slurm_compute_nodes }} Default=NO MaxTime=INFINITE State=UP DefaultTime=2:00:00

# partitions
{% if slurm_partitionlist is defined %}
{% for partition in slurm_partitionlist %}
{{ partition }}
{% endfor %}
{% else %}
{% if slurm_with_gpu %}
PartitionName=normal Nodes={{ slurm_compute_nodes }},{{ slurm_gpu_nodes }} Default=YES MaxTime=INFINITE State=UP DefaultTime=2:00:00
{% else %}
PartitionName=normal Nodes={{ slurm_compute_nodes }} Default=YES MaxTime=INFINITE State=UP DefaultTime=2:00:00
{% endif %}
PartitionName=test Nodes={{ slurm_compute_nodes }} Default=NO MaxTime=INFINITE State=UP DefaultTime=2:00:00
PartitionName=grid Nodes={{ slurm_compute_nodes }} Default=NO MaxTime=INFINITE State=UP DefaultTime=2:00:00
{% endif %}