Skip to content

Commit 0abbf76

Browse files
committed
make gres work again
1 parent 8f9436f commit 0abbf76

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

templates/gres.conf.j2

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
AutoDetect=off
2-
{% for part in openhpc_slurm_partitions %}
3-
{% set nodelist = [] %}
4-
{% for group in part.get('groups', [part]) %}
5-
{% if 'gres' in group %}
6-
{% for gres in group.gres %}
7-
{% set gres_name, gres_type, _ = gres.conf.split(':') %}
8-
{% set group_name = group.cluster_name|default(openhpc_cluster_name) ~ '_' ~ group.name %}
9-
{% set inventory_group_hosts = groups.get(group_name, []) %}
10-
{% for hostlist in (inventory_group_hosts | hostlist_expression) %}
2+
{% for nodegroup in openhpc_nodegroups %}
3+
{% for gres in nodegroup.gres | default([]) %}
4+
{% set gres_name, gres_type, _ = gres.conf.split(':') %}
5+
{% set inventory_group_name = openhpc_cluster_name ~ '_' ~ nodegroup.name %}
6+
{% set inventory_group_hosts = groups.get(inventory_group_name, []) %}
7+
{% for hostlist in (inventory_group_hosts | hostlist_expression) %}
118
NodeName={{ hostlist }} Name={{ gres_name }} Type={{ gres_type }} File={{ gres.file }}
12-
{% endfor %}
13-
{% endfor %}
14-
{% endif %}
15-
{% endfor %}
16-
{% endfor %}
9+
{% endfor %}{# hostlists #}
10+
{% endfor %}{# gres #}
11+
{% endfor %}{# nodegroup #}

0 commit comments

Comments
 (0)