Skip to content

Commit 0692a33

Browse files
committed
Adds bandwidth.yml playbook for NVIDIA nvbandwidth and
removes samples.yml tasks from adhoc/cudatest.yml
1 parent cc61ed3 commit 0692a33

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

ansible/adhoc/cudatests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
- hosts: cuda
33
become: true
44
gather_facts: true
5-
tags: cuda_samples
5+
tags: cuda_bandwidth
66
tasks:
7-
- ansible.builtin.import_role:
8-
name: cuda
9-
tasks_from: samples.yml
10-
117
- name: Run CUDA bandwidth tasks
128
ansible.builtin.import_role:
139
name: cuda

ansible/roles/cuda/defaults/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ cuda_samples_programs:
1616
- bandwidthTest
1717
# cuda_devices: # discovered from deviceQuery run
1818
cuda_persistenced_state: started
19+
cuda_install_nvidiafabricmanger: false
1920
# variables for nvbandwidth (for bandwidth.yml tasks run in cudatests.yml)
21+
cuda_bandwidth_version: '0.8'
2022
cuda_bandwidth_path: "/var/lib/{{ ansible_user }}/cuda_bandwidth"
21-
cuda_bandwidth_release_url: "https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.8.tar.gz"
23+
cuda_bandwidth_release_url: "https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v{{ cuda_bandwidth_version }}.tar.gz"
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Ensure cuda_bandwidth_path exists
2+
- name: Ensure CUDA bandwidth path exists
33
ansible.builtin.file:
44
state: directory
55
path: "{{ cuda_bandwidth_path }}"
@@ -14,12 +14,12 @@
1414
dest: "{{ cuda_bandwidth_path }}"
1515
owner: "{{ ansible_user }}"
1616
group: "{{ ansible_user }}"
17-
creates: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8"
17+
creates: "{{ cuda_bandwidth_path }}/nvbandwidth-{{ cuda_bandwidth_version }}"
1818

1919
- name: Creates CUDA bandwidth test build directory
2020
ansible.builtin.file:
2121
state: directory
22-
path: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build"
22+
path: "{{ cuda_bandwidth_path }}/nvbandwidth-{{ cuda_bandwidth_version }}/build"
2323
mode: "0755"
2424

2525
- name: Ensure cudatests directory exists
@@ -31,26 +31,27 @@
3131

3232
- name: Build CUDA bandwidth test
3333
ansible.builtin.shell:
34-
cmd: |
34+
cmd: >
3535
source /cvmfs/software.eessi.io/versions/2023.06/init/bash &&
36+
module load buildenv/default-foss-2023b &&
3637
module load Boost/1.82.0-GCC-12.3.0 &&
37-
. /etc/profile.d/sh.local && cmake .. &&
38+
. /etc/profile.d/sh.local &&
39+
cmake .. &&
3840
make -j {{ ansible_processor_vcpus }}
39-
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build"
40-
creates: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/nvbandwidth"
41+
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-{{ cuda_bandwidth_version }}/build"
42+
creates: "{{ cuda_bandwidth_path }}/nvbandwidth-{{ cuda_bandwidth_version }}/build/nvbandwidth"
4143

4244
- name: Run CUDA bandwidth test
4345
ansible.builtin.shell: |
44-
export LD_LIBRARY_PATH=/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/GCCcore/12.3.0/lib64:\
45-
/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/Boost/1.82.0-GCC-12.3.0/lib
4646
./nvbandwidth
4747
args:
48-
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/"
48+
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-{{ cuda_bandwidth_version }}/build/"
4949
register: cuda_bandwidth_output
50+
changed_when: true
5051

5152
- name: Save CUDA bandwidth output to bandwidth_results.txt
5253
ansible.builtin.copy:
5354
content: "{{ cuda_bandwidth_output.stdout }}"
54-
dest: "{{ appliances_environment_root }}/cudatests/bandwidth_results.txt"
55+
dest: "{{ appliances_environment_root }}/cudatests/{{ inventory_hostname }}bandwidth_results.txt"
5556
mode: '0644'
5657
delegate_to: localhost

0 commit comments

Comments
 (0)