{"id":50385061,"url":"https://github.com/stackhpc/ansible-role-openhpc","last_synced_at":"2026-05-30T14:30:56.809Z","repository":{"id":37746849,"uuid":"162147868","full_name":"stackhpc/ansible-role-openhpc","owner":"stackhpc","description":"Ansible role for OpenHPC","archived":false,"fork":false,"pushed_at":"2026-02-23T16:34:30.000Z","size":511,"stargazers_count":51,"open_issues_count":22,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-24T00:26:02.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackhpc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-17T15:03:57.000Z","updated_at":"2026-02-19T19:26:35.000Z","dependencies_parsed_at":"2023-09-26T17:15:18.768Z","dependency_job_id":"e937a244-fc4f-4bc5-8d64-512972802b8b","html_url":"https://github.com/stackhpc/ansible-role-openhpc","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/stackhpc/ansible-role-openhpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fansible-role-openhpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fansible-role-openhpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fansible-role-openhpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fansible-role-openhpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhpc","download_url":"https://codeload.github.com/stackhpc/ansible-role-openhpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fansible-role-openhpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33696681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T14:30:56.070Z","updated_at":"2026-05-30T14:30:56.802Z","avatar_url":"https://github.com/stackhpc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/stackhpc/ansible-role-openhpc/workflows/CI/badge.svg)](https://github.com/stackhpc/ansible-role-openhpc/actions)\n\n# stackhpc.openhpc\n\nThis Ansible role installs packages and performs configuration to provide a Slurm cluster. By default this uses packages from [OpenHPC](https://openhpc.community/) but it can also use user-provided Slurm binaries.\n\nAs a role it must be used from a playbook, for which a simple example is given below. This approach means it is totally modular with no assumptions about available networks or any cluster features except for some hostname conventions. Any desired cluster fileystem or other required functionality may be freely integrated using additional Ansible roles or other approaches.\n\nThe minimal image for nodes is a Rocky Linux 8 GenericCloud image.\n\n## Task files\nThis role provides four task files which can be selected by using the `tasks_from` parameter of Ansible's `import_role` or `include_role` modules:\n- `main.yml`: Runs `install-ohpc.yml` and `runtime.yml`. Default if no `tasks_from` parameter is used.\n- `install-ohpc.yml`: Installs repos and packages for OpenHPC.\n- `install-generic.yml`: Installs systemd units etc. for user-provided binaries.\n- `runtime.yml`: Slurm/service configuration.\n\n## Role Variables\n\nVariables only relevant for `install-ohpc.yml` or `install-generic.yml` task files are marked as such below.\n\n`openhpc_extra_repos`: Optional list. Extra Yum repository definitions to configure, following the format of the Ansible\n[yum_repository](https://docs.ansible.com/ansible/2.9/modules/yum_repository_module.html) module.\n\n`openhpc_slurm_service_enabled`: Optional boolean, whether to enable the appropriate slurm service (slurmd/slurmctld). Default `true`.\n\n`openhpc_slurm_service_started`: Optional boolean. Whether to start slurm services. If set to false, all services will be stopped. Defaults to `openhpc_slurm_service_enabled`.\n\n`openhpc_slurm_control_host`: Required string. Ansible inventory hostname (and short hostname) of the controller e.g. `\"{{ groups['cluster_control'] | first }}\"`.\n\n`openhpc_slurm_control_host_address`: Optional string. IP address or name to use for the `openhpc_slurm_control_host`, e.g. to use a different interface than is resolved from `openhpc_slurm_control_host`.\n\n`openhpc_packages`: Optional list. Additional OpenHPC packages to install (`install-ohpc.yml` only).\n\n`openhpc_enable`:\n* `control`: whether to enable control host\n* `database`: whether to enable slurmdbd\n* `batch`: whether to enable compute nodes\n* `runtime`: whether to enable OpenHPC runtime\n\n`openhpc_slurmdbd_host`: Optional. Where to deploy slurmdbd if are using this role to deploy slurmdbd, otherwise where an existing slurmdbd is running. This should be the name of a host in your inventory. Set this to `none` to prevent the role from managing slurmdbd. Defaults to `openhpc_slurm_control_host`.\n\n`openhpc_munge_key_b64`: Optional. A base-64 encoded munge key. If not provided then the one generated on package install is used, but the `openhpc_slurm_control_host` must be in the play.\n\n`openhpc_login_only_nodes`: Optional. If using \"configless\" mode specify the name of an ansible group containing nodes which are login-only nodes (i.e. not also control nodes), if required. These nodes will run `slurmd` to contact the control node for config.\n\n`openhpc_module_system_install`: Optional, default true. Whether or not to install an environment module system. If true, lmod will be installed. If false, You can either supply your own module system or go without one (`install-ohpc.yml` only).\n\n`openhpc_generic_packages`: Optional. List of system packages to install, see `defaults/main.yml` for details (`install-generic.yml` only).\n\n`openhpc_sbin_dir`: Optional. Path to slurm daemon binaries such as `slurmctld`, default `/usr/sbin` (`install-generic.yml` only).\n\n`openhpc_bin_dir`: Optional. Path to Slurm user binaries such as `sinfo`, default `/usr/bin` (`install-generic.yml` only).\n\n`openhpc_lib_dir`: Optional. Path to Slurm libraries, default `/usr/lib64/slurm` (`install-generic.yml` only).\n\n### slurm.conf\n\nNote this role always operates in Slurm's [configless mode](https://slurm.schedmd.com/configless_slurm.html)\nwhere the `slurm.conf` configuration file is only present on the control node.\n\n`openhpc_nodegroups`: Optional, default `[]`. List of mappings, each defining a\nunique set of homogenous nodes:\n  * `name`: Required. Name of node group.\n  * `ram_mb`: Optional.  The physical RAM available in each node of this group\n  ([slurm.conf](https://slurm.schedmd.com/slurm.conf.html) parameter `RealMemory`)\n  in MiB. This is set using ansible facts if not defined, equivalent to\n  `free --mebi` total * `openhpc_ram_multiplier`.\n  * `ram_multiplier`: Optional.  An override for the top-level definition\n  `openhpc_ram_multiplier`. Has no effect if `ram_mb` is set.\n  * `gres_autodetect`: Optional. The [hardware autodetection mechanism](https://slurm.schedmd.com/gres.conf.html#OPT_AutoDetect)\n     to use for [generic resources](https://slurm.schedmd.com/gres.html).\n     **NB:** A value of `'off'` (the default) must be quoted to avoid yaml\n     conversion to `false`.\n  * `gres`: Optional. List of dicts defining [generic resources](https://slurm.schedmd.com/gres.html).\n     Not required if using `nvml` GRES autodetection. Keys/values in dicts are:\n      - `conf`: A string defining the [resource specification](https://slurm.schedmd.com/slurm.conf.html#OPT_Gres_1)\n        in the format `\u003cname\u003e:\u003ctype\u003e:\u003cnumber\u003e`, e.g. `gpu:A100:2`.\n      - `file`: A string defining device path(s) as per [File](https://slurm.schedmd.com/gres.conf.html#OPT_File),\n        e.g. `/dev/nvidia[0-1]`. Not required if using any GRES autodetection.\n    \n    Note [GresTypes](https://slurm.schedmd.com/slurm.conf.html#OPT_GresTypes) is\n    automatically set from the defined GRES or GRES autodetection. See [GRES Configuration](#gres-configuration)\n    for more discussion.\n  * `features`: Optional. List of [Features](https://slurm.schedmd.com/slurm.conf.html#OPT_Features) strings.\n  * `node_params`: Optional. Mapping of additional parameters and values for\n  [node configuration](https://slurm.schedmd.com/slurm.conf.html#lbAE).\n  **NB:** Parameters which can be set via the keys above must not be included here.\n\n  Each nodegroup will contain hosts from an Ansible inventory group named\n  `{{ openhpc_cluster_name }}_{{ name }}`, where `name` is the nodegroup name.\n  Note that:\n  - Each host may only appear in one nodegroup.\n  - Hosts in a nodegroup are assumed to be homogenous in terms of processor and memory.\n  - Hosts may have arbitrary hostnames, but these should be lowercase to avoid a\n    mismatch between inventory and actual hostname.\n  - An inventory group may be missing or empty, in which case the node group\n    contains no hosts.\n  - If the inventory group is not empty the play must contain at least one host.\n    This is used to set `Sockets`, `CoresPerSocket`, `ThreadsPerCore` and\n    optionally `RealMemory` for the nodegroup.\n\n`openhpc_partitions`: Optional. List of mappings, each defining a\npartition. Each partition mapping may contain:\n  * `name`: Required. Name of partition.\n  * `nodegroups`: Optional. List of node group names. If omitted, the node group\n     with the same name as the partition is used.\n  * `default`: Optional.  A boolean flag for whether this partion is the default.  Valid settings are `YES` and `NO`.\n  * `maxtime`: Optional.  A partition-specific time limit overriding `openhpc_job_maxtime`.\n  * `partition_params`: Optional. Mapping of additional parameters and values for\n  [partition configuration](https://slurm.schedmd.com/slurm.conf.html#SECTION_PARTITION-CONFIGURATION).\n  **NB:** Parameters which can be set via the keys above must not be included here.\n\nIf this variable is not set one partition per nodegroup is created, with default\npartition configuration for each.\n\n`openhpc_gres_autodetect`: Optional. A global default for `openhpc_nodegroups.gres_autodetect`\ndefined above. **NB:** A value of `'off'` (the default) must be quoted to avoid\nyaml conversion to `false`.\n\n`openhpc_job_maxtime`: Maximum job time limit, default `'60-0'` (60 days), see\n[slurm.conf:MaxTime](https://slurm.schedmd.com/slurm.conf.html#OPT_MaxTime).\n**NB:** This should be quoted to avoid Ansible conversions.\n\n`openhpc_cluster_name`: name of the cluster.\n\n`openhpc_config`: Optional. Mapping of additional parameters and values for\n[slurm.conf](https://slurm.schedmd.com/slurm.conf.html). Keys are slurm.conf\nparameter names and values are lists or strings as appropriate. This can be\nused to supplement or override the template defaults. Templated parameters can\nalso be removed by setting the value to the literal string `'omit'` - note\nthat this is *not the same* as the Ansible `omit` [special variable](https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html#term-omit).\n\n`openhpc_cgroup_config`: Optional. Mapping of additional parameters and values for\n[cgroup.conf](https://slurm.schedmd.com/cgroup.conf.html). Keys are cgroup.conf\nparameter names and values are lists or strings as appropriate. This can be\nused to supplement or override the template defaults. Templated parameters can\nalso be removed by setting the value to the literal string `'omit'` - note\nthat this is *not the same* as the Ansible `omit` [special variable](https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html#term-omit).\n\n`openhpc_mpi_config`: Optional. Mapping of additional parameters and values for\n[mpi.conf](https://slurm.schedmd.com/mpi.conf.html). Keys are mpi.conf\nparameter names and values are lists or strings as appropriate. This can be\nused to supplement or override the template defaults. Templated parameters can\nalso be removed by setting the value to the literal string `'omit'` - note\nthat this is *not the same* as the Ansible `omit` [special variable](https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html#term-omit).\n\n`openhpc_ram_multiplier`: Optional, default `0.95`. Multiplier used in the calculation: `total_memory * openhpc_ram_multiplier` when setting `RealMemory` for the partition in slurm.conf. Can be overriden on a per partition basis using `openhpc_slurm_partitions.ram_multiplier`. Has no effect if `openhpc_slurm_partitions.ram_mb` is set.\n\n`openhpc_state_save_location`: Optional. Absolute path for Slurm controller state (`slurm.conf` parameter [StateSaveLocation](https://slurm.schedmd.com/slurm.conf.html#OPT_StateSaveLocation))\n\n`openhpc_slurm_conf_template`: Optional. Path of Jinja template for `slurm.conf` configuration file. Default is `slurm.conf.j2` template in role. **NB:** The required templating is complex, if just setting specific parameters use `openhpc_config` intead.\n\n`openhpc_slurm_conf_path`: Optional. Path to template `slurm.conf` configuration file to. Default `/etc/slurm/slurm.conf`\n\n`openhpc_gres_template`: Optional. Path of Jinja template for `gres.conf` configuration file. Default is `gres.conf.j2` template in role.\n\n`openhpc_cgroup_template`: Optional. Path of Jinja template for `cgroup.conf` configuration file. Default is `cgroup.conf.j2` template in role.\n\n#### Accounting\n\nBy default, no accounting storage is configured. OpenHPC v1.x and un-updated OpenHPC v2.0 clusters support file-based accounting storage which can be selected by setting the role variable `openhpc_slurm_accounting_storage_type` to `accounting_storage/filetxt`\u003csup id=\"accounting_storage\"\u003e[1](#slurm_ver_footnote)\u003c/sup\u003e. Accounting for OpenHPC v2.1 and updated OpenHPC v2.0 clusters requires the Slurm database daemon, `slurmdbd` (although job completion may be a limited alternative, see [below](#Job-accounting). To enable accounting:\n\n* Configure a mariadb or mysql server as described in the slurm accounting [documentation](https://slurm.schedmd.com/accounting.html) on one of the nodes in your inventory and set `openhpc_enable.database `to `true` for this node.\n* Set `openhpc_slurm_accounting_storage_type` to `accounting_storage/slurmdbd`.\n* Configure the variables for `slurmdbd.conf` below.\n\nThe role will take care of configuring the following variables for you:\n\n`openhpc_slurm_accounting_storage_host`: Where the accounting storage service is running i.e where slurmdbd running.\n\n`openhpc_slurm_accounting_storage_port`: Which port to use to connect to the accounting storage.\n\n`openhpc_slurm_accounting_storage_user`: Username for authenticating with the accounting storage.\n\n`openhpc_slurm_accounting_storage_pass`: Mungekey or database password to use for authenticating.\n\nFor more advanced customisation or to configure another storage type, you might want to modify these values manually.\n\n#### Job accounting\n\nThis is largely redundant if you are using the accounting plugin above, but will give you basic\naccounting data such as start and end times. By default no job accounting is configured.\n\n`openhpc_slurm_job_comp_type`: Logging mechanism for job accounting. Can be one of\n`jobcomp/filetxt`, `jobcomp/none`, `jobcomp/elasticsearch`.\n\n`openhpc_slurm_job_acct_gather_type`: Mechanism for collecting job accounting data. Can be one\n of `jobacct_gather/linux`, `jobacct_gather/cgroup` and `jobacct_gather/none`.\n\n`openhpc_slurm_job_acct_gather_frequency`: Sampling period for job accounting (seconds).\n\n`openhpc_slurm_job_comp_loc`: Location to store the job accounting records. Depends on value of\n`openhpc_slurm_job_comp_type`, e.g for `jobcomp/filetxt` represents a path on disk.\n\n### slurmdbd\n\nWhen the slurm database daemon (`slurmdbd`) is enabled by setting\n`openhpc_enable.database` to `true` the following options must be configured.\nSee documentation for [slurmdbd.conf](https://slurm.schedmd.com/slurmdbd.conf.html)\nfor more details.\n\n`openhpc_slurmdbd_port`: Port for slurmdb to listen on, defaults to `6819`.\n\n`openhpc_slurmdbd_mysql_host`: Hostname or IP Where mariadb is running, defaults to `openhpc_slurm_control_host`.\n\n`openhpc_slurmdbd_mysql_database`: Database to use for accounting, defaults to `slurm_acct_db`.\n\n`openhpc_slurmdbd_mysql_password`: Password for authenticating with the database. You must set this variable.\n\n`openhpc_slurmdbd_mysql_username`: Username for authenticating with the database, defaults to `slurm`.\n\nBefore starting `slurmdbd`, the role will check if a database upgrade is\nrequired to due to a Slurm major version upgrade and carry it out if so.\nSlurm versions before 24.11 do not support this check and so no upgrade will\noccur. The following variables control behaviour during this upgrade:\n\n`openhpc_slurm_accounting_storage_client_package`: Optional. String giving the\nname of the database client package to install, e.g. `mariadb`. Default `mysql`.\n\n`openhpc_slurm_accounting_storage_backup_cmd`: Optional. String (possibly\nmulti-line) giving a command for `ansible.builtin.shell` to run a backup of the\nSlurm database before performing the databse upgrade. Default is the empty\nstring which performs no backup.\n\n`openhpc_slurm_accounting_storage_backup_host`: Optional. Inventory hostname\ndefining host to run the backup command. Default is `openhpc_slurm_accounting_storage_host`.\n\n`openhpc_slurm_accounting_storage_backup_become`: Optional. Whether to run the\nbackup command as root. Default `true`.\n\n`openhpc_slurm_accounting_storage_service`: Optional. Name of systemd service\nfor the accounting storage database, e.g. `mysql`. If this is defined this\nservice is stopped before the backup and restarted after, to allow for physical\nbackups. Default is the empty string, which does not stop/restart any service.\n\n## Facts\n\nThis role creates local facts from the live Slurm configuration, which can be\naccessed (with facts gathering enabled) using `ansible_local.slurm`. As per the\n`scontrol show config` man page, uppercase keys are derived parameters and keys\nin mixed case are from from config files. Note the facts are only refreshed\nwhen this role is run.\n\n## Example\n\n### Simple\n\nThe following creates a cluster with a a single partition `compute`\ncontaining two nodes:\n\n```ini\n# inventory/hosts:\n[hpc_login]\ncluster-login-0\n\n[hpc_compute]\ncluster-compute-0\ncluster-compute-1\n\n[hpc_control]\ncluster-control\n```\n\n```yaml\n#playbook.yml\n---\n- hosts: all\n  become: yes\n  tasks:\n    - import_role:\n        name: stackhpc.openhpc\n      vars:\n        openhpc_cluster_name: hpc\n        openhpc_enable:\n          control: \"{{ inventory_hostname in groups['cluster_control'] }}\"\n          batch: \"{{ inventory_hostname in groups['cluster_compute'] }}\"\n          runtime: true\n        openhpc_slurm_control_host: \"{{ groups['cluster_control'] | first }}\"\n        openhpc_nodegroups:\n          - name: compute\n        openhpc_partitions:\n          - name: compute\n---\n```\n\n### Multiple nodegroups\n\nThis example shows how partitions can span multiple types of compute node.\n\nAssume an inventory containing two types of compute node (login and\ncontrol nodes are omitted for brevity):\n\n```ini\n# inventory/hosts:\n...\n[hpc_general]\n# standard compute nodes\ncluster-general-0\ncluster-general-1\n\n[hpc_large]\n# large memory nodes\ncluster-largemem-0\ncluster-largemem-1\n...\n```\n\nFirstly `openhpc_nodegroups` maps to these inventory groups and applies any\nnode-level parameters - in this case the `largemem` nodes have 2x cores\nreserved for some reason:\n\n```yaml\nopenhpc_cluster_name: hpc\nopenhpc_nodegroups:\n  - name: general\n  - name: large\n    node_params:\n      CoreSpecCount: 2\n```\n\nNow two partitions can be configured using `openhpc_partitions`: A default\npartition for testing jobs with a short timelimit and no large memory nodes,\nand another partition with all hardware and longer job runtime for \"production\"\njobs:\n\n```yaml\nopenhpc_partitions:\n  - name: test\n    nodegroups:\n      - general\n    maxtime: '1:0:0' # 1 hour\n    default: 'YES'\n  - name: general\n    nodegroups:\n      - general\n      - large\n    maxtime: '2-0' # 2 days\n    default: 'NO'\n```\nUsers will select the partition using `--partition` argument and request nodes\nwith appropriate memory using the `--mem` option for `sbatch` or `srun`.\n\n## GRES Configuration\n\n### Autodetection\n\nSome autodetection mechanisms require recompilation of Slurm packages to link\nagainst external libraries. Examples are shown in the sections below.\n\n#### Recompiling Slurm binaries against the [NVIDIA Management library](https://developer.nvidia.com/management-library-nvml)\n\nThis allows using `openhpc_gres_autodetect: nvml` or `openhpc_nodegroup.gres_autodetect: nvml`.\n\nFirst, [install the complete cuda toolkit from NVIDIA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/).\nYou can then recompile the slurm packages from the source RPMS as follows:\n\n```sh\ndnf download --source slurm-slurmd-ohpc\nrpm -i slurm-ohpc-*.src.rpm\ncd /root/rpmbuild/SPECS\ndnf builddep slurm.spec\nrpmbuild -bb -D \"_with_nvml --with-nvml=/usr/local/cuda-12.8/targets/x86_64-linux/\" slurm.spec | tee /tmp/build.txt\n```\n\nNOTE: This will need to be adapted for the version of CUDA installed (12.8 is used in the example).\n\nThe RPMs will be created in `/root/rpmbuild/RPMS/x86_64/`. The method to distribute these RPMs to\neach compute node is out of scope of this document.\n\n## GRES configuration examples\n\nFor NVIDIA GPUs, `nvml` GRES autodetection can be used. This requires:\n- The relevant GPU nodes to have the `nvidia-smi` binary installed\n- Slurm to be compiled against the NVIDIA management library as above\n\nAutodetection can then be enabled using either for all nodegroups:\n\n```yaml\nopenhpc_gres_autodetection: nvml\n```\n\nor for individual nodegroups e.g:\n```yaml\nopenhpc_nodegroups:\n  - name: example\n    gres_autodetection: nvml\n  ...\n```\n\nIn either case no additional configuration of GRES is required. Any nodegroups\nwith NVIDIA GPUs will automatically get `gpu` GRES defined for all GPUs found.\nGPUs within a node do not need to be the same model but nodes in a nodegroup\nmust be homogenous. GRES types are set to the autodetected model names e.g. `H100`.\n\nFor `nvml` GRES autodetection per-nodegroup `gres_autodetection` and/or `gres` keys\ncan be still be provided. These can be used to disable/override the default\nautodetection method, or to allow checking autodetected resources against\nexpectations as described by [gres.conf documentation](https://slurm.schedmd.com/gres.conf.html).\n\nWithout any autodetection, a GRES configuration for NVIDIA GPUs might be:\n\n```\nopenhpc_nodegroups:\n  - name: general\n  - name: gpu\n    gres:\n      - conf: gpu:H200:2\n        file: /dev/nvidia[0-1]\n```\n\nNote that the `nvml` autodetection is special in this role. Other autodetection\nmechanisms, e.g. `nvidia` or `rsmi` allow the `gres.file:` specification to be\nomitted but still require `gres.conf:` to be defined.\n\n\u003cb id=\"slurm_ver_footnote\"\u003e1\u003c/b\u003e Slurm 20.11 removed `accounting_storage/filetxt` as an option. This version of Slurm was introduced in OpenHPC v2.1 but the OpenHPC repos are common to all OpenHPC v2.x releases. [↩](#accounting_storage)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fansible-role-openhpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhpc%2Fansible-role-openhpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fansible-role-openhpc/lists"}