Skip to content

Commit

Permalink
Merge pull request #26 from jabl/def-nodes-parts
Browse files Browse the repository at this point in the history
Only use default nodes/partitions when lists aren't defined
  • Loading branch information
martbhell committed Mar 10, 2016
2 parents c31235d + 4703995 commit 6958741
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions templates/slurm.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,29 +136,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 %}

0 comments on commit 6958741

Please sign in to comment.