@@ -153,8 +153,9 @@ Epilog=/etc/slurm/slurm.epilog.clean
153
153
{% for part in openhpc_slurm_partitions %}
154
154
{% set nodelist = [] %}
155
155
{% for group in part .get ('groups' , [part ]) %}
156
-
156
+
157
157
{% set group_name = group .cluster_name |default (openhpc_cluster_name ) ~ '_' ~ group .name %}
158
+ #-----------------------------------------------------------
158
159
# openhpc_slurm_partitions group: {{ group_name }}
159
160
{% set inventory_group_hosts = groups .get (group_name , []) %}
160
161
{% if inventory_group_hosts | length > 0 %}
@@ -164,8 +165,7 @@ Epilog=/etc/slurm/slurm.epilog.clean
164
165
{% set ram_mb = (first_host_hv ['ansible_memory_mb' ]['real' ]['total' ] * (group .ram_multiplier | default (openhpc_ram_multiplier ))) | int %}
165
166
{% for hostlist in (inventory_group_hosts | hostlist_expression ) %}
166
167
{% set gres = ' Gres=%s' % (',' .join (group .gres | map (attribute ='conf' ) )) if 'gres' in group else '' %}
167
-
168
- NodeName={{ hostlist }} State=UNKNOWN RealMemory={{ group.get('ram_mb', ram_mb) }} Sockets={{first_host_hv['ansible_processor_count'] }} CoresPerSocket={{ first_host_hv['ansible_processor_cores'] }} ThreadsPerCore={{ first_host_hv['ansible_processor_threads_per_core'] }}{{ gres }}
168
+ NodeName={{ hostlist }} State=UNKNOWN RealMemory={{ group.get('ram_mb', ram_mb) }} Sockets={{first_host_hv['ansible_processor_count'] }} CoresPerSocket={{ first_host_hv['ansible_processor_cores'] }} ThreadsPerCore={{ first_host_hv['ansible_processor_threads_per_core'] }}{{ gres }} {{ group.node_params | default({}) | dict2parameters }}
169
169
{% set _ = nodelist .append (hostlist ) %}
170
170
{% endfor %} {# nodes #}
171
171
{% endif %} {# inventory_group_hosts #}
@@ -180,6 +180,8 @@ NodeName={{ hostlist }} State=UNKNOWN RealMemory={{ group.get('ram_mb', ram_mb)
180
180
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 }}
181
181
{% endfor %} {# partitions #}
182
182
183
+ # /partitions -----------------------------------------------------------
184
+
183
185
# Define a non-existent node, in no partition, so that slurmctld starts even with all partitions empty
184
186
NodeName=nonesuch
185
187
0 commit comments