Skip to content
Snippets Groups Projects
Commit 2aee70cb authored by Chris Hines's avatar Chris Hines
Browse files

better template for gres.conf allowing for Grid K1 GPUS and different CPU counts

parent 8fea316f
No related branches found
No related tags found
1 merge request!118Ansible check
......@@ -35,7 +35,7 @@ try:
if not line :
break
#print "Line is ",line
pe=re.compile('GPU\s*(\d*).*Tesla\s*(\S*)')
pe=re.compile('GPU\s+(\d*):\s+\S+\s+(\S*)')
m=pe.search(line)
if not m:
#print "No match found"
......
......@@ -90,6 +90,11 @@
register: probeOutput
check_mode: no
- name: get cpu count
shell: 'lscpu | grep "On-line CPU" | cut -f 2 -d ":" | sed "s/\ *//g"'
register: cpucount
check_mode: no
- name: "set nvidiaprobe slurm_gres_list"
set_fact: "slurm_gres_list={{ probeOutput.stdout }}"
......
#slurm gres file for {{ ansible_hostname }}
#No Of Devices={{ slurm_gres_list | length }}
{% for gr in slurm_gres_list %}
Name={{ gr.name }} Type={{ gr.type }} File={{ gr.file }} CPUs=0-23
Name={{ gr.name }} Type={{ gr.type }} File={{ gr.file }} CPUs={{ cpucount.stdout }}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment