Skip to content

Commit 65957bb

Browse files
committed
...
1 parent b8e1400 commit 65957bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

templates/gres.conf.j2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ AutoDetect=off
22
{% for part in openhpc_slurm_partitions %}
33
{% set nodelist = [] %}
44
{% for group in part.get('groups', [part]) %}
5+
{% set group_name = group.cluster_name|default(openhpc_cluster_name) ~ '_' ~ group.name %}
6+
{% set inventory_group_hosts = groups.get(group_name, []) %}
57
{% if 'gres_autodetect' in group %}
8+
{% for hostlist in (inventory_group_hosts | hostlist_expression) %}
69
NodeName={{ hostlist }} AutoDetect={{ group.gres_autodetect }}
10+
{% endfor %}
711
{% elif 'gres' in group %}
812
{% for gres in group.gres %}
913
{% set gres_name, gres_type, _ = gres.conf.split(':') %}
10-
{% set group_name = group.cluster_name|default(openhpc_cluster_name) ~ '_' ~ group.name %}
11-
{% set file = gres.file | default('') %}
12-
{% set inventory_group_hosts = groups.get(group_name, []) %}
1314
{% for hostlist in (inventory_group_hosts | hostlist_expression) %}
1415
NodeName={{ hostlist }} Name={{ gres_name }} Type={{ gres_type }} File={{ gres.file }}
1516

0 commit comments

Comments
 (0)