Skip to content

Commit eb6292a

Browse files
committed
allow multiple empty partitions
1 parent bff03a3 commit eb6292a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

templates/slurm.conf.j2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ NodeName={{ hostlist }} State=UNKNOWN RealMemory={{ group.get('ram_mb', ram_mb)
129129
{% set _ = nodelist.append(extra_node_defn['NodeName']) %}
130130
{% endfor %}
131131
{% endfor %}{# group #}
132-
{% if not nodelist %} {# empty partition - define an invalid hostname which slurm accepts #}
133-
{% set nodelist = ['n/a'] %}
134-
NodeName={{ nodelist[0] }}
132+
{% if not nodelist %} {# empty partition #}
133+
{% set nodelist = ['""'] %}
135134
{% endif %}
136135
PartitionName={{part.name}} Default={{ part.get('default', 'YES') }} MaxTime={{ part.get('maxtime', openhpc_job_maxtime) }} State=UP Nodes={{ nodelist | join(',') }} {{ part.partition_params | default({}) | dict2parameters }}
137136
{% endfor %}{# partitions #}

0 commit comments

Comments
 (0)