Skip to content
Snippets Groups Projects

change the way a script is called to determine number of GPUs

Closed Chris Hines requested to merge slurm_gres_probe into master
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -85,10 +85,15 @@
when: slurm_gres_check is defined
check_mode: no
#as we change home directory earlier gather_facts causes the 'script' role to fail. so we do the probe this way
- name: Copy Gres - Test script to /tmp
copy: src="scripts/nvidia-probe.py" dest="/tmp" mode="u=rwx,g=rx,o=rx"
- name: Gres - Test for Nvidia devices
script: scripts/nvidia-probe.py
shell: /tmp/nvidia-probe.py
register: probeOutput
check_mode: no
sudo: true
- name: get cpu count
shell: 'lscpu | grep "On-line CPU" | cut -f 2 -d ":" | sed "s/\ *//g"'
@@ -98,6 +103,9 @@
- name: "set nvidiaprobe slurm_gres_list"
set_fact: "slurm_gres_list={{ probeOutput.stdout }}"
- name: simon debug of slurm_gres_list
debug: msg="List of slurm_gres_list is {{ slurm_gres_list }}"
- name: template gres.conf file
template: src="gres.conf.j2" dest={{ slurm_dir }}/etc/gres.conf mode=644
sudo: true
Loading