@@ -158,17 +158,18 @@ Epilog=/etc/slurm/slurm.epilog.clean
158
158
{% set hostlists = (inventory_group_hosts | hostlist_expression ) %} {# hosts in inventory group aren't necessarily a single hostlist expression #}
159
159
{% for hostlist in hostlists %}
160
160
NodeName={{ hostlist }} {{ '' -}}
161
+ Features=nodegroup_{{ nodegroup.name }} {{ '' -}}
161
162
State=UNKNOWN {{ '' -}}
162
163
RealMemory={{ nodegroup.ram_mb | default(ram_mb) }} {{ '' -}}
163
- Sockets={{first_host_hv['ansible_processor_count'] }} {{ '' -}}
164
+ Sockets={{ first_host_hv['ansible_processor_count'] }} {{ '' -}}
164
165
CoresPerSocket={{ first_host_hv['ansible_processor_cores'] }} {{ '' -}}
165
166
ThreadsPerCore={{ first_host_hv['ansible_processor_threads_per_core'] }} {{ '' -}}
166
167
{{ nodegroup.node_params | default({}) | dict2parameters }} {{ '' -}}
167
168
{% if 'gres' in nodegroup %} Gres={{ ','.join(nodegroup.gres | map(attribute='conf')) }}{% endif %}
168
169
{% endfor %} {# hostlists #}
169
170
{% endif %} {# 1 or more hosts in inventory #}
170
171
171
- NodeSet={{ nodegroup.name }} Nodes= {{ ','.join(hostlists | default(['"" '] )) }} {# no support for creating nodesets by Feature # }
172
+ NodeSet=nodegroup_ {{ nodegroup.name }} Feature=nodegroup_ {{ nodegroup.name } }
172
173
173
174
{% endfor %}
174
175
@@ -181,7 +182,7 @@ PartitionName={{partition.name}} {{ '' -}}
181
182
Default={{ partition.get('default', 'YES') }} {{ '' -}}
182
183
MaxTime={{ partition.get('maxtime', openhpc_job_maxtime) }} {{ '' -}}
183
184
State=UP {{ '' -}}
184
- Nodes={{ partition.get('groups', [partition.name] ) | join(',') }} {{ '' -}}
185
+ Nodes={{ partition.get('groups', [partition.name] ) | map('regex_replace', '^', 'nodegroup_') | join(',') }} {{ '' -}}
185
186
{{ partition.partition_params | default({}) | dict2parameters }}
186
187
{% endfor %} {# openhpc_partitions #}
187
188
0 commit comments