Skip to content

Commit b8c64dc

Browse files
committed
make node/partition parameters more greppable
1 parent 0abbf76 commit b8c64dc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ unique set of homogenous nodes:
6363
- `conf`: A string with the [resource specification](https://slurm.schedmd.com/slurm.conf.html#OPT_Gres_1) but requiring the format `<name>:<type>:<number>`, e.g. `gpu:A100:2`. Note the `type` is an arbitrary string.
6464
- `file`: A string with the [File](https://slurm.schedmd.com/gres.conf.html#OPT_File) (path to device(s)) for this resource, e.g. `/dev/nvidia[0-1]` for the above example.
6565
Note [GresTypes](https://slurm.schedmd.com/slurm.conf.html#OPT_GresTypes) must be set in `openhpc_config` if this is used.
66-
* `params`: Optional. Mapping of additional parameters and values for
66+
* `node_params`: Optional. Mapping of additional parameters and values for
6767
[node configuration](https://slurm.schedmd.com/slurm.conf.html#lbAE).
6868

6969
Each nodegroup will contain hosts from an Ansible inventory group named
@@ -86,7 +86,7 @@ partition. Each partition mapping may contain:
8686
* `default`: Optional. A boolean flag for whether this partion is the default. Valid settings are `YES` and `NO`.
8787
* `maxtime`: Optional. A partition-specific time limit following the format of [slurm.conf](https://slurm.schedmd.com/slurm.conf.html) parameter `MaxTime`. The default value is
8888
given by `openhpc_job_maxtime`. The value should be quoted to avoid Ansible conversions.
89-
* `params`: Optional. Mapping of additional parameters and values for
89+
* `partition_params`: Optional. Mapping of additional parameters and values for
9090
[partition configuration](https://slurm.schedmd.com/slurm.conf.html#SECTION_PARTITION-CONFIGURATION).
9191

9292
`openhpc_job_maxtime`: Maximum job time limit, default `'60-0'` (60 days). See [slurm.conf](https://slurm.schedmd.com/slurm.conf.html) parameter `MaxTime` for format. The default is 60 days. The value should be quoted to avoid Ansible conversions.

templates/slurm.conf.j2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ NodeName={{ hostlist }} {{ '' -}}
163163
Sockets={{first_host_hv['ansible_processor_count'] }} {{ '' -}}
164164
CoresPerSocket={{ first_host_hv['ansible_processor_cores'] }} {{ '' -}}
165165
ThreadsPerCore={{ first_host_hv['ansible_processor_threads_per_core'] }} {{ '' -}}
166-
{{ nodegroup.params | default({}) | dict2parameters }} {{ '' -}}
166+
{{ nodegroup.node_params | default({}) | dict2parameters }} {{ '' -}}
167167
{% if 'gres' in nodegroup %}Gres={{ ','.join(nodegroup.gres | map(attribute='conf')) }}{% endif %}
168168
{% endfor %}{# hostlists #}
169169
{% endif %}{# 1 or more hosts in inventory #}
@@ -180,8 +180,9 @@ NodeName=nonesuch
180180
PartitionName={{partition.name}} {{ '' -}}
181181
Default={{ partition.get('default', 'YES') }} {{ '' -}}
182182
MaxTime={{ partition.get('maxtime', openhpc_job_maxtime) }} {{ '' -}}
183-
State=UP Nodes={{ partition.get('groups', [partition.name]) | join(',') }} {{ '' -}}
184-
{{ partition.params | default({}) | dict2parameters }}
183+
State=UP {{ '' -}}
184+
Nodes={{ partition.get('groups', [partition.name]) | join(',') }} {{ '' -}}
185+
{{ partition.partition_params | default({}) | dict2parameters }}
185186
{% endfor %}{# openhpc_partitions #}
186187

187188
{% if openhpc_slurm_configless | bool %}SlurmctldParameters=enable_configless{% endif %}

0 commit comments

Comments
 (0)